Search in sources :

Example 11 with RequestDispatcherOptions

use of org.apache.sling.api.request.RequestDispatcherOptions in project sling by apache.

the class SlingIncludeAttributeTagProcessor method prepareRequestDispatcherOptions.

protected RequestDispatcherOptions prepareRequestDispatcherOptions(final IStandardExpressionParser expressionParser, final ITemplateContext templateContext, final IProcessableElementTag processableElementTag, final IElementTagStructureHandler elementTagStructureHandler) {
    final String resourceType = (String) parseAttribute(expressionParser, templateContext, processableElementTag, elementTagStructureHandler, RESOURCE_TYPE_ATTRIBUTE_NAME);
    final String replaceSelectors = (String) parseAttribute(expressionParser, templateContext, processableElementTag, elementTagStructureHandler, REPLACE_SELECTORS_ATTRIBUTE_NAME);
    final String addSelectors = (String) parseAttribute(expressionParser, templateContext, processableElementTag, elementTagStructureHandler, ADD_SELECTORS_ATTRIBUTE_NAME);
    final String replaceSuffix = (String) parseAttribute(expressionParser, templateContext, processableElementTag, elementTagStructureHandler, REPLACE_SUFFIX_ATTRIBUTE_NAME);
    final RequestDispatcherOptions options = new RequestDispatcherOptions();
    options.setForceResourceType(resourceType);
    options.setReplaceSelectors(replaceSelectors);
    options.setAddSelectors(addSelectors);
    options.setReplaceSuffix(replaceSuffix);
    return options;
}
Also used : RequestDispatcherOptions(org.apache.sling.api.request.RequestDispatcherOptions)

Aggregations

RequestDispatcherOptions (org.apache.sling.api.request.RequestDispatcherOptions)11 RequestDispatcher (javax.servlet.RequestDispatcher)6 Resource (org.apache.sling.api.resource.Resource)5 SlingHttpServletRequest (org.apache.sling.api.SlingHttpServletRequest)4 SlingHttpServletResponse (org.apache.sling.api.SlingHttpServletResponse)3 IOException (java.io.IOException)2 ServletException (javax.servlet.ServletException)2 SyntheticResource (org.apache.sling.api.resource.SyntheticResource)2 OptionItem (com.adobe.cq.wcm.core.components.models.form.OptionItem)1 SimpleDataSource (com.adobe.granite.ui.components.ds.SimpleDataSource)1 JspTagException (javax.servlet.jsp.JspTagException)1 JSONWriter (org.apache.felix.utils.json.JSONWriter)1 RequestPathInfo (org.apache.sling.api.request.RequestPathInfo)1 ResourceResolver (org.apache.sling.api.resource.ResourceResolver)1 ValueMap (org.apache.sling.api.resource.ValueMap)1 ChildResource (org.apache.sling.models.annotations.injectorspecific.ChildResource)1 JspSlingHttpServletResponseWrapper (org.apache.sling.scripting.jsp.util.JspSlingHttpServletResponseWrapper)1 SightlyException (org.apache.sling.scripting.sightly.SightlyException)1 ValidationFailure (org.apache.sling.validation.ValidationFailure)1 ValidationResult (org.apache.sling.validation.ValidationResult)1