public class BasicExtensibilityModuleHandler extends org.springframework.extensions.surf.extensibility.WebScriptExtensibilityModuleHandler implements ExtensibilityModuleHandler, org.springframework.context.ApplicationContextAware
This is the default ExtensibilityModuleHandler provided for Spring Surf and is configured as a Spring
bean.
| Constructor and Description |
|---|
BasicExtensibilityModuleHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
applyModule(ModuleDeployment module,
RequestContext context)
Determines whether or not to apply the supplied
ModuleDeployment based on the supplied RequestContext. |
List<ExtensionModule> |
evaluateModules(RequestContext context)
Retrieves a list of modules that can be applied to the file defined by the supplied path.
|
List<String> |
getExtendingModuleFiles(ExtensionModule module,
String path)
Returns a list of template paths that could provide valid extensions to the supplied
template.
|
ModelObjectService |
getModelObjectService() |
Map<String,LinkedHashSet<String>> |
getModuleCssDeps(ExtensionModule module,
String path)
Returns the CSS dependencies for the current extension module for the supplied path.
|
LinkedHashSet<String> |
getModuleJsDeps(ExtensionModule module,
String path)
Returns the JavaScript dependencies for the current extension module for the supplied path.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
setDefaultModuleEvaluator(ExtensionModuleEvaluator defaultModuleEvaluator) |
void |
setModelObjectService(ModelObjectService modelObjectService) |
void |
setModuleDeploymentService(ModuleDeploymentService moduleDeploymentService) |
public void setModuleDeploymentService(ModuleDeploymentService moduleDeploymentService)
public ModelObjectService getModelObjectService()
public void setModelObjectService(ModelObjectService modelObjectService)
public void setDefaultModuleEvaluator(ExtensionModuleEvaluator defaultModuleEvaluator)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic List<String> getExtendingModuleFiles(ExtensionModule module, String path)
Returns a list of template paths that could provide valid extensions to the supplied template. These paths are derived from the module names defined in all the extension configurations for the application. There is no guarantee that these template paths will map to a file so there existence should be validated by the template processor before attempted to process them.
getExtendingModuleFiles in interface ExtensibilityModuleHandlerpath - The path of the template being processed to look for extensions for.List of the files that extend the current file being processed.public LinkedHashSet<String> getModuleJsDeps(ExtensionModule module, String path)
ExtensibilityModuleHandlerReturns the JavaScript dependencies for the current extension module for the supplied path.
getModuleJsDeps in interface ExtensibilityModuleHandlermodule - ExtensionModulepath - Stringpublic Map<String,LinkedHashSet<String>> getModuleCssDeps(ExtensionModule module, String path)
ExtensibilityModuleHandlerReturns the CSS dependencies for the current extension module for the supplied path.
getModuleCssDeps in interface ExtensibilityModuleHandlermodule - ExtensionModulepath - Stringpublic List<ExtensionModule> evaluateModules(RequestContext context)
Retrieves a list of modules that can be applied to the file defined by the supplied path. The path supplied could be to a FreeMarker template, JavaScript controller or NLS properties file. Modules will only be added to the list returned if they meet target and evaluation criteria.
evaluateModules in interface ExtensibilityModuleHandlercontext - The current RequestContextExtensionModule instances that are applicable to the file being processed.protected boolean applyModule(ModuleDeployment module, RequestContext context)
Determines whether or not to apply the supplied ModuleDeployment based on the supplied RequestContext.
module - The ModuleDeployment to testcontext - The current RequestContexttrue if the module should be applied and false otherwise.Copyright © 2005–2016 Alfresco Software. All rights reserved.