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
.-
Field Summary
Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
modules, name
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GroupNameValidator
Returns the singleton validator instance.validate
(ListingHandle element) Validates whether the given element contains the duplicate group name.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.validateForAddingGroup
(ListingHandle element, String groupName) Validates whether the group with the given name can be added into the given listing element.validateForRenamingGroup
(ListingHandle element, GroupHandle group, String groupName) Validates whether the group can be renamed to the given name.Methods inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator
canApplyToDesign, canApplyToLibrary, getName, isInTemplateParameterDefinitionSlot, setModules, setName
-
Constructor Details
-
GroupNameValidator
public GroupNameValidator()
-
-
Method Details
-
getInstance
Returns the singleton validator instance.- Returns:
- the validator instance
-
validateForAddingGroup
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 List<SemanticException> validateForRenamingGroup(ListingHandle element, GroupHandle group, 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 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
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
.
-