Package com.day.cq.wcm.api.designer
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the defaultDesignReturns the design for the given page.Returns a design by id.getDesignPath(Page page) Returns the path to the design of the given page.Returns the style for a given resource.Returns the style for a given resource and cell path.booleanChecks if the design with the given id exists.
-
Field Details
-
DESIGN_HOME
Deprecated.since 5.8.Home of the designs- See Also:
-
DEFAULT_DESIGN_PATH
Deprecated.since 5.8. usegetDefaultDesign()instead.path to default design- See Also:
-
NT_DESIGN
node type for design nodes. use pages for now.- See Also:
-
-
Method Details
-
getDesignPath
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 designgetDefaultDesign()is returned- Parameters:
page- the page- Returns:
- the design path or
nullifpageisnull;
-
getDesign
Returns the design for the given page.- Parameters:
page- the page to retrieve the design from.- Returns:
- the design or
nullif thepageisnull.
-
hasDesign
Checks if the design with the given id exists.- Parameters:
id- the design id- Returns:
- true if the design exists.
-
getDesign
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
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. ifcellPathisnullthe name of the resource is used.- Parameters:
res- the resourcecellPath- the path of the design cell- Returns:
- the style or
null - See Also:
-
getStyle
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 defaultDesign- Returns:
- the default
Design - See Also:
-