Package com.day.cq.wcm.api
Interface Template
- All Superinterfaces:
Adaptable,JSONItem,LabeledResource
Defines the interface of a CQ WCM template.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the description of the template ornullif not defined.Returns the path to an icon for this template ornullif this template does not provide an icon.Get the initial content path.Get last modified date of template.Get page typegetPath()Returns the path of the template resourceGet the template's properties.Returns the ranking in the template list.Returns the short title of the template ornullif not defined.Returns the path to a thumbnail for this template ornullif the template does not provide a thumbnail.getTitle()Returns the title of the template or the name of the resource (i.e.booleanCheck if it has structure support.booleanChecks if this template is allowed to be used for a new page below the given path.booleanChecks if this template is allowed to be used for a new page below the given parent.booleanisAllowedChild(Template template) Checks if the given template is allowed as a child template.voidwrite(JSONWriter jsonWriter) Serializes this descriptor to jsonMethods inherited from interface com.day.cq.commons.LabeledResource
getName
-
Method Details
-
getPath
String getPath()Returns the path of the template resource- Specified by:
getPathin interfaceLabeledResource- Returns:
- path
-
getTitle
String getTitle()Returns the title of the template or the name of the resource (i.e. last path segment) if not defined.- Specified by:
getTitlein interfaceLabeledResource- Returns:
- title
-
getShortTitle
String getShortTitle()Returns the short title of the template ornullif not defined.- Returns:
- short title
-
getDescription
String getDescription()Returns the description of the template ornullif not defined.- Specified by:
getDescriptionin interfaceLabeledResource- Returns:
- description
-
getIconPath
String getIconPath()Returns the path to an icon for this template ornullif this template does not provide an icon.- Returns:
- the path to an icon or
null
-
getThumbnailPath
String getThumbnailPath()Returns the path to a thumbnail for this template ornullif the template does not provide a thumbnail.- Returns:
- the path to a thumbnail or
null
-
getRanking
Long getRanking()Returns the ranking in the template list.- Returns:
- the ranking
-
isAllowed
Checks if this template is allowed to be used for a new page below the given path. Note: This template is not allowed, if the parent template cannot be evaluated but the template specifies "allowedParents" Always useisAllowed(Resource)in loops for better performance.- Parameters:
parentPath- parent path for the new page- Returns:
trueif it is allowed.
-
isAllowed
Checks if this template is allowed to be used for a new page below the given parent. Note: This template is not allowed, if the parent template cannot be evaluated but the template specifies "allowedParents"- Parameters:
parent- the parent resource for the new page- Returns:
trueif it is allowed.
-
isAllowedChild
Checks if the given template is allowed as a child template.- Parameters:
template- the child template- Returns:
trueif the given template is allowed as child template.
-
write
Serializes this descriptor to json- Specified by:
writein interfaceJSONItem- Parameters:
jsonWriter- json writer- Throws:
JSONException- if a JSON error occurs
-
getInitialContentPath
String getInitialContentPath()Get the initial content path.- Returns:
Stringthe initial content path.
-
getProperties
ValueMap getProperties()Get the template's properties.- Returns:
- The template's properties. Never returns
null.
-
hasStructureSupport
boolean hasStructureSupport()Check if it has structure support.- Returns:
- boolean.
-
getPageTypePath
String getPageTypePath()Get page type- Returns:
- page type.
-
getLastModified
Calendar getLastModified()Get last modified date of template.- Returns:
- last modified date of template.
-