Class GroupNameValidator
- java.lang.Object
-
- org.eclipse.birt.report.model.validators.AbstractSemanticValidator
-
- org.eclipse.birt.report.model.validators.AbstractElementValidator
-
- org.eclipse.birt.report.model.api.validators.GroupNameValidator
-
public class GroupNameValidator extends org.eclipse.birt.report.model.validators.AbstractElementValidator
Validates the ducplicat group name in one table with data set.Rule
The rule is that one listing element with data set doesn't allow duplicate group name to appear in this element and its content listing element without data set. But if the content listing element has data set, the group name can be duplicate with that in container.Applicability
This validator is only applied toListingElement
.
-
-
Constructor Summary
Constructors Constructor Description GroupNameValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static GroupNameValidator
getInstance()
Returns the singleton validator instance.java.util.List<SemanticException>
validate(ListingHandle element)
Validates whether the given element contains the duplicate group name.java.util.List<SemanticException>
validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
Validates whether the given element contains the duplicate group name.java.util.List<SemanticException>
validateForAddingGroup(ListingHandle element, java.lang.String groupName)
Validates whether the group with the given name can be added into the given listing element.java.util.List<SemanticException>
validateForRenamingGroup(ListingHandle element, GroupHandle group, java.lang.String groupName)
Validates whether the group can be renamed to the given name.
-
-
-
Method Detail
-
getInstance
public static GroupNameValidator getInstance()
Returns the singleton validator instance.- Returns:
- the validator instance
-
validateForAddingGroup
public java.util.List<SemanticException> validateForAddingGroup(ListingHandle element, java.lang.String groupName)
Validates whether the group with the given name can be added into the given listing element.- Parameters:
element
- List/Table elementgroupName
- name of the group to add- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validateForRenamingGroup
public java.util.List<SemanticException> validateForRenamingGroup(ListingHandle element, GroupHandle group, java.lang.String groupName)
Validates whether the group can be renamed to the given name.- Parameters:
element
- List/Table elementgroup
- the group to renamegroupName
- name of the group 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)
Validates whether the given element contains the duplicate group name. This check is applied to all listing element without data set.- Specified by:
validate
in classorg.eclipse.birt.report.model.validators.AbstractElementValidator
- Parameters:
module
- the moduleelement
- the listing element to check- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validate
public java.util.List<SemanticException> validate(ListingHandle element)
Validates whether the given element contains the duplicate group name. This check is applied to all listing element without data set.- Parameters:
element
- the handle of the listing element to check- Returns:
- error list, each of which is the instance of
SemanticException
.
-
-