org.apache.sling.scripting.freemarker.internal

## Class IncludeDirective

- java.lang.Object
- - org.apache.sling.scripting.freemarker.internal.IncludeDirective

All Implemented Interfaces:
  freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel

    public class IncludeDirective
    extends Object
    implements freemarker.template.TemplateDirectiveModel

### Field Summary

### Fields inherited from interface freemarker.template.TemplateModel

`NOTHING`

### Constructor Summary

Constructors
Constructor and Description
`IncludeDirective()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected String` `dispatch(org.apache.sling.api.resource.Resource resource, String path, org.apache.sling.api.SlingHttpServletRequest slingHttpServletRequest, org.apache.sling.api.SlingHttpServletResponse slingHttpServletResponse, org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)`
`void` `execute(freemarker.core.Environment environment, Map parameters, freemarker.template.TemplateModel[] loopVars, freemarker.template.TemplateDirectiveBody body)`
`protected org.apache.sling.api.request.RequestDispatcherOptions` `prepareRequestDispatcherOptions(Map params)`
`protected <T> T` `unwrapParameter(String name, Map params, Class<T> type)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### IncludeDirective

    public IncludeDirective()

### Method Detail

#### execute

    public void execute(freemarker.core.Environment environment,
                        Map parameters,
                        freemarker.template.TemplateModel[] loopVars,
                        freemarker.template.TemplateDirectiveBody body)
                 throws freemarker.template.TemplateException,
                        IOException

Specified by:
  `execute` in interface `freemarker.template.TemplateDirectiveModel`
Throws:
  `freemarker.template.TemplateException`
  `IOException`

#### unwrapParameter

    protected <T> T unwrapParameter(String name,
                                    Map params,
                                    Class<T> type)
                             throws freemarker.template.TemplateModelException

Throws:
  `freemarker.template.TemplateModelException`

#### prepareRequestDispatcherOptions

    protected org.apache.sling.api.request.RequestDispatcherOptions prepareRequestDispatcherOptions(Map params)
                                                                                             throws freemarker.template.TemplateModelException

Throws:
  `freemarker.template.TemplateModelException`

#### dispatch

    protected String dispatch(org.apache.sling.api.resource.Resource resource,
                              String path,
                              org.apache.sling.api.SlingHttpServletRequest slingHttpServletRequest,
                              org.apache.sling.api.SlingHttpServletResponse slingHttpServletResponse,
                              org.apache.sling.api.request.RequestDispatcherOptions requestDispatcherOptions)

Parameters:
  `resource` - the resource to include
  `path` - the path to include
  `slingHttpServletRequest` - the current request
  `slingHttpServletResponse` - the current response
  `requestDispatcherOptions` - the options for the request dispatcher
Returns:
  the character response from the include call to request dispatcher
See Also:
  "org.apache.sling.scripting.jsp.taglib.IncludeTagHandler"