public class WCMScriptHelper
extends java.lang.Object
WCMScriptHelper
class provides helper methods to support CQ Sightly extensions. This is to be used only with the CQ specific
Sightly plugins.
This class is not meant to be extended.Constructor and Description |
---|
WCMScriptHelper(SlingScriptHelper sling) |
Modifier and Type | Method and Description |
---|---|
SightlyWCMMode |
getMode() |
void |
includeResource(java.io.PrintWriter out,
java.lang.String script,
java.lang.String dispatcherOptions,
java.lang.String resourceType,
WCMResourceOptions wcmResourceOptions)
Include the resource and redirect the output into a custom print writer.
|
void |
includeResource(SlingHttpServletResponse response,
Resource resource,
java.lang.String dispatcherOptions,
java.lang.String resourceType,
WCMResourceOptions wcmResourceOptions)
Include a
Resource and redirect the output into a custom response |
void |
includeResource(SlingHttpServletResponse customResponse,
java.lang.String script,
java.lang.String dispatcherOptions,
java.lang.String resourceType,
WCMResourceOptions wcmResourceOptions)
Include a resource and redirect the output into a custom response.
|
void |
includeResource(SlingHttpServletResponse response,
java.lang.String script,
java.lang.String dispatcherOptions,
java.lang.String resourceType,
WCMResourceOptions wcmResourceOptions,
java.util.Map<java.lang.String,java.lang.Object> resourceProperties)
Include a
SyntheticResource and redirect the output into a custom response. |
void |
includeScript(java.lang.String script,
java.lang.String wcmMode,
java.io.PrintWriter out)
Calls the given script.
|
public WCMScriptHelper(SlingScriptHelper sling)
public void includeResource(java.io.PrintWriter out, java.lang.String script, java.lang.String dispatcherOptions, java.lang.String resourceType, WCMResourceOptions wcmResourceOptions)
out
- the custom writerscript
- the path of the resource to includedispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the resourcewcmResourceOptions
- the WCM specific options for including the resourcepublic void includeResource(SlingHttpServletResponse customResponse, java.lang.String script, java.lang.String dispatcherOptions, java.lang.String resourceType, WCMResourceOptions wcmResourceOptions)
customResponse
- the custom responsescript
- the path of the resource to includedispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the resourcewcmResourceOptions
- the WCM specific options for including the resourcepublic void includeResource(SlingHttpServletResponse response, java.lang.String script, java.lang.String dispatcherOptions, java.lang.String resourceType, WCMResourceOptions wcmResourceOptions, java.util.Map<java.lang.String,java.lang.Object> resourceProperties)
SyntheticResource
and redirect the output into a custom response.response
- the custom responsescript
- the path of the resource to includedispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the resourcewcmResourceOptions
- the WCM specific options for including the resourceresourceProperties
- the properties of the SyntheticResource
that will be includedpublic void includeResource(SlingHttpServletResponse response, Resource resource, java.lang.String dispatcherOptions, java.lang.String resourceType, WCMResourceOptions wcmResourceOptions)
Resource
and redirect the output into a custom responseresponse
- the custom responseresource
- the Resource
to includedispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the resourcewcmResourceOptions
- the WCM specific options for including the resourcepublic void includeScript(java.lang.String script, java.lang.String wcmMode, java.io.PrintWriter out)
script
- script path to be calledwcmMode
- WCM mode to be used, its an optional parameter. If the current request contains mode attribute,
it will be reset after the script call.public SightlyWCMMode getMode()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"