Move RuleDefinitionReader + related classes to a dedicated package

pull/284/head
Mahmoud Ben Hassine 5 years ago
parent 6e4ee8c094
commit 1ebc0b40d5
No known key found for this signature in database
GPG Key ID: 79FCFB0A184E0036

@ -25,7 +25,11 @@ package org.jeasy.rules.mvel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.*; import org.jeasy.rules.support.AbstractRuleFactory;
import org.jeasy.rules.support.RuleDefinition;
import org.jeasy.rules.support.reader.JsonRuleDefinitionReader;
import org.jeasy.rules.support.reader.RuleDefinitionReader;
import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.mvel2.ParserContext; import org.mvel2.ParserContext;
import java.io.Reader; import java.io.Reader;

@ -25,7 +25,7 @@ package org.jeasy.rules.mvel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.JsonRuleDefinitionReader; import org.jeasy.rules.support.reader.JsonRuleDefinitionReader;
import org.jeasy.rules.support.UnitRuleGroup; import org.jeasy.rules.support.UnitRuleGroup;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;

@ -25,7 +25,7 @@ package org.jeasy.rules.mvel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.YamlRuleDefinitionReader; import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.jeasy.rules.support.UnitRuleGroup; import org.jeasy.rules.support.UnitRuleGroup;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;

@ -25,7 +25,11 @@ package org.jeasy.rules.spel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.*; import org.jeasy.rules.support.AbstractRuleFactory;
import org.jeasy.rules.support.RuleDefinition;
import org.jeasy.rules.support.reader.JsonRuleDefinitionReader;
import org.jeasy.rules.support.reader.RuleDefinitionReader;
import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.springframework.expression.BeanResolver; import org.springframework.expression.BeanResolver;
import org.springframework.expression.ParserContext; import org.springframework.expression.ParserContext;

@ -25,7 +25,7 @@ package org.jeasy.rules.spel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.JsonRuleDefinitionReader; import org.jeasy.rules.support.reader.JsonRuleDefinitionReader;
import org.jeasy.rules.support.UnitRuleGroup; import org.jeasy.rules.support.UnitRuleGroup;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;

@ -26,7 +26,7 @@ package org.jeasy.rules.spel;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.api.Rules; import org.jeasy.rules.api.Rules;
import org.jeasy.rules.support.UnitRuleGroup; import org.jeasy.rules.support.UnitRuleGroup;
import org.jeasy.rules.support.YamlRuleDefinitionReader; import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException; import org.junit.rules.ExpectedException;

@ -32,7 +32,7 @@ import java.util.List;
* Rule definition as defined in a rule descriptor. * Rule definition as defined in a rule descriptor.
* This class encapsulates the static definition of a {@link Rule}. * This class encapsulates the static definition of a {@link Rule}.
* *
* A rule definition is produced by a {@link RuleDefinitionReader} * A rule definition is produced by a {@code RuleDefinitionReader}
* and consumed by rule factories to create rules. * and consumed by rule factories to create rules.
* *
* @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com) * @author Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)

@ -21,9 +21,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.support.RuleDefinition;
import java.io.Reader; import java.io.Reader;
import java.util.ArrayList; import java.util.ArrayList;

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;

@ -21,11 +21,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import java.io.Reader; import java.io.Reader;
import java.util.List; import java.util.List;
import org.jeasy.rules.support.RuleDefinition;
/** /**
* Strategy interface for {@link RuleDefinition} readers. * Strategy interface for {@link RuleDefinition} readers.
* *

@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.Yaml;

@ -21,9 +21,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.support.RuleDefinition;
import org.junit.Test; import org.junit.Test;
import java.io.File; import java.io.File;

@ -21,9 +21,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE. * THE SOFTWARE.
*/ */
package org.jeasy.rules.support; package org.jeasy.rules.support.reader;
import org.jeasy.rules.api.Rule; import org.jeasy.rules.api.Rule;
import org.jeasy.rules.support.RuleDefinition;
import org.junit.Test; import org.junit.Test;
import java.io.File; import java.io.File;

@ -30,7 +30,7 @@ import org.jeasy.rules.api.RulesEngine;
import org.jeasy.rules.core.DefaultRulesEngine; import org.jeasy.rules.core.DefaultRulesEngine;
import org.jeasy.rules.mvel.MVELRule; import org.jeasy.rules.mvel.MVELRule;
import org.jeasy.rules.mvel.MVELRuleFactory; import org.jeasy.rules.mvel.MVELRuleFactory;
import org.jeasy.rules.support.YamlRuleDefinitionReader; import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import java.io.FileReader; import java.io.FileReader;

Loading…
Cancel
Save