public interface Revisioned extends WorkflowBean
Revisions are expressed as a chain of Revision
s linking to the
Revision.getPreviousRevision()
s. The Revision metadata also may
include when and who did the revision.
Modifier and Type | Method and Description |
---|---|
Revision |
getCurrentRevision()
Get the current Revision metadata.
|
URI |
getIdentifier()
Returns the identifier of this bean.
|
Revision |
newRevision()
Make a new Revision to mark structural changes to this workflow bean.
|
Revision |
newRevision(URI revisionIdentifier)
Make a new Revision to mark structural changes to this workflow bean with
the given identifier.
|
void |
setCurrentRevision(Revision currentRevision)
Set the current Revision.
|
void |
setIdentifier(URI workflowIdentifier)
Set the identifier.
|
accept, clone
Revision getCurrentRevision()
The Revision
typically contains information about when it was
made, and links to the previous revision chain.
void setCurrentRevision(Revision currentRevision)
To preserve the existing revision chain, the new revision should point to
the current revision using Revision.setPreviousRevision(Revision)
currentRevision
- The Revision
to be setRevision newRevision()
The identifier of the new getCurrentRevision()
will also be
identifying the Revisioned workflow bean and be returned from
getIdentifier()
.
The new revision will include the previous Revision as
Revision.getPreviousRevision()
and
Revision.getGeneratedAtTime()
on the new revision will match the
current GregorianCalendar
by default.
getCurrentRevision()
, for setting any further
details.Revision newRevision(URI revisionIdentifier)
getIdentifier()
will match the new identifier. The new
getCurrentRevision()
will include the previous revision as
Revision.getPreviousRevision()
.
Note, unlike the convenience method newRevision()
this method
will not update Revision.getGeneratedAtTime()
.
revisionIdentifier
- The new workflow identifiergetCurrentRevision()
, for setting any further
details.void setIdentifier(URI workflowIdentifier)
This will delete any previous revisions in getCurrentRevision()
.
To avoid loosing history, you might instead want to use
newRevision(URI)
.
workflowIdentifier
- the identifiergetIdentifier()
,
getCurrentRevision()
URI getIdentifier()
This identifier matches the Revision.getIdentifier()
of
getCurrentRevision()
.
#setIdentifier(URI)}
Copyright © 2014 myGrid. All rights reserved.