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)Add a  SmooksResourceConfigurationListto this store. | 
| void | close()Close this resource configuration store,  uninitializingallContentHandlersallocated from this store instance. | 
| ContentHandlerFactory | getContentHandlerFactory(String type)Get the  ContentHandlerFactoryfor 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  SmooksResourceConfigurationon this context store. | 
| SmooksResourceConfigurationList | registerResources(String baseURI,
                 InputStream resourceConfigStream)Register the set of resources specified in the supplied XML configuration
 stream. | 
| 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
baseURI - The base URI to be associated with the configuration stream.resourceConfigStream - XML resource configuration stream.SAXException - Error parsing the resource stream.IOException - Error reading resource stream.URISyntaxExceptionSmooksResourceConfigurationpublic 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)
SmooksResourceConfigurationList to this store.resourceList - All the SmooksResourceConfigurationList instances added on this store.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 © 2020. All rights reserved.