Milyn-Smooks Version 0.4

org.milyn.delivery.trans
Interface TransUnit

All Superinterfaces:
ContentDeliveryUnit, ElementVisitor
All Known Subinterfaces:
TransUnitPrototype
All Known Implementing Classes:
AbstractTransUnit

public interface TransUnit
extends ElementVisitor

Transformation unit interface.

Implementations of this interface are applied to the content during the Transformation phase.

TransUnit implementations should contain transformation logic to perform a discreet operation on the element being visited. They should try not perform to much within the scope of a single TransUnit.

Multiple TransUnit implementations can be applied to a single element. The order in which they are applied is determined by the CDRDef specificity. See CDRDefSortComparator.

TransUnit implementations should be stateless objects. A single instance is created and used to visit all relevant Document objects. Statefull TransUnit implementations should be implemented through the TransUnitPrototype interface.

All implementations must contain a public constructor that takes a CDRDef instance as a parameter. For this reason consider extending AbstractTransUnit for convienience (your IDE should auto-add the constructor).

See Delivery Overview.

Author:
tfennelly
See Also:
TransUnitPrototype, ContentDeliveryUnitCreator

Methods inherited from interface org.milyn.delivery.ElementVisitor
visit, visitBefore
 
Methods inherited from interface org.milyn.delivery.ContentDeliveryUnit
getDetailDescription, getShortDescription
 


Milyn-Smooks Version 0.4