public class AutowireService extends Object
This class is configured as a Spring bean in the spring-surf-services-context.xml file to
provide a set of preset configurations that can be selected through the <autowire> element in
the Spring Surf configuration of the consuming application. The class sets up the WebScript and template
search path services and the default MultiObjectPersister service. Be aware that using this service will
have the effect of overriding some elements of the Spring application context defined in the XML configuration
files.
The following modes are available:
The following runtimes are available:
| Constructor and Description |
|---|
AutowireService() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureMode(WebFrameworkConfigElement webFrameworkConfig)
This method configures the autowire mode.
|
void |
configureRuntime(WebFrameworkConfigElement webFrameworkConfig,
MultiObjectPersister multiObjectPersister)
This method configures the runtime based on the id provided.
|
List<ModelObjectPersister> |
getAlfrescoPersisterPaths() |
List<org.springframework.extensions.webscripts.Store> |
getAlfrescoTemplatePaths() |
List<org.springframework.extensions.webscripts.Store> |
getAlfrescoWebScriptPaths() |
List<ModelObjectPersister> |
getCommonPersisterPaths() |
List<org.springframework.extensions.webscripts.Store> |
getCommonTemplatePaths() |
List<org.springframework.extensions.webscripts.Store> |
getCommonWebScriptPaths() |
List<ModelObjectPersister> |
getLocalPersisterPaths() |
List<org.springframework.extensions.webscripts.Store> |
getLocalTemplatePaths() |
List<org.springframework.extensions.webscripts.Store> |
getLocalWebScriptPaths() |
org.springframework.extensions.webscripts.processor.JSScriptProcessor |
getTemplatesScriptProcessor() |
org.springframework.extensions.webscripts.SearchPath |
getTemplatesSearchPath() |
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor |
getTemplatesTemplateProcessor() |
List<ModelObjectPersister> |
getWebInfPersisterPaths() |
List<org.springframework.extensions.webscripts.Store> |
getWebInfTemplatePaths() |
List<org.springframework.extensions.webscripts.Store> |
getWebInfWebScriptPaths() |
org.springframework.extensions.webscripts.processor.JSScriptProcessor |
getWebscriptsScriptProcessor() |
org.springframework.extensions.webscripts.SearchPath |
getWebScriptsSearchPath() |
org.springframework.extensions.webscripts.processor.FTLTemplateProcessor |
getWebscriptsTemplateProcessor() |
protected void |
reportPersister(ModelObjectPersister persister)
Logs info-level persister configuration info during autowire startup
|
protected void |
reportSearchPath(org.springframework.extensions.webscripts.SearchPath searchPath)
Logs info-level searchpath configuration info during autowire startup
|
void |
setAlfrescoPersisterPaths(List<ModelObjectPersister> alfrescoPersisterPaths) |
void |
setAlfrescoTemplatePaths(List<org.springframework.extensions.webscripts.Store> alfrescoTemplatePaths) |
void |
setAlfrescoWebScriptPaths(List<org.springframework.extensions.webscripts.Store> alfrescoWebScriptPaths) |
void |
setCommonPersisterPaths(List<ModelObjectPersister> commonPersisterPaths) |
void |
setCommonTemplatePaths(List<org.springframework.extensions.webscripts.Store> commonTemplatePaths) |
void |
setCommonWebScriptPaths(List<org.springframework.extensions.webscripts.Store> commonWebScriptPaths) |
void |
setLocalPersisterPaths(List<ModelObjectPersister> localPersisterPaths) |
void |
setLocalTemplatePaths(List<org.springframework.extensions.webscripts.Store> localTemplatePaths) |
void |
setLocalWebScriptPaths(List<org.springframework.extensions.webscripts.Store> localWebScriptPaths) |
void |
setTemplatesScriptProcessor(org.springframework.extensions.webscripts.processor.JSScriptProcessor templatesScriptProcessor) |
void |
setTemplatesSearchPath(org.springframework.extensions.webscripts.SearchPath templatesSearchPath) |
void |
setTemplatesTemplateProcessor(org.springframework.extensions.webscripts.processor.FTLTemplateProcessor templatesTemplateProcessor) |
void |
setWebInfPersisterPaths(List<ModelObjectPersister> webInfPersisterPaths) |
void |
setWebInfTemplatePaths(List<org.springframework.extensions.webscripts.Store> webInfTemplatePaths) |
void |
setWebInfWebScriptPaths(List<org.springframework.extensions.webscripts.Store> webInfWebScriptPaths) |
void |
setWebscriptsScriptProcessor(org.springframework.extensions.webscripts.processor.JSScriptProcessor webscriptsScriptProcessor) |
void |
setWebScriptsSearchPath(org.springframework.extensions.webscripts.SearchPath webScriptsSearchPath) |
void |
setWebscriptsTemplateProcessor(org.springframework.extensions.webscripts.processor.FTLTemplateProcessor webscriptsTemplateProcessor) |
public void configureMode(WebFrameworkConfigElement webFrameworkConfig) throws Exception
This method configures the autowire mode. In the default Spring Surf application context there are only 2 available mode: "development" and "production". Each mode is optimised as its name implies.
webFrameworkConfig - WebFrameworkConfigElementExceptionpublic void configureRuntime(WebFrameworkConfigElement webFrameworkConfig, MultiObjectPersister multiObjectPersister) throws Exception
This method configures the runtime based on the id provided. In the default Spring Surf autowire application context configuration there are 4 different available runtimes:
These runtime options are listed in from most basic to most comprehensive. The more comprehensive the runtime
the greater the number of Stores in the SearchPaths and the greater the number of
ModelObjectPersisters in the MultiObjectPersister. Each runtime contains the Stores
and ModelObjectPersisters of those that precede it in the list. The exception to this rule is the
"alfresco" runtime which currently means to use the application context configured SearchPaths and
ModelObjectPersisters.
webFrameworkConfig - WebFrameworkConfigElementmultiObjectPersister - MultiObjectPersisterException - Thrown if the bean has not been configured with "webScriptsSearchPath", "templatesSearchPath" and
"multiObjectPersister" properties.protected void reportSearchPath(org.springframework.extensions.webscripts.SearchPath searchPath)
searchPath - SearchPathprotected void reportPersister(ModelObjectPersister persister)
persister - ModelObjectPersisterpublic void setCommonWebScriptPaths(List<org.springframework.extensions.webscripts.Store> commonWebScriptPaths)
public void setAlfrescoWebScriptPaths(List<org.springframework.extensions.webscripts.Store> alfrescoWebScriptPaths)
public void setWebInfWebScriptPaths(List<org.springframework.extensions.webscripts.Store> webInfWebScriptPaths)
public void setLocalWebScriptPaths(List<org.springframework.extensions.webscripts.Store> localWebScriptPaths)
public void setCommonTemplatePaths(List<org.springframework.extensions.webscripts.Store> commonTemplatePaths)
public void setAlfrescoTemplatePaths(List<org.springframework.extensions.webscripts.Store> alfrescoTemplatePaths)
public void setWebInfTemplatePaths(List<org.springframework.extensions.webscripts.Store> webInfTemplatePaths)
public void setLocalTemplatePaths(List<org.springframework.extensions.webscripts.Store> localTemplatePaths)
public void setCommonPersisterPaths(List<ModelObjectPersister> commonPersisterPaths)
public void setAlfrescoPersisterPaths(List<ModelObjectPersister> alfrescoPersisterPaths)
public void setWebInfPersisterPaths(List<ModelObjectPersister> webInfPersisterPaths)
public void setLocalPersisterPaths(List<ModelObjectPersister> localPersisterPaths)
public void setWebscriptsTemplateProcessor(org.springframework.extensions.webscripts.processor.FTLTemplateProcessor webscriptsTemplateProcessor)
public void setWebscriptsScriptProcessor(org.springframework.extensions.webscripts.processor.JSScriptProcessor webscriptsScriptProcessor)
public void setTemplatesTemplateProcessor(org.springframework.extensions.webscripts.processor.FTLTemplateProcessor templatesTemplateProcessor)
public void setTemplatesScriptProcessor(org.springframework.extensions.webscripts.processor.JSScriptProcessor templatesScriptProcessor)
public void setWebScriptsSearchPath(org.springframework.extensions.webscripts.SearchPath webScriptsSearchPath)
public void setTemplatesSearchPath(org.springframework.extensions.webscripts.SearchPath templatesSearchPath)
public org.springframework.extensions.webscripts.SearchPath getWebScriptsSearchPath()
public org.springframework.extensions.webscripts.SearchPath getTemplatesSearchPath()
public List<org.springframework.extensions.webscripts.Store> getCommonWebScriptPaths()
public List<org.springframework.extensions.webscripts.Store> getAlfrescoWebScriptPaths()
public List<org.springframework.extensions.webscripts.Store> getWebInfWebScriptPaths()
public List<org.springframework.extensions.webscripts.Store> getLocalWebScriptPaths()
public List<org.springframework.extensions.webscripts.Store> getCommonTemplatePaths()
public List<org.springframework.extensions.webscripts.Store> getAlfrescoTemplatePaths()
public List<org.springframework.extensions.webscripts.Store> getWebInfTemplatePaths()
public List<org.springframework.extensions.webscripts.Store> getLocalTemplatePaths()
public List<ModelObjectPersister> getCommonPersisterPaths()
public List<ModelObjectPersister> getAlfrescoPersisterPaths()
public List<ModelObjectPersister> getWebInfPersisterPaths()
public List<ModelObjectPersister> getLocalPersisterPaths()
public org.springframework.extensions.webscripts.processor.FTLTemplateProcessor getWebscriptsTemplateProcessor()
public org.springframework.extensions.webscripts.processor.JSScriptProcessor getWebscriptsScriptProcessor()
public org.springframework.extensions.webscripts.processor.FTLTemplateProcessor getTemplatesTemplateProcessor()
public org.springframework.extensions.webscripts.processor.JSScriptProcessor getTemplatesScriptProcessor()
Copyright © 2005–2016 Alfresco Software. All rights reserved.