public class RootTransform extends Transform
This root transform class is designed to accept one or more source objects that were specified in the UI's current selection. When an instance of this class is created, the initalize method must be called otherwise the instance is unusable. This transform has a predefined structure which has three phases:
The client can add multiple rules or transforms to the initialization phase or the finalization phase. The client can provide a main transform or specify null in which case a default main transform will be created so that multiple transforms can be added to it. The client also has a choice of configuring this root transform so that the main transform can either be executed once with the list of selected objects or be executed for each selected object.
CODE_OTHER, CODE_PROPERTY, CODE_SOURCE, CODE_TARGET, CODE_TARGET_CONTAINER, PROGRESS_MONITOR_WORK_UNITS
Constructor and Description |
---|
RootTransform(ITransformationDescriptor descriptor)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addToFinal(AbstractTransformElement transformElement)
Add a transform element to the finalization phase.
|
void |
addToInit(AbstractTransformElement transformElement)
Add a transform element to the initialization phase.
|
Transform |
getMainTransform()
Retrieve the main transform.
|
Transform |
initialize(Transform aTransform,
boolean acceptList)
Initialize the root transform to create the three phase structure.
|
add, add, canAccept, execute, findTransform, getElementIndex, getElements, getElements, handle, internalExecute, registerTransform, remove, toString
createContext, getProgressMonitorWorkUnits, getTransformationDescriptor, getWorkUnitsPropertyId, validateContext
getAcceptCondition, getDescription, getId, getName, getProgressMonitor, setAcceptCondition, setDescription, setId, setName
public RootTransform(ITransformationDescriptor descriptor)
descriptor
- A transformation descriptor.public void addToFinal(AbstractTransformElement transformElement)
transformElement
- A transform element to execute during the finalization phase.public void addToInit(AbstractTransformElement transformElement)
transformElement
- A transform element to execute during the initialization phase.public Transform getMainTransform()
public Transform initialize(Transform aTransform, boolean acceptList)
aTransform
- The main transform to execute.acceptList
- Indicate whether the main transform wants a list or single elements.