Class IncludeOptions


  • public class IncludeOptions
    extends java.lang.Object
    IncludeOptions provide constants for the next component include
    • Field Detail

      • ATTR_NAME

        public static java.lang.String ATTR_NAME
        Name of the request attribute
    • Constructor Detail

      • IncludeOptions

        public IncludeOptions()
    • Method Detail

      • getOptions

        public static IncludeOptions getOptions​(ServletRequest req,
                                                boolean force)
        Returns the include options as stored in the current request. If no such request attribute is defined but force is true, new include options are created and stored as request attribute.
        Parameters:
        req - the request
        force - flag to force creation
        Returns:
        the include options or null
      • clear

        public static IncludeOptions clear​(ServletRequest req)
        Clears the include options from the request attributes and returns it.
        Parameters:
        req - the request
        Returns:
        the include options or null if never defined.
      • forceSameContext

        public IncludeOptions forceSameContext​(boolean force)
        Sets the option to force the next include to be in the same edit context as the current one. i.e. no new edit context is created.
        Parameters:
        force - true if no new edit context is to be created.
        Returns:
        this include options.
      • isSameContext

        public boolean isSameContext()
        Checks if the same edit context is requested.
        Returns:
        true if the next include should use the same edit context.
      • forceCurrentPage

        public IncludeOptions forceCurrentPage​(Page currentPage)
        Sets the option to force a particular current page for the next include.
        Parameters:
        currentPage - the forced page
        Returns:
        this include option
      • getCurrentPage

        public Page getCurrentPage()
        Returns the currentPage for the next include if forced, or null.
        Returns:
        the forced page or null
      • forceCellName

        public IncludeOptions forceCellName​(java.lang.String cellName)
        Sets the option to force the cell name of the next include
        Parameters:
        cellName - the cell name
        Returns:
        this include option
      • getCellName

        public java.lang.String getCellName()
        Returns the cell name for the next include.
        Returns:
        the cell name or null
      • getCssClassNames

        public java.util.Set<java.lang.String> getCssClassNames()
        Returns a modifiable set of additional css class names to be added to the including <div> tag.
        Returns:
        the array of names
      • isForceEditContext

        public boolean isForceEditContext()
        Checks a new edit context is forced.
        Returns:
        true if forced.
      • forceEditContext

        public void forceEditContext​(boolean forceEditContext)
        Define if a new edit context should be openend.
        Parameters:
        forceEditContext - true if a new edit context should be openend.
      • getDecorationTagName

        public java.lang.String getDecorationTagName()
        Returns the decoration tag name override.
        Returns:
        the decoration tag name.
      • setDecorationTagName

        public void setDecorationTagName​(java.lang.String decorationTagName)
        Sets the decoration tag name override. This override any automatic decoation tag name computation in the wcm request filter or explicit definition by the component. If set to an empty string, no decoration tag will be rendered at all. Note that the decoration tag name defined in the include options will only be applied to the component context before inclusion and will not be inheirted to the sub contextes.
        Parameters:
        decorationTagName - the decoration tag name.
        Since:
        5.3
        See Also:
        ComponentContext.setDecorationTagName(String)