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;
}
Aggregations