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 ofUseinterface. 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.ExceptionImplement 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_MODEbinding if available, otherwise null is returned
-
getPageManager
public final PageManager getPageManager()
- Returns:
WCMBindingsConstants.NAME_PAGE_MANAGERbinding if available, otherwise null is returned
-
getCurrentPage
public final Page getCurrentPage()
- Returns:
WCMBindingsConstants.NAME_CURRENT_PAGEbinding if available, otherwise null is returned
-
getResourcePage
public final Page getResourcePage()
- Returns:
WCMBindingsConstants.NAME_RESOURCE_PAGEbinding if available, otherwise null is returned
-
getPageProperties
public final ValueMap getPageProperties()
- Returns:
WCMBindingsConstants.NAME_PAGE_PROPERTIESbinding if available, otherwise null is returned
-
getProperties
public final ValueMap getProperties()
- Returns:
WCMBindingsConstants.NAME_PROPERTIESbinding if available, otherwise null is returned
-
getDesigner
public final Designer getDesigner()
- Returns:
WCMBindingsConstants.NAME_DESIGNERbinding if available, otherwise null is returned
-
getCurrentDesign
public final Design getCurrentDesign()
- Returns:
WCMBindingsConstants.NAME_CURRENT_DESIGNbinding if available, otherwise null is returned
-
getCurrentStyle
public final Style getCurrentStyle()
- Returns:
WCMBindingsConstants.NAME_CURRENT_STYLEbinding if available, otherwise null is returned
-
getComponent
public final Component getComponent()
- Returns:
WCMBindingsConstants.NAME_COMPONENTbinding if available, otherwise null is returned
-
getInheritedProperties
@Deprecated public final ValueMap getInheritedProperties()
Deprecated.since 3.1.0; please switch togetInheritedPageProperties()- Returns:
WCMBindings.INHERITED_PAGE_PROPERTIESbinding if available, otherwise null is returned
-
getInheritedPageProperties
public final ValueMap getInheritedPageProperties()
- Returns:
WCMBindings.INHERITED_PAGE_PROPERTIESbinding if available, otherwise null is returned
-
getResource
public final Resource getResource()
- Returns:
- Sling
SlingBindings.RESOURCEbinding 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.REQUESTbinding if available, otherwise null is returned
-
getResponse
public final SlingHttpServletResponse getResponse()
- Returns:
- Sling
SlingBindings.RESPONSEbinding if available, otherwise null is returned
-
getSlingScriptHelper
public final SlingScriptHelper getSlingScriptHelper()
- Returns:
- sling script helper binding
SlingBindings.SLINGif available, otherwise null is returned
-
getComponentContext
public final ComponentContext getComponentContext()
- Returns:
WCMBindingsConstants.NAME_COMPONENT_CONTEXTbinding if available, otherwise null is returned
-
getEditContext
public final EditContext getEditContext()
- Returns:
WCMBindingsConstants.NAME_EDIT_CONTEXTbinding if available, otherwise null is returned
-
getResourceDesign
public final Design getResourceDesign()
- Returns:
WCMBindingsConstants.NAME_RESOURCE_DESIGNbinding if available, otherwise null is returned
-
getXSSAPI
public final XSSAPI getXSSAPI()
- Returns:
WCMBindingsConstants.NAME_XSSAPIbinding if available, otherwise null is returned
-
-