|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.xsnapshot.spring.XSnapshotRegistryFactoryBean
A Spring Factory Bean that creates a XSnapshotRegistry based on its configured settings. This is the preferred way to configure a XSnapshotRegistry as the programmer can then take advantage of Spring's IoC container to configure any custom transformers and snapshot helpers, as well as to inject the registry to any of the beans that depend on it.
Parent Registries may be specified via the parentRegistries property. They are applied in the order they appear in the list - thus later registries' mappings will override earlier ones.
A number of xsnapshot properties files can be specified using the "configLocations" property, using Spring's Resource abstraction. These will be applied after the parent registries have been configured, and in the order they appear in the list.
individual custom transformers and snapshot helpers can be specified through the transformerMappings and helperMappings properties. These are applied last and therefore would override any previously defined transformers/helpers.
Constructor Summary | |
XSnapshotRegistryFactoryBean()
|
Method Summary | |
void |
afterPropertiesSet()
|
Object |
getObject()
|
Class |
getObjectType()
|
boolean |
isSingleton()
|
void |
setConfigLocations(org.springframework.core.io.Resource[] configLocations)
Specifies list of xsnapshot properties resources from which to read in snapshot, helper and transformer mappings. |
void |
setHelperMappings(Map helperMappings)
Specifies custom helper mappings to add to the registry as a map of Class->net.sf.xsnapshot.SnapshotHelper. |
void |
setParentRegistries(XSnapshotRegistry[] parentRegistries)
Specifies a list of xsnapshot registries from which this registry should inherit snapshot, helper and transformer mappings. |
void |
setTransformerMappings(Map transformerMappings)
Specifies transformer mappings to add to the registry as a map of String->net.sf.xsnapshot.Transformer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XSnapshotRegistryFactoryBean()
Method Detail |
public void afterPropertiesSet() throws XSnapshotConfigurationException, IOException, org.apache.commons.configuration.ConfigurationException
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
XSnapshotConfigurationException
IOException
org.apache.commons.configuration.ConfigurationException
public Object getObject()
getObject
in interface org.springframework.beans.factory.FactoryBean
public Class getObjectType()
getObjectType
in interface org.springframework.beans.factory.FactoryBean
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean
public void setTransformerMappings(Map transformerMappings)
transformerMappings
- The transformerMappings to set.public void setHelperMappings(Map helperMappings)
helperMappings
- The helperMappings to set.public void setConfigLocations(org.springframework.core.io.Resource[] configLocations)
configLocations
- The configLocations to set.public void setParentRegistries(XSnapshotRegistry[] parentRegistries)
parentRegistries
- The parentRegistries to set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |