Class BusinessRule
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.application.BusinessRule
-
public class BusinessRule extends Object
A class representing a business rule. A business rule is composed by constraints, which are conditions that must be met in order to allow certain actions to be executed.- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static int
SCOPE_GLOBAL
See #{scope} for detailsstatic int
TYPE_RELATIONSHIP_BY_ATTRIBUTE_VALUE
Object of class #{appliesTo} can only be related to object B if ObjectA.attributeA = Z and ObjectB.attributeB = Ystatic int
TYPE_RELATIONSHIP_BY_CLASS
Object of class #{appliesTo} can't be related to object of class Bstatic int
TYPE_RELATIONSHIP_BY_RELATIONSHIP_NAME
Object of class #{appliesTo} can only be related to object B with this set of relationship names (defined in the rule constraints)static int
TYPE_SPECIAL_CONTAINMENT
Object of class #{appliesTo} can only be special child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)static int
TYPE_STANDARD_CONTAINMENT
Object of class #{appliesTo} can only be child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)
-
Constructor Summary
Constructors Constructor Description BusinessRule(long ruleId, String name, String description, String appliesTo, int type, int scope, String version)
BusinessRule(long ruleId, Map<String,Object> ruleProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAppliesTo()
List<BusinessRuleConstraint>
getConstraints()
String
getDescription()
String
getName()
long
getRuleId()
int
getScope()
int
getType()
String
getVersion()
void
setAppliesTo(String appliesTo)
void
setConstraints(List<BusinessRuleConstraint> constraints)
void
setDescription(String description)
void
setName(String name)
void
setRuleId(long ruleId)
void
setScope(int scope)
void
setType(int type)
void
setVersion(String version)
-
-
-
Field Detail
-
TYPE_RELATIONSHIP_BY_CLASS
public static int TYPE_RELATIONSHIP_BY_CLASS
Object of class #{appliesTo} can't be related to object of class B
-
TYPE_RELATIONSHIP_BY_RELATIONSHIP_NAME
public static int TYPE_RELATIONSHIP_BY_RELATIONSHIP_NAME
Object of class #{appliesTo} can only be related to object B with this set of relationship names (defined in the rule constraints)
-
TYPE_RELATIONSHIP_BY_ATTRIBUTE_VALUE
public static int TYPE_RELATIONSHIP_BY_ATTRIBUTE_VALUE
Object of class #{appliesTo} can only be related to object B if ObjectA.attributeA = Z and ObjectB.attributeB = Y
-
TYPE_STANDARD_CONTAINMENT
public static int TYPE_STANDARD_CONTAINMENT
Object of class #{appliesTo} can only be child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)
-
TYPE_SPECIAL_CONTAINMENT
public static int TYPE_SPECIAL_CONTAINMENT
Object of class #{appliesTo} can only be special child of Object B if Object B has its attribute C set to X (as defined by a rule constraint)
-
SCOPE_GLOBAL
public static int SCOPE_GLOBAL
See #{scope} for details
-
-
Method Detail
-
getRuleId
public long getRuleId()
-
setRuleId
public void setRuleId(long ruleId)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getAppliesTo
public String getAppliesTo()
-
setAppliesTo
public void setAppliesTo(String appliesTo)
-
getType
public int getType()
-
setType
public void setType(int type)
-
getScope
public int getScope()
-
setScope
public void setScope(int scope)
-
getVersion
public String getVersion()
-
setVersion
public void setVersion(String version)
-
getConstraints
public List<BusinessRuleConstraint> getConstraints()
-
setConstraints
public void setConstraints(List<BusinessRuleConstraint> constraints)
-
-