public class DefaultMetadataRevisionSupport extends MetadataRevisionSupport
MetadataRevisionSupport
.Constructor and Description |
---|
DefaultMetadataRevisionSupport()
Constructs an instance of this class.
|
Modifier and Type | Method and Description |
---|---|
MetadataRevision |
create(java.lang.String note)
Creates a new metadata revision for the local host.
|
boolean |
exists(MetadataRevision revision)
Returns
true if a given metadata revision exists. |
MetadataRevision |
get(java.lang.String revisionId)
Gets the revision in the local history for a given ID.
|
MetadataRevision |
getLatest()
Returns the latest revision in the local history.
|
MetadataRevision |
getLatest(java.lang.String fromHostId)
Returns the latest revision imported from a host.
|
java.lang.String |
getLocalHostId()
Returns the ID of the local host where the metadata revisions are stored.
|
java.lang.String |
getNote(MetadataRevision revision)
Returns the revision note.
|
java.util.Date |
getRecordDate(MetadataRevision revision)
Returns the date when a metadata revision is recorded in the local history.
|
java.lang.String |
getRecordedBy(MetadataRevision revision)
Returns the user that records the metadata revision in the local history.
|
java.util.Map<java.lang.String,MetadataRepositoryBaseline> |
getRepositoryBaselines(MetadataRevision revision)
Returns the repository baselines associated with a metadata revision.
|
boolean |
isEligibleForUnpublish(MetadataRevisionPortable revision)
Returns
true if the given revision is eligible to be
unpublished from the local history. |
java.util.List<MetadataRevision> |
listAfter(MetadataRevision revision)
Lists all revisions in the local history after a revision.
|
void |
publish(MetadataRevisionPortable revision,
java.lang.String note)
Publishes a metadata revision from another host to the local host
|
boolean |
unpublish(MetadataRevisionPortable revision)
Removes a previously published metadata revision from the local history
if the metadata revision is the latest revision in the local history.
|
getPayload, newMetadataRevision, newMetadataRevision, newRevisionId
public DefaultMetadataRevisionSupport()
public java.lang.String getLocalHostId()
MetadataRevisionSupport
getLocalHostId
in class MetadataRevisionSupport
public boolean exists(MetadataRevision revision)
MetadataRevisionSupport
true
if a given metadata revision exists.exists
in class MetadataRevisionSupport
revision
- the metadata revision to be verifiedtrue
if the given metadata revision existspublic MetadataRevision create(java.lang.String note)
MetadataRevisionSupport
create
in class MetadataRevisionSupport
note
- the revision note; null
is allowed.public void publish(MetadataRevisionPortable revision, java.lang.String note)
MetadataRevisionSupport
publish
in class MetadataRevisionSupport
revision
- the metadata revision to be publishednote
- the revision note; null
is allowed.public boolean isEligibleForUnpublish(MetadataRevisionPortable revision)
MetadataRevisionSupport
true
if the given revision is eligible to be
unpublished from the local history. A revision is eligible for unpublish
when it has been published and no other revisions have been published
after the revision.isEligibleForUnpublish
in class MetadataRevisionSupport
revision
- the revision to be unpublishedtrue
if the given version is eligible to be
unpublishedMetadataRevisionSupport.unpublish(oracle.adf.share.sandbox.MetadataRevisionPortable)
public boolean unpublish(MetadataRevisionPortable revision)
MetadataRevisionSupport
unpublish
in class MetadataRevisionSupport
revision
- the latest published metadata revisiontrue
if the specified revision is successfully
unpublished; false
if the specified revision has
never been published to the local host or it is not the latest
revisionMetadataRevisionSupport.isEligibleForUnpublish(oracle.adf.share.sandbox.MetadataRevisionPortable)
public MetadataRevision get(java.lang.String revisionId)
MetadataRevisionSupport
get
in class MetadataRevisionSupport
revisionId
- the ID of the revision in the local historypublic java.util.List<MetadataRevision> listAfter(MetadataRevision revision)
MetadataRevisionSupport
listAfter
in class MetadataRevisionSupport
revision
- the revision immediately before the returned list in the
local historypublic MetadataRevision getLatest(java.lang.String fromHostId)
MetadataRevisionSupport
getLatest
in class MetadataRevisionSupport
fromHostId
- the ID of the host where the returned revision is
imported fromnull
if no revision is found for the
given host, or the local host does not have any revisionspublic MetadataRevision getLatest()
MetadataRevisionSupport
getLatest
in class MetadataRevisionSupport
public java.util.Map<java.lang.String,MetadataRepositoryBaseline> getRepositoryBaselines(MetadataRevision revision)
MetadataRevisionSupport
getRepositoryBaselines
in class MetadataRevisionSupport
revision
- the metadata revision with which the repository baselines
are associatedMetadataRevisionSupport.getPayload(oracle.adf.share.sandbox.MetadataRevision)
public java.util.Date getRecordDate(MetadataRevision revision)
MetadataRevisionSupport
getRecordDate
in class MetadataRevisionSupport
revision
- the metadata revision of which the record date is to
be returnedMetadataRevisionSupport.getPayload(oracle.adf.share.sandbox.MetadataRevision)
public java.lang.String getRecordedBy(MetadataRevision revision)
MetadataRevisionSupport
getRecordedBy
in class MetadataRevisionSupport
revision
- the metadata revision recorded by the returned userpublic java.lang.String getNote(MetadataRevision revision)
MetadataRevisionSupport
getNote
in class MetadataRevisionSupport
revision
- the revision of which the note is to be returnednull
if there is no noteMetadataRevisionSupport.getPayload(oracle.adf.share.sandbox.MetadataRevision)