public interface Design
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NN_STYLES
Name of the node that holds special component styles
|
static java.lang.String |
PN_DOCTYPE
Name of the property that defines the doctype of a design
|
static java.lang.String |
PN_STYLE_EXCLUDED_COMPONENTS
Name of the property that defines components that are included when the
style is generated via the
getStyle(Resource, boolean) call |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ComponentStyle> |
getComponentStyles(Cell cell)
Returns the component styles for the given cell.
|
Resource |
getContentResource()
Returns the resource of the design content or
null if
this design has no content. |
java.lang.String |
getCssPath()
Returns the path of the css file for this design
|
Doctype |
getDoctype(Style currentStyle)
Returns the doctype of the current style, as defined in the
"cq:doctype" property.
|
java.lang.String |
getId()
Returns the id of the design.
|
java.lang.String |
getJSON()
Returns a json representation of this design
|
java.util.Calendar |
getLastModified()
Returns the time when the design was last modified or
null if
this information is not available or if the design has no content. |
java.lang.String |
getPath()
Returns the path of the design
|
java.lang.String |
getStaticCssPath()
Returns the path of the static css file for this design or
null
if no such file exists. |
Style |
getStyle(Cell cell)
Returns the style for the given cell.
|
Style |
getStyle(Resource res)
Returns the style for the given resource.
|
Style |
getStyle(Resource res,
boolean ignoreExcludedComponents)
Returns the style for the given resource
|
Style |
getStyle(java.lang.String path)
Returns the style for the given cell path.
|
boolean |
hasContent()
Checks if this design has content attached.
|
void |
writeCSS(java.io.Writer out,
boolean includeCustom)
Writes the dynamic CSS of this design to the given writer.
|
void |
writeCssIncludes(PageContext page)
Convenience method that writes the CSS include strings to the response.
|
void |
writeCssIncludes(java.io.Writer out)
Convenience method that writes the CSS include strings to the given
writer.
|
void |
writeCssIncludes(java.io.Writer out,
Doctype doctype)
Convenience method that writes the CSS include strings to the given
writer.
|
static final java.lang.String PN_DOCTYPE
static final java.lang.String NN_STYLES
static final java.lang.String PN_STYLE_EXCLUDED_COMPONENTS
getStyle(Resource, boolean)
calljava.lang.String getPath()
java.lang.String getId()
Resource getContentResource()
null
if
this design has no content.null
hasContent()
boolean hasContent()
true
if this design has content;
false
otherwise.Style getStyle(java.lang.String path)
path
- the path of the cellStyle getStyle(Cell cell)
cell
- the cellStyle getStyle(Resource res)
res
- resourceStyle getStyle(Resource res, boolean ignoreExcludedComponents)
Note that only the content structure of the resource is respected and not the component include hierarchy.
The hierarchy may be modified by removing certain components based on the information from the request if the ignoreExcludedComponents parameter is set to true. Excluded components are defined in the design with the "cq:styleExcludedComponents" property.
res
- the resourceignoreExcludedComponents
- whether to ignore excluded componentsPN_STYLE_EXCLUDED_COMPONENTS
java.lang.String getCssPath()
java.lang.String getStaticCssPath()
null
if no such file exists.null
void writeCssIncludes(java.io.Writer out) throws java.io.IOException
out
- the writerjava.io.IOException
- if an I/O error occursvoid writeCssIncludes(java.io.Writer out, Doctype doctype) throws java.io.IOException
doctype
is null
,
Doctype#HTML_401_STRICT
is used.out
- the writerdoctype
- doctype of the document the include is written to.java.io.IOException
- if an I/O error occursvoid writeCssIncludes(PageContext page) throws java.io.IOException
Doctype
defined in the request or defaults to
Doctype#HTML_401_STRICT
if non defined.page
- the jsp page contextjava.io.IOException
- if an I/O error occursvoid writeCSS(java.io.Writer out, boolean includeCustom) throws java.io.IOException, RepositoryException
out
- writer to write toincludeCustom
- if true
non-CSS rules are included as commentsRepositoryException
- if a repository error occursjava.io.IOException
- if an I/O error occursDoctype getDoctype(Style currentStyle)
currentStyle
is null
, the property is searched
on the toplevel node. the value of the property needs to be a name of
a Doctype
enum. if any of the above fails, Doctype#XHTML_10_STRICT
is returned.currentStyle
- current style or null
java.util.Map<java.lang.String,ComponentStyle> getComponentStyles(Cell cell)
cell
- the celljava.lang.String getJSON()
java.util.Calendar getLastModified()
null
if
this information is not available or if the design has no content.null
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"