public class GuideSubmitUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
REQ_ATTR_FORWARD_OPTIONS |
static String |
REQ_ATTR_FORWARD_PATH |
static String |
REQ_ATTR_GUIDE_SUBMIT_OPTIONS |
static String |
REQUEST_ATTR_PDF_NAME |
static String |
REQUEST_ATTR_REDIRECT_PARAMETER_MAP |
Constructor and Description |
---|
GuideSubmitUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
addContextPath(String url,
String contextPath)
This method will prepend context path to the URL if it starts with a /,
provided url and context path is not blank.
|
static Map<String,String> |
getGuideValueMap(FormSubmitInfo formSubmitInfo)
This API returns guideValueMap, that is, Map of all the fields and their values, and portal submit link and submit id
|
static Map<String,String> |
getRedirectParameters(org.apache.sling.api.SlingHttpServletRequest request)
This API returns redirect parameters set in the current request.
|
static String |
getReqAttrPdfName(org.apache.sling.api.SlingHttpServletRequest request)
Returns the name of the PDF set in the request
|
static String |
getUserID(org.apache.sling.api.SlingHttpServletRequest request)
Returns the current user ID from the request
|
static void |
setForwardPath(org.apache.sling.api.SlingHttpServletRequest req,
String path,
String selector,
String suffix)
This API should be used to set the path to forward the current request
|
static void |
setRedirectParameters(org.apache.sling.api.SlingHttpServletRequest request,
Map<String,String> value)
Sets redirect parameters to the current request
|
static void |
setRedirectUrl(org.apache.sling.api.SlingHttpServletRequest req,
String redirectUrl)
This API should be used to set the redirect url
|
public static final String REQUEST_ATTR_PDF_NAME
public static final String REQUEST_ATTR_REDIRECT_PARAMETER_MAP
public static final String REQ_ATTR_FORWARD_PATH
public static final String REQ_ATTR_FORWARD_OPTIONS
public static final String REQ_ATTR_GUIDE_SUBMIT_OPTIONS
public static void setForwardPath(org.apache.sling.api.SlingHttpServletRequest req, String path, String selector, String suffix)
req
- Sling http servlet requestpath
- Path to forward the current requestselector
- Sling selector to use while forwarding the request to the path. Null if no selector to be usedsuffix
- Suffix to use while forwarding the request to the path. Null if no selector to be usedSlingHttpServletRequest
public static void setRedirectUrl(org.apache.sling.api.SlingHttpServletRequest req, String redirectUrl)
req
- Sling http servlet requestredirectUrl
- redirect url to set in the current request objectSlingHttpServletRequest
public static String getUserID(org.apache.sling.api.SlingHttpServletRequest request)
request
- SlingHttpServletRequest
sling http servlet requestpublic static Map<String,String> getRedirectParameters(org.apache.sling.api.SlingHttpServletRequest request)
setRedirectParameters(org.apache.sling.api.SlingHttpServletRequest, java.util.Map)
request
- Sling http servlet requestSlingHttpServletRequest
public static Map<String,String> getGuideValueMap(FormSubmitInfo formSubmitInfo)
formSubmitInfo
- FormSubmitInfo
object containing the basic information required during form submissionFormSubmitInfo
public static void setRedirectParameters(org.apache.sling.api.SlingHttpServletRequest request, Map<String,String> value)
request
- Sling http servlet requestvalue
- Map represent the redirect paramters to be setSlingHttpServletRequest
public static String getReqAttrPdfName(org.apache.sling.api.SlingHttpServletRequest request)
request
- Sling http servlet requestpublic static String addContextPath(String url, String contextPath)
url
- Thank You page URLcontextPath
- Context path for the application.Copyright © 1982–2022 Adobe Systems Inc.. All rights reserved.