Class MasterPageContextContainmentValidator
- java.lang.Object
-
- org.eclipse.birt.report.model.validators.AbstractSemanticValidator
-
- org.eclipse.birt.report.model.validators.AbstractElementValidator
-
- org.eclipse.birt.report.model.api.validators.MasterPageContextContainmentValidator
-
public class MasterPageContextContainmentValidator extends org.eclipse.birt.report.model.validators.AbstractElementValidator
Validates the table/list is not allowed to appear in header/footer/contents slot of master page in any level.Rule
The rule is that whether the table/list can recursively resides in the header/footer/contents slot of master page.Applicability
This validator is only applied toMasterPage
currently.
-
-
Constructor Summary
Constructors Constructor Description MasterPageContextContainmentValidator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static MasterPageContextContainmentValidator
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)
Validates whether the given element can recursively resides in the specific slot of specific container type.java.util.List<SemanticException>
validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.ContainerContext containerInfo, org.eclipse.birt.report.model.core.DesignElement toAdd)
Validates whether the given element can recursively resides in the specific slot of specific container type when trying to add an element.java.util.List<SemanticException>
validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, int slotId, org.eclipse.birt.report.model.core.DesignElement toAdd)
Deprecated.since birt2.2, replaced byvalidateForAdding(Module, ContainerContext, DesignElement)
java.util.List<SemanticException>
validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, IElementDefn toAdd)
Validates whether the given element can recursively resides in the specific slot of specific container type when trying to add an element.
-
-
-
Method Detail
-
getInstance
public static MasterPageContextContainmentValidator getInstance()
Returns the singleton validator instance.- Returns:
- the validator instance
-
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 can recursively resides in the specific slot of specific container type.- Specified by:
validate
in classorg.eclipse.birt.report.model.validators.AbstractElementValidator
- Parameters:
module
- the moduleelement
- the element to validate- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validateForAdding
public java.util.List<SemanticException> validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.ContainerContext containerInfo, org.eclipse.birt.report.model.core.DesignElement toAdd)
Validates whether the given element can recursively resides in the specific slot of specific container type when trying to add an element.- Parameters:
module
- the modulecontainerInfo
- the container informationtoAdd
- the element to add- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validateForAdding
@Deprecated public java.util.List<SemanticException> validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, int slotId, org.eclipse.birt.report.model.core.DesignElement toAdd)
Deprecated.since birt2.2, replaced byvalidateForAdding(Module, ContainerContext, DesignElement)
Validates whether the given element can recursively resides in the specific slot of specific container type when trying to add an element.- Parameters:
module
- the moduleelement
- the container elementslotId
- the slot where the new element to inserttoAdd
- the element to add- Returns:
- error list, each of which is the instance of
SemanticException
.
-
validateForAdding
public java.util.List<SemanticException> validateForAdding(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element, IElementDefn toAdd)
Validates whether the given element can recursively resides in the specific slot of specific container type when trying to add an element.- Parameters:
module
- the root module of the element to validateelement
- the container elementtoAdd
- the element definition to add- Returns:
- error list, each of which is the instance of
SemanticException
.
-
-