public interface HandlesExtensibility
| Modifier and Type | Method and Description |
|---|---|
void |
addExtensibilityDirectives(Map<String,Object> freeMarkerModel,
ExtensibilityModel extModel)
Adds any custom FreeMarker directives required for rendering templates when being processed.
|
void |
addExtensionBundleToCache(String webScriptId,
WebScriptPropertyResourceBundle extensionBUndle)
Adds a new extended bundle to the cache.
|
void |
closeExtensibilityModel(ExtensibilityModel model,
Writer out)
One
ExtensibilityModel can be nested within another. |
ResourceBundle |
getCachedExtendedBundle(String webScriptId)
Checks the container to see if it has cached an extended bundle (that is a basic
ResourceBundle that
has had extension modules applied to it. |
ExtensibilityModel |
getCurrentExtensibilityModel()
Should be implemented to return an
ExtensibilityModel if one is currently being built. |
ScriptConfigModel |
getExtendedScriptConfigModel(String xmlConfig)
Creates a new
ExtendedScriptConfigModel instance which contains configuration provided by the extensions that
have been evaluated to be processed. |
TemplateConfigModel |
getExtendedTemplateConfigModel(String xmlConfig)
Creates a new
ExtendedTemplateConfigModel instance which contains configuration provided by the extensions that
have been evaluated to be processed. |
List<String> |
getExtendingModuleFiles(String pathBeingProcessed)
Returns a
List of the files that should be applied to an ExtensibilityModel
being processed. |
String |
getFileBeingProcessed()
Returns the path of the file currently being processed in the model.
|
boolean |
isExtensibilitySuppressed()
This indicates that although extensibility is handled it has been temporarily suppressed
|
ExtensibilityModel |
openExtensibilityModel()
One
ExtensibilityModel can be nested within another. |
void |
setFileBeingProcessed(String file)
Sets the path of the file currently being processed in the model.
|
void |
updateExtendingModuleDependencies(String pathBeingProcessed,
Map<String,Object> model)
Returns an HTML Spring defining the JavaScript and CSS resource dependencies defined by extending
modules.
|
boolean isExtensibilitySuppressed()
This indicates that although extensibility is handled it has been temporarily suppressed
ExtensibilityModel getCurrentExtensibilityModel()
Should be implemented to return an ExtensibilityModel if one is currently being built. If a model
is not being built then this should return null.
ExtensibilityModel openExtensibilityModel()
One ExtensibilityModel can be nested within another. This may occur where it is necessary to render the output of
an entire child model as an element of the current model. Calling this method will effectively nest a new ExtensibilityModel
within the model currently being processed.
ExtensibilityModel.void closeExtensibilityModel(ExtensibilityModel model, Writer out)
One ExtensibilityModel can be nested within another. This may occur where it is necessary to render the output of
an entire child model as an element of the current model. Calling this method will close the current model so that an enclosing
parent model will become the current model. The current model should also be flushed to the supplied Writer when the
model is closed.
model - The model to close.out - The Writer to render the output of the closed model to.void updateExtendingModuleDependencies(String pathBeingProcessed, Map<String,Object> model)
Returns an HTML Spring defining the JavaScript and CSS resource dependencies defined by extending modules.
pathBeingProcessed - Stringmodel - MapList<String> getExtendingModuleFiles(String pathBeingProcessed)
Returns a List of the files that should be applied to an ExtensibilityModel
being processed.
pathBeingProcessed - The path of the file being processed. This will typically be a FreeMarker
template, JavaScript controller or NLS properties file.List of the files that extend the current file being processed.String getFileBeingProcessed()
Returns the path of the file currently being processed in the model. This information is primarily provided for the purposes of generating debug information.
void setFileBeingProcessed(String file)
Sets the path of the file currently being processed in the model. This information should be collected to assist with providing debug information.
file - The path of the file currently being processed.ResourceBundle getCachedExtendedBundle(String webScriptId)
Checks the container to see if it has cached an extended bundle (that is a basic ResourceBundle that
has had extension modules applied to it. Extended bundles can only be safely cached once per request as the modules
applied can vary for each request.
webScriptId - The id of the WebScript to retrieve the extended bundle for.null if the bundle has not previously been cached.void addExtensionBundleToCache(String webScriptId, WebScriptPropertyResourceBundle extensionBUndle)
Adds a new extended bundle to the cache. An extended bundle is a WebScript ResourceBundle that has had
ResourceBundle instances merged into it from extension modules that have been applied. These can only be
cached for the lifetime of the request as different modules may be applied to the same WebScript for different
requests.
webScriptId - The id of the WebScript to cache the extended bundle against.extensionBUndle - The extended bundle to cache.ScriptConfigModel getExtendedScriptConfigModel(String xmlConfig)
Creates a new ExtendedScriptConfigModel instance which contains configuration provided by the extensions that
have been evaluated to be processed. This method will return null if it is not possible to create a new instance
which may be the case for many reasons.
xmlConfig - Optional additional XML configuration to include. This is typically provided by WebScripts.ExtendedScriptConfigModel or null if one could not be created.TemplateConfigModel getExtendedTemplateConfigModel(String xmlConfig)
Creates a new ExtendedTemplateConfigModel instance which contains configuration provided by the extensions that
have been evaluated to be processed. This method will return null if it is not possible to create a new instance
which may be the case for many reasons.
xmlConfig - Optional additional XML configuration to include. This is typically provided by WebScripts.ExtendedTemplateConfigModel or null if one could not be created.void addExtensibilityDirectives(Map<String,Object> freeMarkerModel, ExtensibilityModel extModel)
Adds any custom FreeMarker directives required for rendering templates when being processed.
freeMarkerModel - The model to add the directives to.extModel - The current ExtensibilityModel being worked on.Copyright © 2005–2017 Alfresco Software. All rights reserved.