public class DefaultFeatureRuleExpression extends AbstractFeatureRule implements FeatureRuleExpression
checkwhen, description, name
CHECK_WHEN_FINISH_EDITING, CHECK_WHEN_INSERT_OR_UPDATE_FEATURE, CHECK_WHEN_USER_EDIT_FEATURE
Constructor and Description |
---|
DefaultFeatureRuleExpression() |
DefaultFeatureRuleExpression(java.lang.String name,
java.lang.String description,
boolean checkAtUpdate,
boolean checkAtFinishEdition,
Expression expression) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
execute(EditableFeature feature) |
void |
fromJson(JsonObject json) |
Expression |
getExpression() |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
static void |
selfRegister() |
void |
setCheckAtFinishEditing(boolean checkAtFinishEditing) |
void |
setCheckAtUpdate(boolean checkAtUpdate) |
void |
setCheckWhen(int mask) |
void |
setDescription(java.lang.String description) |
void |
setExpression(Expression expression) |
void |
setName(java.lang.String name) |
JsonObject |
toJson() |
JsonObjectBuilder |
toJsonBuilder() |
void |
validate(EditableFeature feature,
FeatureStore featureStore)
This is the method that applies this rule to the
Feature , given also its associated FeatureStore . |
checkAtFinishEditing, checkAtUpdate, checkWhen, getDescription, getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkAtFinishEditing, checkAtUpdate, checkWhen, getDescription, getName
toJson, toJsonBuilder
public DefaultFeatureRuleExpression()
public DefaultFeatureRuleExpression(java.lang.String name, java.lang.String description, boolean checkAtUpdate, boolean checkAtFinishEdition, Expression expression)
public void setName(java.lang.String name)
setName
in interface FeatureRuleExpression
public void setDescription(java.lang.String description)
setDescription
in interface FeatureRuleExpression
public void validate(EditableFeature feature, FeatureStore featureStore) throws DataException
FeatureRule
Feature
, given also its associated FeatureStore
.validate
in interface FeatureRule
feature
- Feature to which apply the rulefeatureStore
- FeatureStore to which the Feature belongsDataException
- if an error occurs during validationpublic java.lang.Object execute(EditableFeature feature)
public static void selfRegister()
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void setCheckAtUpdate(boolean checkAtUpdate)
setCheckAtUpdate
in interface FeatureRuleExpression
public void setCheckAtFinishEditing(boolean checkAtFinishEditing)
setCheckAtFinishEditing
in interface FeatureRuleExpression
public Expression getExpression()
getExpression
in interface FeatureRuleExpression
public void setExpression(Expression expression)
setExpression
in interface FeatureRuleExpression
public JsonObject toJson()
toJson
in interface SupportToJson
public JsonObjectBuilder toJsonBuilder()
toJsonBuilder
in interface SupportToJson
public void fromJson(JsonObject json)
fromJson
in interface SupportFromJson
public void setCheckWhen(int mask)
setCheckWhen
in interface FeatureRuleExpression
setCheckWhen
in class AbstractFeatureRule