public interface ExtensibilityDirectiveData
Represents a single invocation of an ExtensibilityDirective. This class is necessary since ExtensibilityDirective
can be used multiple times within a single request and their instance variables are volatile. As well as providing methods for the
instantiation of the OpenModelElement, ContentModelElement and CloseModelElement implementations associated with
the ExtensibilityDirective this interface ensures that all information required for processing the directive in the model
will not be lost when the next invocation of the directive type occurs.
| Modifier and Type | Method and Description |
|---|---|
CloseModelElement |
createClose()
Creates a new instance of the type of
CloseModelElement for with the associated ExtensibilityDirective. |
ContentModelElement |
createContentModelElement()
Creates a new instance of the type of
ContentModelElement for with the associated ExtensibilityDirective. |
OpenModelElement |
createOpen()
Creates a new instance of the type of
OpenModelElement for with the associated ExtensibilityDirective. |
String |
getAction()
Gets the action being performed by the invocation of the associated
ExtensibilityDirective type. |
freemarker.template.TemplateDirectiveBody |
getBody()
Returns the
TemplateDirectiveBody of the invocation of the associated ExtensibilityDirective type. |
String |
getDirectiveName()
Returns the name of the associated
ExtensibilityDirective type. |
String |
getId()
Returns the id of FreeMarker directive represented by implementing instance.
|
String |
getTarget()
Gets the id of the
ExtensibilityDirective that the invocation of the associated ExtensibilityDirective type
is targeting. |
void |
render(ModelWriter writer)
Renders the output provided by the directive.
|
String getId()
Returns the id of FreeMarker directive represented by implementing instance.
String getAction()
Gets the action being performed by the invocation of the associated ExtensibilityDirective type. The default
set of actions include "merge", "remove", "replace", "before" and "after".
ExtensibilityDirective type.String getTarget()
Gets the id of the ExtensibilityDirective that the invocation of the associated ExtensibilityDirective type
is targeting. This will only be expected to return a non-null value when the ExtensibilityDirective is being processed as
part of an extension. Any action that has an effect on the existing model (such as "remove" or "replace") will always require
target information.
String getDirectiveName()
Returns the name of the associated ExtensibilityDirective type.
freemarker.template.TemplateDirectiveBody getBody()
Returns the TemplateDirectiveBody of the invocation of the associated ExtensibilityDirective type.
TemplateDirectiveBody associated with a single invocation of the associated ExtensibilityDirective.OpenModelElement createOpen()
Creates a new instance of the type of OpenModelElement for with the associated ExtensibilityDirective. In almost
all cases this would be expected to be an instance of OpenModelElementImpl.
ContentModelElement createContentModelElement()
Creates a new instance of the type of ContentModelElement for with the associated ExtensibilityDirective. The
implementation returned could be varied depending upon the function of the ExtensibilityDirective. Where standard rendering
of the associated TemplateDirectiveBody will occur, a DefaultExtensibilityContent will most likely be returned.
CloseModelElement createClose()
Creates a new instance of the type of CloseModelElement for with the associated ExtensibilityDirective. In almost
all cases this would be expected to be an instance of CloseModelElementImpl.
void render(ModelWriter writer) throws freemarker.template.TemplateException, IOException
Renders the output provided by the directive. In most cases this will probably call the render
method of the associated TemplateDirectiveBody. However, it is possible that rendering may possible by
directive with an empty body.
writer - ModelWriter to send the rendered output to.freemarker.template.TemplateExceptionIOExceptionCopyright © 2005–2021 Alfresco Software. All rights reserved.