public class WCMScriptHelper extends 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(PrintWriter out,
String script,
String dispatcherOptions,
String resourceType,
WCMResourceOptions wcmResourceOptions)
Include the resource and redirect the output into a custom print writer
|
void |
includeResource(SlingHttpServletResponse customResponse,
String script,
String dispatcherOptions,
String resourceType,
WCMResourceOptions wcmResourceOptions)
Include the resource and redirect the output into a custom response
|
void |
includeScript(String script,
String wcmMode,
PrintWriter out)
Calls the given script.
|
public WCMScriptHelper(SlingScriptHelper sling)
public void includeResource(PrintWriter out, String script, String dispatcherOptions, String resourceType, WCMResourceOptions wcmResourceOptions)
out
- the custom writerscript
- to be includeddispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the given scriptwcmResourceOptions
- the WCM specific options for including a resourcepublic void includeResource(SlingHttpServletResponse customResponse, String script, String dispatcherOptions, String resourceType, WCMResourceOptions wcmResourceOptions)
customResponse
- the custom responsescript
- to be includeddispatcherOptions
- key=value
comma separated pairs as StringresourceType
- Sling resource type to be used while including the given scriptwcmResourceOptions
- the WCM specific options for including a resourcepublic void includeScript(String script, String wcmMode, 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 © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"