Package com.adobe.cq.sightly
Class WCMUsePojo
- java.lang.Object
-
- com.adobe.cq.sightly.WCMUsePojo
-
- All Implemented Interfaces:
Use
- Direct Known Subclasses:
AllowedComponentList
,OffercardPropertiesProvider
,OfferproxyPropertiesProvider
,ResponsiveGrid
,TemplatedContainer
@ConsumerType public abstract class WCMUsePojo extends java.lang.Object implements Use
Abstract implementation ofUse
interface. This could be extended to provide custom Java Use-API objects.- See Also:
- HTL Use-API Documentation
-
-
Constructor Summary
Constructors Constructor Description WCMUsePojo()
-
Method Summary
-
-
-
Method Detail
-
init
public final void init(javax.script.Bindings scriptBindings)
Initialize bindings and calls #activate()
-
activate
public abstract void activate() throws java.lang.Exception
Implement this method to perform post initialization tasks. This method is called byinit(Bindings)
.- Throws:
java.lang.Exception
- in case of any error during activation
-
get
public final <T> T get(java.lang.String name, java.lang.Class<T> type)
Get an object associated with the given name- Parameters:
name
- Object property nametype
- Expected object type- Returns:
- Object or null if Object cannot be found or typed.
-
getWcmMode
public final SightlyWCMMode getWcmMode()
- Returns:
WCMBindings.WCM_MODE
binding if available, otherwise null is returned
-
getPageManager
public final PageManager getPageManager()
- Returns:
WCMBindingsConstants.NAME_PAGE_MANAGER
binding if available, otherwise null is returned
-
getCurrentPage
public final Page getCurrentPage()
- Returns:
WCMBindingsConstants.NAME_CURRENT_PAGE
binding if available, otherwise null is returned
-
getResourcePage
public final Page getResourcePage()
- Returns:
WCMBindingsConstants.NAME_RESOURCE_PAGE
binding if available, otherwise null is returned
-
getPageProperties
public final ValueMap getPageProperties()
- Returns:
WCMBindingsConstants.NAME_PAGE_PROPERTIES
binding if available, otherwise null is returned
-
getProperties
public final ValueMap getProperties()
- Returns:
WCMBindingsConstants.NAME_PROPERTIES
binding if available, otherwise null is returned
-
getDesigner
public final Designer getDesigner()
- Returns:
WCMBindingsConstants.NAME_DESIGNER
binding if available, otherwise null is returned
-
getCurrentDesign
public final Design getCurrentDesign()
- Returns:
WCMBindingsConstants.NAME_CURRENT_DESIGN
binding if available, otherwise null is returned
-
getCurrentStyle
public final Style getCurrentStyle()
- Returns:
WCMBindingsConstants.NAME_CURRENT_STYLE
binding if available, otherwise null is returned
-
getComponent
public final Component getComponent()
- Returns:
WCMBindingsConstants.NAME_COMPONENT
binding if available, otherwise null is returned
-
getInheritedProperties
@Deprecated public final ValueMap getInheritedProperties()
Deprecated.since 3.1.0; please switch togetInheritedPageProperties()
- Returns:
WCMBindings.INHERITED_PAGE_PROPERTIES
binding if available, otherwise null is returned
-
getInheritedPageProperties
public final ValueMap getInheritedPageProperties()
- Returns:
WCMBindings.INHERITED_PAGE_PROPERTIES
binding if available, otherwise null is returned
-
getResource
public final Resource getResource()
- Returns:
- Sling
SlingBindings.RESOURCE
binding if available, otherwise null is returned
-
getResourceResolver
public final ResourceResolver getResourceResolver()
- Returns:
- ResourceResolver associated with the current request
-
getRequest
public final SlingHttpServletRequest getRequest()
- Returns:
- Sling
SlingBindings.REQUEST
binding if available, otherwise null is returned
-
getResponse
public final SlingHttpServletResponse getResponse()
- Returns:
- Sling
SlingBindings.RESPONSE
binding if available, otherwise null is returned
-
getSlingScriptHelper
public final SlingScriptHelper getSlingScriptHelper()
- Returns:
- sling script helper binding
SlingBindings.SLING
if available, otherwise null is returned
-
getComponentContext
public final ComponentContext getComponentContext()
- Returns:
WCMBindingsConstants.NAME_COMPONENT_CONTEXT
binding if available, otherwise null is returned
-
getEditContext
public final EditContext getEditContext()
- Returns:
WCMBindingsConstants.NAME_EDIT_CONTEXT
binding if available, otherwise null is returned
-
getResourceDesign
public final Design getResourceDesign()
- Returns:
WCMBindingsConstants.NAME_RESOURCE_DESIGN
binding if available, otherwise null is returned
-
getXSSAPI
public final XSSAPI getXSSAPI()
- Returns:
WCMBindingsConstants.NAME_XSSAPI
binding if available, otherwise null is returned
-
-