2014-02-16
CQ5 Developing Components has a lot of information, but I wanted a handier cheat sheet.
Name | JavaDoc | Description | my favorite methods |
---|---|---|---|
|
the current AEM component object of the current resource |
getName() / getPath() |
|
|
the current component context object of the request |
getPage() / getResource() / setDecorate(boolean) |
|
|
the current design object of the current page |
getStaticCssPath() / getStyle(_) / writeCss(Writer, boolean) / writeCssIncludes(_) |
|
|
the current AEM WCM page object |
getName() / getTitle() / getNavigationTitle() / getTags() / getContentResource() / getDepth() / getPageManager() |
|
|
the current style object of the current cell |
- |
|
|
the designer object used to access design information |
getDesign(_) / getStyle(_) |
|
|
the edit context object of the AEM component |
- |
|
|
the page manager object for page level operations |
getPage(path) / create/ copy/ delete/ move/ order(_) / getRevisions(_) |
|
|
the page properties object of the current page |
getInherited(name,default) / get(name,default) / put(key,val) |
|
|
the properties object of the current resource |
get(name,defaultVal) / put(key,val) examples |
|
|
the design object of the resource page |
see currentDesign |
|
|
the resource page object |
see currentPage |
Attributes provided by cq:defineObjects
:
componentContextName
componentName
currentDesignName
currentPageName
currentStyleName
designerName
editContextName
logName
nodeName
pageManagerName
pagePropertiesName
propertiesName
requestName
resourceDesignName
resourceName
resourcePageName
resourceResolverName
slingName
The <cq:defineObjects> tag also automatically includes <sling:defineObjects/>
Name | JavaDoc | Description | my favorite methods |
---|---|---|---|
|
JCR node for current resource (not defined if not) |
discourage in favor of Resource or ValueMap addNode(_) / getUUID() |
|
|
Provides an SLF4J Logger for logging to the Sling log system from within scripts |
error / warn / info / debug |
|
|
the current Resource object to handle (depending on the URL of the request) |
getName() / getPath() / getChild(path) / getChildren() |
|
|
The current ResourceResolver object |
create(args) / commit() / getResource(_) / resolve(_) / queryResources(query, lang) |
|
|
convenience methods for scripts. GOD Object. |
getService(Class) / include(_) / forward(_) / getRequest() / getResponse() / getScript() |
|
|
extends HttpServletRequest |
getResource() / getCookie(name) / getRequestParameterMap() / getRequestParameters(name) / getRequestPathInfo() |
|
|
extends HttpServletResponse |
static fields / addCookie(cookie) / getOutputStream() / getWriter() |
Attributes provided by sling:defineObjects
:
logName
nodeName
requestName
resourceResolverName
responseName
slingName
I hope this helps others and myself.