com.im.df.impl.db.api
Interface DFNewTypeChangeProcessor<N extends DFItem,T extends ItemPersistentInfo>
public interface DFNewTypeChangeProcessor<N extends DFItem,T extends ItemPersistentInfo>
Interface that defines the events that have to be applied to the DIF model on
receipt of a notification that a new DFItem has been added by IJC server.
Typically a DFNewType implementation must also implement this interface so that
the changes can be applied to the model.
The process is as follows:
1. Create DFNewType instance
2. DFNewType instance defines the operations that are to be performed by IJC server
3. Operations are executed by IJC server.
4. A list of @{link ModelChangeDescription}s are received by the client
5. The changes are applied to the DIF model
This interface is responsible for step 5 of this process. e.g. it finishes off
the work the DFNewType instance created in step 1 started. A different instance will
be involed in processing step 5, so all state must be supplied through the arguments
of the methods e.g. the DTO describing the change.
applyChangeToModel
N applyChangeToModel(T dto,
DFEnvironmentRW env)
- Apply the change to the DIF model.
The change will be the result of asking IJC server to add a new DFItem which
will result in propagation of the change description to IJC clients. This
method is responsible for adding the new DFItem to the DIF model. Any changes
resulting from previous operations will already have been applied to the DIF
model. e.g. for a create new field new type the model will already have been
updated so that it knows about the new column.
- Parameters:
dto - The description of the new DFItem that is to be added to the model.env - Environment for feedback etc.
- Returns:
- The newly created DFItem