public class DefaultFeatureRules extends java.util.ArrayList<FeatureRule> implements FeatureRules, SupportJson
Constructor and Description |
---|
DefaultFeatureRules() |
Modifier and Type | Method and Description |
---|---|
boolean |
add(FeatureRule rule)
Adds a new rule to this FeatureRules.
|
boolean |
add(java.lang.String name,
java.lang.String description,
boolean checkAtUpdate,
boolean checkAtFinishEdition,
Expression expression) |
void |
fromJson(JsonObject json) |
FeatureRules |
getCopy()
Returns a new copy of this FeatureRules.
|
FeatureRule |
getRule(int index)
Returns a
FeatureRule given its index. |
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
boolean |
remove(FeatureRule rule)
Removes the given rule from this FeatureRules.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
static void |
selfRegister() |
JsonObject |
toJson() |
JsonObjectBuilder |
toJsonBuilder() |
void |
validate(EditableFeature feature,
int check) |
void |
validate(Feature feature,
int mode) |
add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
finalize, getClass, notify, notifyAll, wait, wait, wait
clear, get, isEmpty, iterator, remove, size
toJson, toJsonBuilder
public boolean add(FeatureRule rule)
FeatureRules
add
in interface java.util.Collection<FeatureRule>
add
in interface java.util.List<FeatureRule>
add
in interface FeatureRules
add
in class java.util.ArrayList<FeatureRule>
rule
- the new rule to add.public boolean add(java.lang.String name, java.lang.String description, boolean checkAtUpdate, boolean checkAtFinishEdition, Expression expression)
add
in interface FeatureRules
public FeatureRule getRule(int index)
FeatureRules
FeatureRule
given its index.getRule
in interface FeatureRules
index
- a position in this FeatureRules
FeatureRule
found in the given indexpublic boolean remove(FeatureRule rule)
FeatureRules
remove
in interface FeatureRules
rule
- FeatureRule to removepublic FeatureRules getCopy()
FeatureRules
getCopy
in interface FeatureRules
public void validate(Feature feature, int mode) throws DataException
DataException
public void validate(EditableFeature feature, int check) throws DataException
DataException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException
public void fromJson(JsonObject json)
fromJson
in interface SupportFromJson
public JsonObject toJson()
toJson
in interface SupportToJson
public JsonObjectBuilder toJsonBuilder()
toJsonBuilder
in interface SupportToJson
public static void selfRegister()