Class SimpleListValidator
- java.lang.Object
-
- org.eclipse.birt.report.model.validators.AbstractSemanticValidator
-
- org.eclipse.birt.report.model.validators.AbstractPropertyValidator
-
- org.eclipse.birt.report.model.api.validators.SimpleListValidator
-
public class SimpleListValidator extends org.eclipse.birt.report.model.validators.AbstractPropertyValidator
Validates one list property of element. The property type should be simple value list, not structure list.Rule
The rule is that- all items in this list property should be valid.
- the value in this list should be unique.
Applicability
This validator is only applied to the property whose type is list of oneDesignElement
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
Name of this validator.
-
Constructor Summary
Constructors Constructor Description SimpleListValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleListValidator
getInstance()
Returns the singleton validator instance.java.util.List<SemanticException>
validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, java.lang.String propName)
Validates whether the list property specified bypropName
is invalid.java.util.List<SemanticException>
validateForAdding(DesignElementHandle element, IPropertyDefn propDefn, java.util.List<java.lang.Object> list, java.lang.Object toAdd)
Validates whether a new item can be added to the simple value list.
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
Name of this validator.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static SimpleListValidator getInstance()
Returns the singleton validator instance.- Returns:
- the validator instance
-
validateForAdding
public java.util.List<SemanticException> validateForAdding(DesignElementHandle element, IPropertyDefn propDefn, java.util.List<java.lang.Object> list, java.lang.Object toAdd)
Validates whether a new item can be added to the simple value list.- Parameters:
element
- the element holding the value listpropDefn
- definition of the list propertylist
- the value listtoAdd
- the item to add- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validate
public java.util.List<SemanticException> validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, java.lang.String propName)
Validates whether the list property specified bypropName
is invalid.- Specified by:
validate
in classorg.eclipse.birt.report.model.validators.AbstractPropertyValidator
- Parameters:
module
- the moduleelement
- the element to validatepropName
- the name of the list property to validate- Returns:
- error list, each of which is the instance of
SemanticException
.
-
-