Class TableHeaderContextContainmentValidator


  • public class TableHeaderContextContainmentValidator
    extends org.eclipse.birt.report.model.validators.AbstractElementValidator
    Validates the element is not allowed to appear in the specific slot of the given container type in any level.

    Rule

    The rule is that whether the given element can recursively resides in the specific slot of specific container type.

    Applicability

    This validator is only applied to TableItem and ListItem currently.
    • Field Summary

      • Fields inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator

        modules, name
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static TableHeaderContextContainmentValidator 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.
      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.
      • Methods inherited from class org.eclipse.birt.report.model.validators.AbstractSemanticValidator

        canApplyToDesign, canApplyToLibrary, getName, isInTemplateParameterDefinitionSlot, setModules, setName
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TableHeaderContextContainmentValidator

        public TableHeaderContextContainmentValidator()
    • Method Detail

      • 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 class org.eclipse.birt.report.model.validators.AbstractElementValidator
        Parameters:
        module - the module
        element - 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 module
        containerInfo - the container information
        toAdd - 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.
        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 module
        element - the container element
        slotId - the slot where the new element to insert
        toAdd - 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 validate
        element - the container element
        toAdd - the element definition to add
        Returns:
        error list, each of which is the instance of SemanticException.