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.
|
MetadataRevisionNoteDescriptor.ResourceDescription |
getResourceDescription(MetadataRevisionNoteURI uri)
Returns the resource description using the default descriptor if possible.
|
java.lang.String |
getSandboxName(MetadataRevision revision)
Returns the name of the sandbox associated with a revision.
|
boolean |
isEligibleForUnpublish(MetadataRevisionPortable revision)
Returns
true if the given revision is eligible to be
unpublished from the local history. |
java.util.List<MetadataRevision> |
list(java.util.Date startDateExclusive,
java.util.Date endDateExclusive,
int maxListSize)
Returns a list of metadata revisions from the local history.
|
java.util.List<MetadataRevision> |
listAfter(MetadataRevision revision)
Lists all revisions in the local history after a revision.
|
java.util.Map<MetadataRepositoryBaseline,MetadataRevision> |
listMetadataRepositoryBaselines(java.lang.String repositoryId,
java.util.Date startDateExclusive,
java.util.Date endDateExclusive,
int maxSize)
Returns distinct baselines of a repository from the latest to the oldest
and the revisions they first appear in.
|
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)public java.lang.String getSandboxName(MetadataRevision revision)
MetadataRevisionSupportgetSandboxName in class MetadataRevisionSupportrevision - the revision that may be associated with a sandboxnull if the given revision is not associated with
a sandbox. If the associated sandbox cannot be located, the
note of the revision is returned.public MetadataRevisionNoteDescriptor.ResourceDescription getResourceDescription(MetadataRevisionNoteURI uri)
MetadataRevisionSupportgetResourceDescription in class MetadataRevisionSupporturi - the URI of the resource to be describednull if the default
descriptor is unable to resolve the URIpublic java.util.List<MetadataRevision> list(java.util.Date startDateExclusive, java.util.Date endDateExclusive, int maxListSize)
MetadataRevisionSupportlist in class MetadataRevisionSupportstartDateExclusive - the low cutoff date. If specified, only the
revisions recorded after the date are returned. If
null is passed in, the low cutoff date is
January 1, 1970, 00:00:00 GMT.endDateExclusive - the high cutoff date. If specified, only the
revisions recorded before the date are returned. If
null is passed in, roughly the time of the
invocation of this method will be the high cutoff date.maxListSize - the maximum size of the returned list, a negative
number if all revisions before the cutoff date should
be returnedpublic java.util.Map<MetadataRepositoryBaseline,MetadataRevision> listMetadataRepositoryBaselines(java.lang.String repositoryId, java.util.Date startDateExclusive, java.util.Date endDateExclusive, int maxSize)
MetadataRevisionSupportlistMetadataRepositoryBaselines in class MetadataRevisionSupportrepositoryId - the ID of the repositorystartDateExclusive - the low cutoff date. If specified, only the
baselines recorded after the date are returned. If
null is passed in, the low cutoff date is
January 1, 1970, 00:00:00 GMT.endDateExclusive - the high cutoff date. If specified, only the
baselines recorded before the date are returned. If
null is passed in, roughly the time of the
invocation of this method will be the high cutoff date.maxSize - the maximum size of the returned map, a negative
number if all revisions before the cutoff date should
be returned