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, newRevisionIdpublic DefaultMetadataRevisionSupport()
public java.lang.String getLocalHostId()
MetadataRevisionSupportgetLocalHostId in class MetadataRevisionSupportpublic boolean exists(MetadataRevision revision)
MetadataRevisionSupporttrue if a given metadata revision exists.exists in class MetadataRevisionSupportrevision - the metadata revision to be verifiedtrue if the given metadata revision existspublic MetadataRevision create(java.lang.String note)
MetadataRevisionSupportcreate in class MetadataRevisionSupportnote - the revision note; null is allowed.public void publish(MetadataRevisionPortable revision, java.lang.String note)
MetadataRevisionSupportpublish in class MetadataRevisionSupportrevision - the metadata revision to be publishednote - the revision note; null is allowed.public boolean isEligibleForUnpublish(MetadataRevisionPortable revision)
MetadataRevisionSupporttrue 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 MetadataRevisionSupportrevision - 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)
MetadataRevisionSupportunpublish in class MetadataRevisionSupportrevision - 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)
MetadataRevisionSupportget in class MetadataRevisionSupportrevisionId - the ID of the revision in the local historypublic java.util.List<MetadataRevision> listAfter(MetadataRevision revision)
MetadataRevisionSupportlistAfter in class MetadataRevisionSupportrevision - the revision immediately before the returned list in the
local historypublic MetadataRevision getLatest(java.lang.String fromHostId)
MetadataRevisionSupportgetLatest in class MetadataRevisionSupportfromHostId - 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()
MetadataRevisionSupportgetLatest in class MetadataRevisionSupportpublic java.util.Map<java.lang.String,MetadataRepositoryBaseline> getRepositoryBaselines(MetadataRevision revision)
MetadataRevisionSupportgetRepositoryBaselines in class MetadataRevisionSupportrevision - the metadata revision with which the repository baselines
are associatedMetadataRevisionSupport.getPayload(oracle.adf.share.sandbox.MetadataRevision)public java.util.Date getRecordDate(MetadataRevision revision)
MetadataRevisionSupportgetRecordDate in class MetadataRevisionSupportrevision - 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)
MetadataRevisionSupportgetRecordedBy in class MetadataRevisionSupportrevision - the metadata revision recorded by the returned userpublic java.lang.String getNote(MetadataRevision revision)
MetadataRevisionSupportgetNote in class MetadataRevisionSupportrevision - the revision of which the note is to be returnednull if there is no noteMetadataRevisionSupport.getPayload(oracle.adf.share.sandbox.MetadataRevision)