Interface Designer


  • @ProviderType
    public interface Designer
    Specifies the interface of the designer. It provides methods for retrieving design information. Designs mirror the contents structure to some extend. The pages hold path references to the designs. If not path reference is specified or not inherited, the default design provided by getDefaultDesign() is used.
    • Field Detail

      • DESIGN_HOME

        static final java.lang.String DESIGN_HOME
        Deprecated.
        since 5.8.
        Home of the designs
        See Also:
        Constant Field Values
      • NT_DESIGN

        static final java.lang.String NT_DESIGN
        node type for design nodes. use pages for now.
        See Also:
        Constant Field Values
    • Method Detail

      • getDesignPath

        java.lang.String getDesignPath​(Page page)
        Returns the path to the design of the given page. If it does not specify such a path, the page's parent design path is returned or if the page does not have a parent, default design getDefaultDesign() is returned
        Parameters:
        page - the page
        Returns:
        the design path or null if page is null;
      • getDesign

        Design getDesign​(Page page)
        Returns the design for the given page.
        Parameters:
        page - the page to retrieve the design from.
        Returns:
        the design or null if the page is null.
      • hasDesign

        boolean hasDesign​(java.lang.String id)
        Checks if the design with the given id exists.
        Parameters:
        id - the design id
        Returns:
        true if the design exists.
      • getDesign

        Design getDesign​(java.lang.String id)
        Returns a design by id.
        Parameters:
        id - id of the design
        Returns:
        the design or the default design if it does not exist.
        See Also:
        Design.getId()
      • getStyle

        Style getStyle​(Resource res,
                       java.lang.String cellPath)
        Returns the style for a given resource and cell path. It's a convenience method that retrieves the containing page of the resource, resolves its design and then gets the style. if cellPath is null the name of the resource is used.
        Parameters:
        res - the resource
        cellPath - the path of the design cell
        Returns:
        the style or null
        See Also:
        PageManager.getContainingPage(Resource), getDesign(Page), Design.getStyle(String)
      • getDefaultDesign

        Design getDefaultDesign()
        Returns the default Design
        Returns:
        the default Design
        See Also:
        Design