org.dellroad.stuff.pobj
Class SpringXSLPersistentObjectSchemaUpdate<T>

java.lang.Object
  extended by org.dellroad.stuff.schema.AbstractSchemaUpdate<T>
      extended by org.dellroad.stuff.schema.AbstractSpringSchemaUpdate<PersistentFileTransaction>
          extended by org.dellroad.stuff.pobj.SpringPersistentObjectSchemaUpdate<T>
              extended by 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.


Field Summary
 
Fields inherited from class org.dellroad.stuff.schema.AbstractSpringSchemaUpdate
beanFactory, beanName
 
Constructor Summary
SpringXSLPersistentObjectSchemaUpdate()
           
 
Method Summary
 void afterPropertiesSet()
          Configures the update name and required predecessors based on the Spring bean's name and BeanFactory dependencies.
 void apply(PersistentFileTransaction transaction)
          Apply this update to the given transaction.
 Resource getTransform()
           
 void setParameters(Properties properties)
          Configure XSLT parameters.
 void setTransform(Resource transform)
          Configure the XSLT transform as a resource.
 
Methods inherited from class org.dellroad.stuff.pobj.SpringPersistentObjectSchemaUpdate
getDatabaseActions
 
Methods inherited from class org.dellroad.stuff.schema.AbstractSpringSchemaUpdate
setBeanFactory, setBeanName, setRequiredPredecessorsFromDependencies
 
Methods inherited from class org.dellroad.stuff.schema.AbstractSchemaUpdate
getName, getRequiredPredecessors, isSingleAction, setName, setRequiredPredecessors, setSingleAction, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SpringXSLPersistentObjectSchemaUpdate

public SpringXSLPersistentObjectSchemaUpdate()
Method Detail

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