public abstract class AbstractPolicy extends IAdaptable.Bound.Impl<IVisualPart<? extends javafx.scene.Node>> implements IPolicy
IPolicy that is transactional.adaptableadaptableIAdaptable.Bound.Impl<T extends IAdaptable>| Constructor and Description |
|---|
AbstractPolicy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkInitialized()
Checks whether this
AbstractPolicy is initialized and throws an
IllegalStateException if not. |
ITransactionalOperation |
commit()
Returns an
ITransactionalOperation that performs all
manipulations applied by the policy since the previous init()
call. |
protected abstract ITransactionalOperation |
createOperation()
Creates an
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods. |
protected ITransactionalOperation |
getOperation()
Returns the
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods. |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
protected boolean |
isInitialized()
Returns whether this
AbstractPolicy is initialized or not. |
protected void |
locallyExecuteOperation()
Locally executes the
ITransactionalOperation that is updated by
this policy, i.e. not on the operation history. |
void |
rollback()
Puts back this policy into an uninitialized state, reverting any changes
that have been applied via the policy's work methods since the preceding
init() call. |
adaptableProperty, getAdaptable, setAdaptableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadaptableProperty, getAdaptable, setAdaptableprotected void checkInitialized()
AbstractPolicy is initialized and throws an
IllegalStateException if not.public ITransactionalOperation commit()
ITransactionalOperation that performs all
manipulations applied by the policy since the previous init()
call.commit in interface IPolicyITransactionalOperation that performs all
manipulations applied by the policy since the last
init() call.protected abstract ITransactionalOperation createOperation()
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods. The created operation should allow for
local execution at each time.ITransactionalOperation to encapsulate all applied
changes.protected final ITransactionalOperation getOperation()
ITransactionalOperation that is used to encapsulate
the changes that are applied by this AbstractPolicy through its
"work" methods.ITransactionalOperation to encapsulate all applied
changes.public void init()
IllegalStateException, as well as re-initializing before
committing or rolling back.protected boolean isInitialized()
AbstractPolicy is initialized or not.true if this AbstractPolicy is initialized,
false otherwise.protected void locallyExecuteOperation()
ITransactionalOperation that is updated by
this policy, i.e. not on the operation history. Maybe used in the "work"
operations of subclasses.Copyright (c) 2014, 2016 itemis AG and others. All rights reserved.