public abstract class AbstractRequestContext extends ThreadLocalRequestContext implements org.springframework.extensions.surf.extensibility.HandlesExtensibility
Abstract base class for RequestContext implementations. This is provided as a convenience to developers who wish to build their own custom RequestContext variations.
Implementations that inherit from this class will benefit from having automatic thread local bindings for their custom request context types.
ThreadLocalRequestContext,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Serializable> |
attributesMap |
protected Map<String,Component> |
components |
protected String |
contextPath |
protected static AtomicLong |
counter |
protected String |
currentFormatId |
protected Page |
currentPage |
protected Resource |
currentResource |
protected TemplateInstance |
currentTemplate |
protected Map<String,String> |
headersMap |
protected String |
id |
protected String |
method |
protected Map<String,Object> |
model |
protected Map<String,String> |
parametersMap |
protected Page |
rootPage |
protected String |
scheme |
protected Configuration |
siteConfiguration |
protected String |
storeId |
protected Theme |
theme |
protected String |
uri |
protected Map<String,String> |
uriTokens |
protected org.springframework.extensions.webscripts.connector.User |
user |
static String |
VALUE_HEAD_TAGS |
protected Map<String,Serializable> |
valuesMap |
protected String |
viewName |
ATTR_REQUEST_CONTEXT, DEBUG_MODE_VALUE_COMPONENTS, USER_ENDPOINT, VALUE_CREDENTIAL_VAULT, VALUE_IDENTITY_VAULT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractRequestContext(WebFrameworkServiceRegistry serviceRegistry)
Deprecated.
|
protected |
AbstractRequestContext(WebFrameworkServiceRegistry serviceRegistry,
FrameworkBean frameworkUtil)
Constructs a new Request Context.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCssDependency(String dependency,
String media)
This method allows CSS resources to be added into the same list of dependencies added to by extension
modules.
|
void |
addExtensibilityDirectives(Map<String,Object> freeMarkerModel,
org.springframework.extensions.surf.extensibility.ExtensibilityModel extModel) |
void |
addExtensionBundleToCache(String webScriptId,
org.springframework.extensions.webscripts.WebScriptPropertyResourceBundle extensionBundle)
Adds a new extended bundle to the cache.
|
void |
addJSDependency(String dependency)
This method allows JavaScript resources to be added into the same list of dependencies added to by extension
modules.
|
void |
addSubComponentDebugData(String id,
SubComponent.RenderData data)
Adds the
SubComponent.RenderData for the specified SubComponent. |
void |
closeExtensibilityModel(org.springframework.extensions.surf.extensibility.ExtensibilityModel model,
Writer out) |
boolean |
dependencyAlreadyRequested(String dep)
Checks whether or not the supplied dependency has already been requested.
|
Serializable |
getAttribute(String key)
Retrieves an attribute from the request context
|
Map<String,Serializable> |
getAttributes()
Returns a map of attributes
|
ResourceBundle |
getCachedExtendedBundle(String webScriptId)
Checks the cache to see if it has cached an extended bundle (that is a basic
ResourceBundle that
has had extension modules applied to it. |
String |
getContentAsString()
This method must be implemented to return the result of calling
getContentAsString()
method of the FakeHttpServletResponse that is returned from the getResponse()
method when the RequestContext is in passive mode. |
String |
getContextPath()
Returns the request context path
|
org.springframework.extensions.webscripts.connector.CredentialVault |
getCredentialVault()
Returns a
CredentialVault. |
org.springframework.extensions.surf.extensibility.ExtensibilityModel |
getCurrentExtensibilityModel() |
Resource |
getCurrentObject()
Returns the current object
If no object has been set, then null is returned
|
String |
getCurrentObjectId()
Returns the id of the current object
If no object has been set, then the id will be null.
|
List<ExtensionModule> |
getEvaluatedModules()
Retrieve the list of
ExtensionModule instances that have been evaluated as applicable
for the current request. |
Map<String,Serializable> |
getEvaluatedProperties() |
org.springframework.extensions.webscripts.ScriptConfigModel |
getExtendedScriptConfigModel(String xmlConfig)
Creates a new
ExtendedScriptConfigModel instance using the local configuration generated for this request. |
org.springframework.extensions.webscripts.TemplateConfigModel |
getExtendedTemplateConfigModel(String xmlConfig)
Creates a new
TemplateConfigModel instance using the local configuration generated for this request. |
List<String> |
getExtendingModuleFiles(String pathBeingProcessed)
Retrieves a list of files that should be provided by the evaluated modules.
|
String |
getExtensionDependencies()
Returns the dependencies requested by extension modules as a formatted String.
|
String |
getFileBeingProcessed() |
String |
getFormatId()
Returns the current format id
|
String |
getHeader(String key)
Retrieves an header from the request context
|
Map<String,String> |
getHeaders()
Returns a map of headers
|
String |
getId()
Each request context instance is stamped with a unique id
|
abstract LinkBuilder |
getLinkBuilder()
Returns the LinkBuilder to be used for the currently executing
page.
|
Map<String,Object> |
getModel()
Returns the spring mvc model
|
ModelObject |
getObject() |
ModelObjectService |
getObjectService()
Gets the model object service
|
Page |
getPage()
If a page instance is currently executing, it can be retrieved
from the request context.
|
String |
getPageId()
Returns the id of the currently executing page.
|
String |
getPageTitle()
Returns the title of the current page.
|
String |
getParameter(String key)
Retrieves a parameter from the request context
|
Map<String,String> |
getParameters()
Returns a map of parameters
|
Component[] |
getRenderingComponents()
Returns the components that were bound to this and any of its parent context
during the rendering.
|
RenderMode |
getRenderMode()
A
RenderMode can be set by a ComponentTypes to allow different outputs
to be rendered when requesting a Component directly by specifying a "mode" request
parameter. |
org.springframework.web.context.request.WebRequest |
getRequest() |
org.springframework.extensions.surf.util.Content |
getRequestContent()
Returns the body of the incoming POST content
This is applicable for multipart form requests
|
String |
getRequestMethod()
Returns the method of the incoming request
|
String |
getRequestScheme()
Returns the protocol (e.g.
|
javax.servlet.http.HttpServletResponse |
getResponse()
This method must be implemented to return the
HttpServletResponse associated
with the RequestContext. |
Page |
getRootPage()
Returns the root page for a site.
|
String |
getServletContextPath()
Returns the context path of the servlet being used to process the request.
|
Configuration |
getSiteConfiguration()
If the site has a configuration XML, then this will return it
|
SubComponent.RenderData |
getSubComponentDebugData(String id)
Retrieves the
SubComponent.RenderData for the specified SubComponent. |
TemplateInstance |
getTemplate()
Returns the current executing template.
|
String |
getTemplateId()
Returns the id of the currently executing template.
|
Theme |
getTheme() |
String |
getThemeId()
Returns the current theme id
|
String |
getUri() |
Map<String,String> |
getUriTokens()
Retrieves any URI tokens parsed in the view resolver.
|
org.springframework.extensions.webscripts.connector.User |
getUser()
Returns the current user
|
String |
getUserId()
Returns the current user id
|
Serializable |
getValue(String key)
Retrieves a custom value from the request context
|
Map<String,Serializable> |
getValuesMap()
Returns the underlying map of the custom key/values pairs
stored on this RequestContext instance.
|
String |
getViewName() |
String |
getWebsiteTitle()
Returns the title of the web site.
|
boolean |
hasAttribute(String key)
Returns true if an attribute exists in the request context
|
boolean |
hasHeader(String key)
Returns true if an header exists in the request context
|
boolean |
hasParameter(String key)
Returns true if a parameter exists in the request context
|
boolean |
hasValue(String key)
Returns true if a custom value exists in the request context
|
boolean |
isPassiveMode()
Indicates whether or not the
RequestContext is currently in "passive mode". |
void |
markDependencyAsRequested(String dep)
This method can be used to indicate that the supplied dependency has been requested by other means.
|
org.springframework.extensions.surf.extensibility.ExtensibilityModel |
openExtensibilityModel() |
void |
removeValue(String key)
Removes a custom value from the request context
|
void |
setConfigService(org.springframework.extensions.config.ConfigService configService) |
void |
setCurrentObject(Resource resource)
Sets the current object
|
void |
setDependencyHandler(DependencyHandler dependencyHandler) |
void |
setEvaluatedProperties(Map<String,Serializable> properties) |
void |
setExtensibilityModuleHandler(ExtensibilityModuleHandler extensibilityModuleHandler)
This method is provided for
AbstractRequestContextFactory instances to set the
ExtensibilityModuleHandler that is required to evaluate which ExtensionModule
instances are applicable for a request. |
void |
setFileBeingProcessed(String file) |
void |
setFormatId(String formatId)
Sets the current format id
|
void |
setModel(Map<String,Object> model)
Sets the spring mvc model
|
void |
setObject(ModelObject object) |
void |
setPage(Page page)
Sets the currently executing page.
|
void |
setPassiveMode(boolean passiveMode)
This switches the
RequestContext into or out of "passive mode" (depending upon
the value of the supplied passiveMode argument). |
void |
setRenderingComponent(Component component)
Indicates that the given component is being rendered as part of
the rendering execution for this and any parent rendering context.
|
void |
setRenderMode(RenderMode mode)
This method can be called to update the
RenderMode used for rendering. |
void |
setRequest(org.springframework.web.context.request.WebRequest request) |
void |
setResponse(javax.servlet.http.HttpServletResponse response)
This method must be implemented to set the supplied
HttpServletResponse
as the response for the RequestContext. |
void |
setServletContextPath(String path)
This method should be used to set the context path of the servlet being used to process the request.
|
void |
setTemplate(TemplateInstance currentTemplate)
Sets the current executing template.
|
void |
setTheme(Theme theme)
Sets the theme
|
void |
setUri(String uri)
Sets the currently executing uri.
|
void |
setUriTokens(Map<String,String> _uriTokens)
Sets the parsed URI tokens
|
void |
setUser(org.springframework.extensions.webscripts.connector.User user)
Sets the current user for this request
|
void |
setValue(String key,
Serializable value)
Sets a custom attribute onto the request context
|
void |
setViewName(String viewName)
Spring MVC view name - generally the same as the page ID but may
be different due to URI template 'pageid' token matching.
|
void |
setWebFrameworkConfigElement(WebFrameworkConfigElement webFrameworkConfigElement)
This method is provided for
AbstractRequestContextFactory instances to set the
WebFrameworkConfigElement for the application. |
String |
toString() |
void |
updateExtendingModuleDependencies(String path,
Map<String,Object> model)
Updates the dependencies requested by extension modules for the current request.
|
getRequestContext, releasegetResourceService, getServiceRegistry, getWebFrameworkConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisExtensibilitySuppressedgetServiceRegistrypublic static final String VALUE_HEAD_TAGS
protected static AtomicLong counter
protected Map<String,Serializable> valuesMap
protected Map<String,Serializable> attributesMap
protected Page rootPage
protected Configuration siteConfiguration
protected Page currentPage
protected TemplateInstance currentTemplate
protected Resource currentResource
protected String currentFormatId
protected String storeId
protected org.springframework.extensions.webscripts.connector.User user
protected String id
protected String uri
protected String viewName
protected Theme theme
protected String method
protected String scheme
protected String contextPath
protected AbstractRequestContext(WebFrameworkServiceRegistry serviceRegistry, FrameworkBean frameworkUtil)
protected AbstractRequestContext(WebFrameworkServiceRegistry serviceRegistry)
Constructs a new Request Context. In general, you should not have to construct these by hand. They are constructed by the framework via a RequestContextFactory.
This method has been deprecated as it depends upon the deprecated static helper methods of FrameworkUtil
which have been replaced by non-static helper methods accessed by using FrameworkUtil as a Spring bean
serviceRegistry - WebFrameworkServiceRegistrypublic String getId()
RequestContextgetId in interface RequestContextpublic Configuration getSiteConfiguration()
RequestContextgetSiteConfiguration in interface RequestContextpublic String getWebsiteTitle()
RequestContextgetWebsiteTitle in interface RequestContextpublic String getPageTitle()
RequestContextgetPageTitle in interface RequestContextpublic String getUri()
getUri in interface RequestContextpublic void setUri(String uri)
RequestContextsetUri in interface RequestContextpublic String getViewName()
getViewName in interface RequestContextpublic void setViewName(String viewName)
RequestContextsetViewName in interface RequestContextviewName - Spring MVC view namepublic Page getPage()
RequestContextgetPage in interface RequestContextpublic void setPage(Page page)
RequestContextsetPage in interface RequestContextpage - Pagepublic String getPageId()
RequestContextgetPageId in interface RequestContextpublic abstract LinkBuilder getLinkBuilder()
RequestContextgetLinkBuilder in interface RequestContextpublic Page getRootPage()
RequestContextgetRootPage in interface RequestContextpublic TemplateInstance getTemplate()
RequestContextgetTemplate in interface RequestContextpublic void setTemplate(TemplateInstance currentTemplate)
RequestContextsetTemplate in interface RequestContextpublic String getTemplateId()
RequestContextgetTemplateId in interface RequestContextpublic String getCurrentObjectId()
RequestContextgetCurrentObjectId in interface RequestContextpublic void setCurrentObject(Resource resource)
RequestContextsetCurrentObject in interface RequestContextresource - Resourcepublic Resource getCurrentObject()
RequestContextgetCurrentObject in interface RequestContextpublic String getFormatId()
RequestContextgetFormatId in interface RequestContextpublic void setFormatId(String formatId)
RequestContextsetFormatId in interface RequestContextformatId - Stringpublic void setUser(org.springframework.extensions.webscripts.connector.User user)
RequestContextsetUser in interface RequestContextuser - Userpublic org.springframework.extensions.webscripts.connector.User getUser()
RequestContextgetUser in interface RequestContextpublic String getUserId()
RequestContextgetUserId in interface RequestContextpublic org.springframework.extensions.webscripts.connector.CredentialVault getCredentialVault()
Returns a CredentialVault. It the subclass has been instantiated using the deprecated
constructor then the CredentialVault will be retrieved using the deprecated static helper
method from FrameworkUtil.
If the subclass was instantiated using the preferred constructor that accepts a FrameworkBean
(adapted from the FrameworkUtil class) then the FrameworkBean will be used
instead.
Both methods effectively do the same thing, but the FrameworkBean makes use of properly
configured Spring beans so if more flexible and extensible.
getCredentialVault in interface RequestContextCredentialVaultpublic void setValue(String key, Serializable value)
RequestContextsetValue in interface RequestContextkey - Stringvalue - Serializablepublic Serializable getValue(String key)
RequestContextgetValue in interface RequestContextkey - Stringpublic void removeValue(String key)
RequestContextremoveValue in interface RequestContextkey - Stringpublic boolean hasValue(String key)
RequestContexthasValue in interface RequestContextkey - Stringpublic Map<String,Serializable> getValuesMap()
RequestContextgetValuesMap in interface RequestContextpublic String getParameter(String key)
RequestContextgetParameter in interface RequestContextkey - Stringpublic boolean hasParameter(String key)
RequestContexthasParameter in interface RequestContextkey - Stringpublic Map<String,String> getParameters()
RequestContextgetParameters in interface RequestContextpublic Component[] getRenderingComponents()
RequestContextgetRenderingComponents in interface RequestContextpublic void setRenderingComponent(Component component)
RequestContextsetRenderingComponent in interface RequestContextcomponent - The component that is being renderedpublic Theme getTheme()
getTheme in interface RequestContextpublic void setTheme(Theme theme)
RequestContextsetTheme in interface RequestContexttheme - Themepublic String getThemeId()
RequestContextgetThemeId in interface RequestContextpublic String getRequestMethod()
RequestContextgetRequestMethod in interface RequestContextpublic String getRequestScheme()
RequestContextReturns the protocol (e.g. HTTP/HTTPS) of the request.
getRequestScheme in interface RequestContextpublic ModelObjectService getObjectService()
BaseFactoryBeangetObjectService in interface RequestContextgetObjectService in class BaseFactoryBeanpublic void setModel(Map<String,Object> model)
RequestContextsetModel in interface RequestContextmodel - Mappublic Map<String,Object> getModel()
RequestContextgetModel in interface RequestContextpublic String getContextPath()
RequestContextgetContextPath in interface RequestContextpublic Serializable getAttribute(String key)
RequestContextgetAttribute in interface RequestContextkey - Stringpublic boolean hasAttribute(String key)
RequestContexthasAttribute in interface RequestContextkey - Stringpublic Map<String,Serializable> getAttributes()
RequestContextgetAttributes in interface RequestContextpublic String getHeader(String key)
RequestContextgetHeader in interface RequestContextkey - Stringpublic boolean hasHeader(String key)
RequestContexthasHeader in interface RequestContextkey - Stringpublic Map<String,String> getHeaders()
RequestContextgetHeaders in interface RequestContextpublic void setUriTokens(Map<String,String> _uriTokens)
RequestContextsetUriTokens in interface RequestContext_uriTokens - Mappublic Map<String,String> getUriTokens()
RequestContextgetUriTokens in interface RequestContextpublic org.springframework.extensions.surf.util.Content getRequestContent()
RequestContextgetRequestContent in interface RequestContextpublic final RenderMode getRenderMode()
RequestContextA RenderMode can be set by a ComponentTypes to allow different outputs
to be rendered when requesting a Component directly by specifying a "mode" request
parameter. The RenderMode defaults to RenderMode.VIEW but will be set
in the context if the "mode" request parameter is detected when a component is
directly requested to be rendered.
getRenderMode in interface RequestContextRenderMode for the current context.public final void setRenderMode(RenderMode mode)
RequestContextThis method can be called to update the RenderMode used for rendering.
The RenderMode only affects the rendering of Components. Different
RenderModes can be configured in ComponentType configuration files.
setRenderMode in interface RequestContextmode - RenderModepublic final org.springframework.web.context.request.WebRequest getRequest()
public final void setRequest(org.springframework.web.context.request.WebRequest request)
public final javax.servlet.http.HttpServletResponse getResponse()
RequestContextThis method must be implemented to return the HttpServletResponse associated
with the RequestContext. However, if the RequestContext has been
set to "passive" (via the setPassiveMode method then this should return a
FakeHttpServletResponse to ensure that rendering isn't output twice as passive
mode is used to calculate dependencies (see
TemplateInstanceRenderer).
getResponse in interface RequestContextHttpServletResponse when isPassiveMode() returns false
and a FakeHttpServletResponse when isPassiveMode() returns true.public String getContentAsString() throws UnsupportedEncodingException
RequestContextThis method must be implemented to return the result of calling getContentAsString()
method of the FakeHttpServletResponse that is returned from the getResponse()
method when the RequestContext is in passive mode.
getContentAsString in interface RequestContextUnsupportedEncodingExceptionpublic final void setResponse(javax.servlet.http.HttpServletResponse response)
RequestContextThis method must be implemented to set the supplied HttpServletResponse
as the response for the RequestContext. More importantly it should also use
the supplied HttpServletResponse to instantiate and set the FakeHttpServletResponse
to be returned by the .getResponse() method when the RequestContext
has been set to run in passive mode.
setResponse in interface RequestContextresponse - The HttpServletResponse to associate with the RequestContext.public ModelObject getObject()
public void setObject(ModelObject object)
public final void setPassiveMode(boolean passiveMode)
This switches the RequestContext into or out of "passive mode" (depending upon
the value of the supplied passiveMode argument). In "passive mode" any output generated
will be written to a FakeHttpServletResponse rather than the genuine HttpServletResponse.
This is useful so that we can generate data that we want to "save for later" (i.e. we generate all the head
ouput needed without writing it to the response stream and store it in the model to be accessed at the
appropriate time).
setPassiveMode in interface RequestContextpassiveMode - booleanpublic final boolean isPassiveMode()
Indicates whether or not the RequestContext is currently in "passive mode". In "passive mode" any
output is written to a FakeHttpServletResponse rather than the genuine HttpServletResponse.
Output written to the FakeHttpServletResponse can be retrieved by calling the getContentAsString()
method.
isPassiveMode in interface RequestContexttrue if the RequestContext has been set to run in passive mode
and false otherwise.public String getServletContextPath()
Returns the context path of the servlet being used to process the request. This path does NOT
include the application context, just the servlet context. This may return null if not set, although
this should be set by the ServletRequestContextFactory there is no guarantee that it will have been
set depending upon the Spring application context.
getServletContextPath in interface RequestContextpublic void setServletContextPath(String path)
This method should be used to set the context path of the servlet being used to process the request.
It has been provided for use by the ServletRequestContextFactory but could be used by other classes, however
care should be taken to ensure that it is called with the correct value.
setServletContextPath in interface RequestContextpublic org.springframework.extensions.surf.extensibility.ExtensibilityModel openExtensibilityModel()
openExtensibilityModel in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic void closeExtensibilityModel(org.springframework.extensions.surf.extensibility.ExtensibilityModel model,
Writer out)
closeExtensibilityModel in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic org.springframework.extensions.surf.extensibility.ExtensibilityModel getCurrentExtensibilityModel()
getCurrentExtensibilityModel in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic void setEvaluatedProperties(Map<String,Serializable> properties)
setEvaluatedProperties in interface RequestContextpublic Map<String,Serializable> getEvaluatedProperties()
getEvaluatedProperties in interface RequestContextpublic void setDependencyHandler(DependencyHandler dependencyHandler)
setDependencyHandler in interface RequestContextpublic void setExtensibilityModuleHandler(ExtensibilityModuleHandler extensibilityModuleHandler)
This method is provided for AbstractRequestContextFactory instances to set the
ExtensibilityModuleHandler that is required to evaluate which ExtensionModule
instances are applicable for a request.
setExtensibilityModuleHandler in interface RequestContextextensibilityModuleHandler - A ExtensibilityModuleHandler to be used by this request context.public void setWebFrameworkConfigElement(WebFrameworkConfigElement webFrameworkConfigElement)
This method is provided for AbstractRequestContextFactory instances to set the
WebFrameworkConfigElement for the application.
setWebFrameworkConfigElement in interface RequestContextwebFrameworkConfigElement - WebFrameworkConfigElementpublic void setConfigService(org.springframework.extensions.config.ConfigService configService)
setConfigService in interface RequestContextpublic List<ExtensionModule> getEvaluatedModules()
Retrieve the list of ExtensionModule instances that have been evaluated as applicable
for the current request. If this list has not yet been populated then use the ExtensibilityModuleHandler
configured in the Spring application context to evaluate them.
getEvaluatedModules in interface RequestContextExtensionModule instances that are applicable to the current request.public void addJSDependency(String dependency)
RequestContextThis method allows JavaScript resources to be added into the same list of dependencies added to by extension modules. This has only been added as a workaround for the migration of applications from double-pass to single-pass WebScript processing. This allows both WebScripts with and without .head.ftl files to add dependencies.
addJSDependency in interface RequestContextdependency - The JavaScript resource to add as a dependency.public void addCssDependency(String dependency, String media)
RequestContextThis method allows CSS resources to be added into the same list of dependencies added to by extension modules. This has only been added as a workaround for the migration of applications from double-pass to single-pass WebScript processing. This allows both WebScripts with and without .head.ftl files to add dependencies.
addCssDependency in interface RequestContextdependency - The CSS resource to add as a dependency.public String getExtensionDependencies()
Returns the dependencies requested by extension modules as a formatted String. The dependency requests are processed
by the associated DependencyHandler to take advantage of caching and optional checksum identification and
CSS data image generation.
getExtensionDependencies in interface RequestContextpublic void updateExtendingModuleDependencies(String path, Map<String,Object> model)
Updates the dependencies requested by extension modules for the current request.
updateExtendingModuleDependencies in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypath - The current path being processed.model - The current model.public List<String> getExtendingModuleFiles(String pathBeingProcessed)
Retrieves a list of files that should be provided by the evaluated modules.
getExtendingModuleFiles in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic boolean dependencyAlreadyRequested(String dep)
Checks whether or not the supplied dependency has already been requested.
dependencyAlreadyRequested in interface RequestContextdep - The path to the dependency to check.true if the dependency has already been requested and false otherwise.public void markDependencyAsRequested(String dep)
This method can be used to indicate that the supplied dependency has been requested by other means.
This is provided to ensure that dependencies requested directly on the output stream (e.g. via the
JavaScriptDependencyDirective, CssDependencyDirective, etc.)
markDependencyAsRequested in interface RequestContextdep - The path to the dependency to mark as requested.public String getFileBeingProcessed()
getFileBeingProcessed in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic void setFileBeingProcessed(String file)
setFileBeingProcessed in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic SubComponent.RenderData getSubComponentDebugData(String id)
RequestContextRetrieves the SubComponent.RenderData for the specified SubComponent. This will contain all the information
about the SubComponentEvaluation that ultimately determined the content of the SubComponent and
the URI, properties, etc. that were used.
getSubComponentDebugData in interface RequestContextid - The identifier of the SubComponent to retrieve the SubComponent.RenderData for.SubComponent.RenderData for the requested SubComponent or null if it could not be found.public void addSubComponentDebugData(String id, SubComponent.RenderData data)
RequestContextAdds the SubComponent.RenderData for the specified SubComponent. This will contain all the information
about the SubComponentEvaluation that ultimately determined the content of the SubComponent and
the URI, properties, etc. that were used.
addSubComponentDebugData in interface RequestContextid - The identifier of the SubComponent to retrieve the SubComponent.RenderData for.data - The SubComponent.RenderData to add.public ResourceBundle getCachedExtendedBundle(String webScriptId)
Checks the cache 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.
getCachedExtendedBundle in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitywebScriptId - The id of the WebScript to retrieve the extended bundle for.null if the bundle has not previously been cached.public void addExtensionBundleToCache(String webScriptId, org.springframework.extensions.webscripts.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.
addExtensionBundleToCache in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitywebScriptId - The id of the WebScript to cache the extended bundle against.extensionBundle - The extended bundle to cache.public org.springframework.extensions.webscripts.ScriptConfigModel getExtendedScriptConfigModel(String xmlConfig)
Creates a new ExtendedScriptConfigModel instance using the local configuration generated for this request.
If configuration for the request will be generated if it does not yet exist. It is likely that this method will be
called multiple times within the context of a single request and although the configuration containers will always
be the same a new ExtendedScriptConfigModel instance will always be created as the the supplied xmlConfig
string could be different for each call (because each WebScript invoked in the request will supply different
configuration.
getExtendedScriptConfigModel in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic org.springframework.extensions.webscripts.TemplateConfigModel getExtendedTemplateConfigModel(String xmlConfig)
Creates a new TemplateConfigModel instance using the local configuration generated for this request.
If configuration for the request will be generated if it does not yet exist. It is likely that this method will be
called multiple times within the context of a single request and although the configuration containers will always
be the same a new TemplateConfigModel instance will always be created as the the supplied xmlConfig
string could be different for each call (because each WebScript invoked in the request will supply different
configuration.
getExtendedTemplateConfigModel in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilitypublic void addExtensibilityDirectives(Map<String,Object> freeMarkerModel, org.springframework.extensions.surf.extensibility.ExtensibilityModel extModel)
addExtensibilityDirectives in interface org.springframework.extensions.surf.extensibility.HandlesExtensibilityCopyright © 2005–2016 Alfresco Software. All rights reserved.