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 Details

  • Method Details

    • getDesignPath

      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(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(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:
    • getStyle

      Style getStyle(Resource res, 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:
    • getStyle

      Style getStyle(Resource res)
      Returns the style for a given resource. It's a convenience method that retrieves the containing page of the resource, resolves its design and then gets the style. the cell path is constructed by walking the content path.
      Parameters:
      res - the resource
      Returns:
      the style or null
      See Also:
    • getDefaultDesign

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