public abstract class SandboxTransaction extends UndoableChanges
Modifier and Type | Class and Description |
---|---|
static class |
SandboxTransaction.State
The state of a
SandboxTransaction . |
EMPTY_CHANGE_SET
Modifier | Constructor and Description |
---|---|
protected |
SandboxTransaction(Sandbox sandbox,
java.lang.String reposId)
Creates a sandbox transaction with
UUID.randomUUID() as
the transaction ID. |
protected |
SandboxTransaction(Sandbox sandbox,
java.lang.String reposId,
java.lang.String transId)
Creates a sandbox transaction.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Returns the ID of this transaction.
|
java.lang.String |
getRepositoryId()
Returns the ID of the repository associated with this transaction.
|
Sandbox |
getSandbox()
Returns the sandbox associated with this transaction.
|
SandboxTransaction.State |
getState()
Returns the state of this transaction, or
null if the state
is unknown. |
boolean |
isPendingResume()
Returns
true if this transaction is waiting to be resumed. |
void |
resume(ChangeHint hint)
Resumes the operation that produced this transaction, or does nothing
when this transaction is either ready for finalization or already finalized.
|
commit, getSummary, iterator, undo
protected SandboxTransaction(Sandbox sandbox, java.lang.String reposId, java.lang.String transId)
sandbox
- the sandboxreposId
- the ID of the repository in the sandboxtransId
- the ID of this transactionjava.lang.IllegalArgumentException
- if any of the arguments is nullprotected SandboxTransaction(Sandbox sandbox, java.lang.String reposId)
UUID.randomUUID()
as
the transaction ID.sandbox
- the sandboxreposId
- the ID of the repositoryjava.lang.IllegalArgumentException
- if any of the IDs is nullpublic final Sandbox getSandbox()
public final java.lang.String getRepositoryId()
public final java.lang.String getId()
public void resume(ChangeHint hint) throws MergeConflictsException, SandboxException
hint
- a hint about how the changes should be made. Generally
ChangeHint.ACCEPT_ALL_CHANGES
implies this
operation should continue and be completed without further
input. ChangeHint.STOP_AT_CONFLICTS
means
a MergeConflictsException
must be thrown when any
conflict is detected. The change hint may be null; in that
case, this method may choose to do nothing and make sure
isPendingResume()
return true
, so
that the operation will not complete until a hint is given.MergeConflictsException
- if any conflict occurs during the operation
and the operation is considered completed. Conflicts that may be
resolved in the next resume should be returned normally as a
ChangeSet
. Any exception thrown from this method
will put this transaction in a "complete" state and this method
will no longer be called once the transaction is in a "complete"
state.SandboxException
- if any error occurs during the operationisPendingResume()
public boolean isPendingResume()
true
if this transaction is waiting to be resumed.
By default this method returns true
if
getState()
returns a state that starts with
PENDING_
.true
if this transaction is waiting to be resumedresume(oracle.adf.share.sandbox.ChangeHint)
public SandboxTransaction.State getState()
null
if the state
is unknown. By default this method assumes the state of this transaction
is unknown and returns null
.null
if the state is
unknown