public class SmooksResourceConfigurationStore extends Object
SmooksResourceConfiguration context store.
Stores the SmooksResourceConfigurations
for a given container context in the form of
SmooksResourceConfigurationList entries. Also maintains
a "default" config list for the context.| Constructor and Description |
|---|
SmooksResourceConfigurationStore(ApplicationContext applicationContext)
Public constructor.
|
SmooksResourceConfigurationStore(ApplicationContext applicationContext,
boolean registerInstalledResources) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSmooksResourceConfigurationList(SmooksResourceConfigurationList resourceList) |
void |
close()
Close this resource configuration store,
uninitializing
all ContentHandlers allocated from this store instance. |
ContentHandlerFactory |
getContentHandlerFactory(String type)
Get the
ContentHandlerFactory for a resource based on the
supplied resource type. |
SmooksResourceConfiguration |
getGlobalParams() |
List<Object> |
getInitializedObjects() |
Object |
getObject(SmooksResourceConfiguration resourceConfig)
Load a Java Object defined by the supplied SmooksResourceConfiguration instance.
|
Iterator<SmooksResourceConfigurationList> |
getSmooksResourceConfigurationLists()
Get all the added SmooksResourceConfigurationList instances added on this store.
|
SmooksResourceConfiguration[] |
getSmooksResourceConfigurations(ProfileSet profileSet)
Get all the SmooksResourceConfiguration entries registered on this context store
for the specified profile set.
|
SmooksResourceConfigurationList |
getUserDefinedResourceList() |
void |
load(BufferedReader cdrlLoadList)
Load all .cdrl files listed in the BufferedReader stream.
|
List<SmooksResourceConfiguration> |
lookupResource(ConfigSearch configSearch) |
void |
registerResource(SmooksResourceConfiguration resourceConfig)
Register a
SmooksResourceConfiguration on this context store. |
SmooksResourceConfigurationList |
registerResources(String baseURI,
InputStream resourceConfigStream) |
void |
removeShutdownHook()
Deprecated.
Smooks no longer uses shutdown hooks. The containing application
is responsible for calling
Smooks.close(). |
void |
setNamespaces() |
public SmooksResourceConfigurationStore(ApplicationContext applicationContext)
applicationContext - Container context in which this store lives.public SmooksResourceConfigurationStore(ApplicationContext applicationContext, boolean registerInstalledResources)
public void removeShutdownHook()
Smooks.close().public void load(BufferedReader cdrlLoadList) throws IOException
cdrlLoadList - BufferedReader cdrl list - one cdrl def per line.IOException - Error reading list buffer.public SmooksResourceConfigurationList registerResources(String baseURI, InputStream resourceConfigStream) throws SAXException, IOException, URISyntaxException
public void registerResource(SmooksResourceConfiguration resourceConfig)
SmooksResourceConfiguration on this context store.
The config gets added to the default resource list.resourceConfig - The Content Delivery Resource definition to be registered.public void addSmooksResourceConfigurationList(SmooksResourceConfigurationList resourceList)
public Iterator<SmooksResourceConfigurationList> getSmooksResourceConfigurationLists()
public SmooksResourceConfiguration[] getSmooksResourceConfigurations(ProfileSet profileSet)
profileSet - The profile set against which to lookup.public Object getObject(SmooksResourceConfiguration resourceConfig)
resourceConfig - SmooksResourceConfiguration instance.public SmooksResourceConfiguration getGlobalParams()
public ContentHandlerFactory getContentHandlerFactory(String type) throws UnsupportedContentHandlerTypeException
ContentHandlerFactory for a resource based on the
supplied resource type.
Note that ContentHandlerFactory implementations must be configured under a selector value of "cdu-creator".type - ContentHandlerFactory type e.g. "class", "xsl" etc.ContentHandlerFactory for the resource.UnsupportedContentHandlerTypeException - No ContentHandlerFactory
registered for the specified resource type.public void close()
uninitializing
all ContentHandlers allocated from this store instance.public void setNamespaces()
throws org.jaxen.saxpath.SAXPathException
org.jaxen.saxpath.SAXPathExceptionpublic List<SmooksResourceConfiguration> lookupResource(ConfigSearch configSearch)
public SmooksResourceConfigurationList getUserDefinedResourceList()
Copyright © 2015. All rights reserved.