public interface Design
Modifier and Type | Field and Description |
---|---|
static String |
NN_STYLES
Name of the node that holds special component styles
|
static String |
PN_DOCTYPE
Name of the property that defines the doctype of a design
|
Modifier and Type | Method and Description |
---|---|
Map<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. |
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.
|
String |
getId()
Returns the id of the design.
|
String |
getJSON()
Returns a json representation of this design
|
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. |
String |
getPath()
Returns the path of the design
|
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(String path)
Returns the style for the given cell path.
|
boolean |
hasContent()
Checks if this design has content attached.
|
void |
writeCSS(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(Writer out)
Convenience method that writes the CSS include strings to the given
writer.
|
void |
writeCssIncludes(Writer out,
Doctype doctype)
Convenience method that writes the CSS include strings to the given
writer.
|
static final String PN_DOCTYPE
static final String NN_STYLES
String getPath()
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(String path)
path
- the path of the cellStyle getStyle(Cell cell)
cell
- the cellStyle getStyle(Resource res)
res
- resourceString getCssPath()
String getStaticCssPath()
null
if no such file exists.null
void writeCssIncludes(Writer out) throws IOException
out
- the writerIOException
- if an I/O error occursvoid writeCssIncludes(Writer out, Doctype doctype) throws IOException
doctype
is null
,
Doctype.HTML_401_STRICT
is used.out
- the writerdoctype
- doctype of the document the include is written to.IOException
- if an I/O error occursvoid writeCssIncludes(PageContext page) throws IOException
Doctype
defined in the request or defaults to
Doctype.HTML_401_STRICT
if non defined.page
- the jsp page contextIOException
- if an I/O error occursvoid writeCSS(Writer out, boolean includeCustom) throws IOException, RepositoryException
out
- writer to write toincludeCustom
- if true
non-CSS rules are included as commentsRepositoryException
- if a repository error occursIOException
- 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
Map<String,ComponentStyle> getComponentStyles(Cell cell)
cell
- the cellString getJSON()
Calendar getLastModified()
null
if
this information is not available or if the design has no content.null
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"