public interface ITransactional
ITransactional
policy consists of an initialization part (
init()
) and a commit part (commit()
). The policy can be
used to manipulate its host in-between those calls. The policy returns an
IUndoableOperation
upon commit()
which performs the
manipulations.
Note, that an ITransactional
policy is safe against multiple
initialization/commitment in sequence. However, only the first
commit()
call will return an operation (subsequent calls will return
null
).
If an ITransactional
policy is not initialized, it should throw an
IllegalStateException
if any of its "work" methods are called.
Modifier and Type | Method and Description |
---|---|
IUndoableOperation |
commit()
Returns an
IUndoableOperation that performs all manipulations
applied by the policy since the last init() call. |
void |
init()
Initializes the policy, so that the policy's "work" methods can be used.
|
IUndoableOperation commit()
IUndoableOperation
that performs all manipulations
applied by the policy since the last init()
call. When called
multiple times in sequence, only the first call will yield an operation,
the subsequent calls will yield null
.IUndoableOperation
that performs all manipulations
applied by the policy since the last init()
call.void init()
IllegalStateException
. It is safe to call init()
multiple times in sequence.Copyright (c) 2014 itemis AG and others. All rights reserved.