public abstract class AbstractDependencyExtensibilityDirective
extends org.springframework.extensions.surf.extensibility.impl.AbstractExtensibilityDirective
An abstract directive implementation that provides additional methods for handling dependencies. These methods explicitly deal with manipulating dependency URLs to take application context and servlet context mappings into consideration.
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractDependencyExtensibilityDirective.ProcessedDependency
Inner class that is provided to allow explicit processed dependency information to be passed.
|
| Modifier and Type | Field and Description |
|---|---|
protected DependencyAggregator |
dependencyAggregator |
protected DependencyHandler |
dependencyHandler
A
DependencyHandler is used to handle locating and producing checksums for resource files. |
| Constructor and Description |
|---|
AbstractDependencyExtensibilityDirective(String directiveName,
org.springframework.extensions.surf.extensibility.ExtensibilityModel model) |
after, before, createExtensibilityDirectiveData, execute, getId, getModel, merge, remove, replaceprotected DependencyHandler dependencyHandler
A DependencyHandler is used to handle locating and producing checksums for resource files. This variable
should be set through the Spring application context.
protected DependencyAggregator dependencyAggregator
public AbstractDependencyExtensibilityDirective(String directiveName, org.springframework.extensions.surf.extensibility.ExtensibilityModel model)
protected String getResourceControllerMapping()
Returns a String that is used to map requests to the ResourceController. This defaults to
"/res/" but has been abstracted to a method so that this can be overridden.
public WebFrameworkConfigElement getWebFrameworkConfig()
public void setWebFrameworkConfig(WebFrameworkConfigElement webFrameworkConfig)
public void setDependencyHandler(DependencyHandler dependencyHandler)
Sets the DependencyHandler
dependencyHandler - DependencyHandlerpublic void setDependencyAggregator(DependencyAggregator dependencyAggregator)
public void setRequestContext(RequestContext requestContext)
Sets the RequestContext for the current thread.
requestContext - RequestContextpublic RequestContext getRequestContext()
Retrieves the RequestContext for the current thread.
public void setModelObject(ModelObject object)
Sets the ModelObject for the current thread.
object - ModelObjectpublic ModelObject getModelObject()
Gets the ModelObject for the current thread.
public AbstractDependencyExtensibilityDirective.ProcessedDependency processDependency(String src)
Examines the supplied dependency source and returns a AbstractDependencyExtensibilityDirective.ProcessedDependency instance
containing the updated source (to be passed to the DependencyHandler as well as the
prefix that should be added back to the updated source when outputting the source in the
HTML element.
src - Stringprotected String getUpdatedSrc(AbstractDependencyExtensibilityDirective.ProcessedDependency pd)
Retrieves the modified source URL from the AbstractDependencyExtensibilityDirective.ProcessedDependency object. This method simply
wraps that provided by AbstractDependencyExtensibilityDirective.ProcessedDependency but does so to allow overrides to customise behaviour.
pd - ProcessedDependencyprotected String getToInsert(AbstractDependencyExtensibilityDirective.ProcessedDependency pd)
Retrieves the prefix to insert of the URL from the AbstractDependencyExtensibilityDirective.ProcessedDependency object. This method simply
wraps that provided by AbstractDependencyExtensibilityDirective.ProcessedDependency but does so to allow overrides to customise behaviour.
pd - ProcessedDependencyCopyright © 2005–2016 Alfresco Software. All rights reserved.