VR - The visual root node of the UI toolkit used, e.g.
javafx.scene.Node in case of JavaFX.public class DeletionPolicy<VR> extends AbstractPolicy<VR> implements ITransactional
DeletionPolicy is an ITransactional
AbstractPolicy that handles the deletion of existing
IContentParts via the ContentPolicy.ITransactional.NoOperation, ITransactional.UnexecutableOperation| Modifier and Type | Field and Description |
|---|---|
protected boolean |
initialized
Stores the initialized flag for this policy, i.e.
|
NOOP, UNEXECUTABLE| Constructor and Description |
|---|
DeletionPolicy() |
| Modifier and Type | Method and Description |
|---|---|
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the last ITransactional.init() call. |
void |
delete(java.util.Collection<IContentPart<VR,? extends VR>> contentPartsToDelete)
Marks the given
IContentParts for deletion. |
void |
delete(IContentPart<VR,? extends VR>... contentPartsToDelete)
Marks the given
IContentParts for deletion. |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
commit, disableRefreshVisuals, enableRefreshVisuals, getAdaptable, getHost, init, setAdaptablepublic ITransactionalOperation commit()
ITransactionalITransactionalOperation that performs all
manipulations applied by the policy since the last ITransactional.init() call.
When called multiple times in sequence, only the first call will yield an
operation, the subsequent calls will yield null.
You can return ITransactional.NOOP if no changes have to be applied. The domain
will filter out all ITransactional.NOOPs before their execution.
You can return ITransactional.UNEXECUTABLE to prevent any composite operation
that contains the ITransactional.UNEXECUTABLE from execution.
commit in interface ITransactionalITransactionalOperation that performs all
manipulations applied by the policy since the last
ITransactional.init() call.public void delete(java.util.Collection<IContentPart<VR,? extends VR>> contentPartsToDelete)
IContentParts for deletion.contentPartsToDelete - The IContentParts to mark for deletion.public void delete(IContentPart<VR,? extends VR>... contentPartsToDelete)
IContentParts for deletion.contentPartsToDelete - The IContentParts to mark for deletion.public void init()
ITransactionalIllegalStateException. It is safe to call ITransactional.init()
multiple times in sequence.init in interface ITransactionalCopyright (c) 2014 itemis AG and others. All rights reserved.