public interface ExtensibilityModel
| Modifier and Type | Method and Description |
|---|---|
void |
addDiscardContent()
Add a new
DiscardUnboundContentModelElementImpl into the model so that when content is rendered
it will be discarded. |
void |
addUnboundContent()
Add a new
UnboundContentModelElementImpl into the model so that when content is rendered it will
be kept but will not be available to extensions to modify. |
void |
after(ExtensibilityDirectiveData directive)
Places content in the modell after some base content.
|
void |
before(ExtensibilityDirectiveData directive)
Places content in the model before some base content.
|
boolean |
clearRelocatedContent(String id,
String directiveName) |
ContentModelElement |
findContentModelElement(String id)
Finds a specific
ContentModelElement (with the supplied identifier) in the model. |
void |
flushModel(Writer out)
Flushes the entire content of the model to the supplied
Writer. |
List<ExtensibilityModelElement> |
getAdditionalContentElements()
Retrieves the list of elements being generated as part of extension processing.
|
ExtensibilityDebugData |
getChildDebugData() |
ExtensibilityDebugData |
getDebugData() |
DeferredContentTargetModelElement |
getDeferredContent(String directiveId,
String directiveName) |
ExtensibilityModel |
getParentModel()
Gets the
ExtensibilityModel enclosing this model (assuming that this model is nested within a parent). |
ModelWriter |
getWriter()
Gets the
ModelWriter being used by this instance. |
void |
insertDeferredContentTarget(int index,
OpenModelElement open,
DeferredContentTargetModelElement target,
CloseModelElement close)
Allows
DeferredContentTargetModelElement instances (along with their associated OpenModelElement and
CloseModelElement instances) to be inserted at a requested point in the model. |
boolean |
isExtensionProcessing()
Indicates whether the base model is complete and extensions are now being processed.
|
boolean |
isModelStarted()
Indicates whether or not the has been started.
|
void |
merge(ExtensibilityDirectiveData directive)
Places new content in the base model.
|
void |
remove(ExtensibilityDirectiveData directive)
Removes content from the model.
|
void |
replace(ExtensibilityDirectiveData directive)
Replaces content in the model.
|
void |
setChildDebugData(ExtensibilityDebugData childData)
Sets the
ExtensibilityDebugData associated with the nested child ExtensibilityModel. |
void |
switchToExtensionProcessing()
Switches from defining the base model to processing extensions.
|
boolean isModelStarted()
Indicates whether or not the has been started.
void switchToExtensionProcessing()
Switches from defining the base model to processing extensions. When extension processing the "merge" action can no longer be used but the "remove", "replace", "modify", "before" and "after" actions can be.
boolean isExtensionProcessing()
Indicates whether the base model is complete and extensions are now being processed. Extension processing commences once
the switchToExtensionProcessing method has been called. When extension processing the "merge" action can no longer
be used but the "remove", "replace", "modify", "before" and "after" actions can be.
ExtensibilityModel getParentModel()
Gets the ExtensibilityModel enclosing this model (assuming that this model is nested within a parent).
ExtensibilityModel if the current model is nested and null otherwise.ModelWriter getWriter()
Gets the ModelWriter being used by this instance.
void flushModel(Writer out)
Flushes the entire content of the model to the supplied Writer. Once this has been done it will no longer
be possible to update the model.
out - A Writer to render the model to.void addUnboundContent()
Add a new UnboundContentModelElementImpl into the model so that when content is rendered it will
be kept but will not be available to extensions to modify. This is used when processing the content in base files
that is not provided by an ExtensibilityDirective.
void addDiscardContent()
Add a new DiscardUnboundContentModelElementImpl into the model so that when content is rendered
it will be discarded. This is used when extension files are processed that contain "unbounded" content (that is
content that is not provided by an ExtensibilityDirective).
DeferredContentTargetModelElement getDeferredContent(String directiveId, String directiveName)
void remove(ExtensibilityDirectiveData directive) throws freemarker.template.TemplateException, IOException
Removes content from the model.
directive - ExtensibilityDirectiveDatafreemarker.template.TemplateExceptionIOExceptionvoid replace(ExtensibilityDirectiveData directive) throws freemarker.template.TemplateException, IOException
Replaces content in the model.
directive - ExtensibilityDirectiveDatafreemarker.template.TemplateExceptionIOExceptionvoid merge(ExtensibilityDirectiveData directive) throws freemarker.template.TemplateException, IOException
Places new content in the base model.
directive - ExtensibilityDirectiveDatafreemarker.template.TemplateExceptionIOExceptionvoid before(ExtensibilityDirectiveData directive) throws freemarker.template.TemplateException, IOException
Places content in the model before some base content.
directive - ExtensibilityDirectiveDatafreemarker.template.TemplateExceptionIOExceptionvoid after(ExtensibilityDirectiveData directive) throws freemarker.template.TemplateException, IOException
Places content in the modell after some base content.
directive - ExtensibilityDirectiveDatafreemarker.template.TemplateExceptionIOExceptionContentModelElement findContentModelElement(String id)
Finds a specific ContentModelElement (with the supplied identifier) in the model.
id - StringExtensibilityDebugData getDebugData()
ExtensibilityDebugData associated with the ExtensibilityModel.ExtensibilityDebugData getChildDebugData()
ExtensibilityDebugData associated with the nested child ExtensibilityModel.void setChildDebugData(ExtensibilityDebugData childData)
Sets the ExtensibilityDebugData associated with the nested child ExtensibilityModel.
List<ExtensibilityModelElement> getAdditionalContentElements()
Retrieves the list of elements being generated as part of extension processing.
void insertDeferredContentTarget(int index,
OpenModelElement open,
DeferredContentTargetModelElement target,
CloseModelElement close)
Allows DeferredContentTargetModelElement instances (along with their associated OpenModelElement and
CloseModelElement instances) to be inserted at a requested point in the model. This facility should be used with
extreme care and was provided to allow WebScripts run outside of the context of a page to process dependencies.
index - The index within the model to insert the elementsopen - The OpenModelElement that identifies the start of the contenttarget - The DeferredContentTargetModelElement for adding deferred content intoclose - The CloseModelElement that identifies the end of the contentCopyright © 2005–2017 Alfresco Software. All rights reserved.