org.dellroad.stuff.pobj
Class SpringXSLPersistentObjectSchemaUpdate<T>
java.lang.Object
org.dellroad.stuff.schema.AbstractSchemaUpdate<T>
org.dellroad.stuff.schema.AbstractSpringSchemaUpdate<PersistentFileTransaction>
org.dellroad.stuff.pobj.SpringPersistentObjectSchemaUpdate<T>
org.dellroad.stuff.pobj.SpringXSLPersistentObjectSchemaUpdate<T>
- Type Parameters:
T - type of the persistent object
- All Implemented Interfaces:
- DatabaseAction<PersistentFileTransaction>, SchemaUpdate<PersistentFileTransaction>, BeanFactoryAware, BeanNameAware, InitializingBean
public class SpringXSLPersistentObjectSchemaUpdate<T>
- extends SpringPersistentObjectSchemaUpdate<T>
SpringPersistentObjectSchemaUpdate that applies a configured XSL transform to the XML form of the persistent object.
The transform property is required.
See SpringPersistentObjectSchemaUpdater for a Spring configuration example.
SpringXSLPersistentObjectSchemaUpdate
public SpringXSLPersistentObjectSchemaUpdate()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Description copied from class:
AbstractSpringSchemaUpdate
- Configures the update name and required predecessors based on the Spring bean's name and
BeanFactory dependencies.
- Specified by:
afterPropertiesSet in interface InitializingBean- Overrides:
afterPropertiesSet in class AbstractSpringSchemaUpdate<PersistentFileTransaction>
- Throws:
Exception
setTransform
public void setTransform(Resource transform)
- Configure the XSLT transform as a resource.
getTransform
public Resource getTransform()
setParameters
public void setParameters(Properties properties)
- Configure XSLT parameters. This is an optional property.
apply
public void apply(PersistentFileTransaction transaction)
- Apply this update to the given transaction.
- Specified by:
apply in interface DatabaseAction<PersistentFileTransaction>- Specified by:
apply in class SpringPersistentObjectSchemaUpdate<T>
- Parameters:
transaction - open transaction