public class MetadataRevision
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | ID_KEYThe preferred key to identify the metadata revision ID in a session. | 
| Modifier and Type | Method and Description | 
|---|---|
| static MetadataRevision | create(MetadataRevisionNoteURI noteURI)Creates a new revision in the local history of metadata revisions. | 
| static MetadataRevision | create(java.lang.String noteURI)Creates a new revision in the local history of metadata revisions. | 
| MetadataRevisionPortable | export()Exports this revision into a portable which can later be published in
 another host. | 
| static MetadataRevision | get(java.lang.String revisionId)Returns the revision in the local history for a given ID. | 
| java.lang.String | getFromHostId()Returns the ID of the host where this revision is imported from. | 
| java.lang.String | getHostId()Returns the ID of the host where this revision is created. | 
| java.lang.String | getId()Returns the ID of this revision. | 
| static MetadataRevision | getLatest()Gets the latest metadata revision in the local history. | 
| static MetadataRevision | getLatest(java.lang.String fromHostId)Gets the latest revision imported from a host. | 
| static java.lang.String | getLocalHostId()Gets the ID of the local host where this class stores the metadata
 revisions. | 
| java.lang.String | getNote()Returns the note URI of this revision. | 
| MetadataRevisionNoteURI | getNoteURI()Returns the parsed note URI of this revision. | 
| java.util.Date | getRecordDate()Returns the date when this revision is recorded in the local history. | 
| java.lang.String | getRecordedBy()Returns the user that records this revision in the local history. | 
| java.util.Map<java.lang.String,MetadataRepositoryBaseline> | getRepositoryBaselines()Returns the associated repository baselines. | 
| java.lang.String | getSandboxName()Returns the name of the sandbox if the note of this revision is
 associated with a sandbox. | 
| static 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. | 
| static java.util.List<MetadataRevision> | listAfter(MetadataRevision revision)Lists all revisions in the local history after a revision. | 
| static 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. | 
| java.lang.String | toString()Returns a  Stringrepresentation of this revision. | 
public static final java.lang.String ID_KEY
public final java.lang.String getId()
public final java.lang.String getHostId()
public final java.lang.String getFromHostId()
public java.util.Map<java.lang.String,MetadataRepositoryBaseline> getRepositoryBaselines()
public java.util.Date getRecordDate()
public java.lang.String getRecordedBy()
public java.lang.String getNote()
null if there is 
          no notepublic MetadataRevisionNoteURI getNoteURI()
null if there is
          no notepublic java.lang.String getSandboxName()
null otherwise.  If
          the sandbox indicated by the URI cannot be found, then the raw
          URI that contains the ID of the sandbox is returned.java.lang.UnsupportedOperationException - if this method is not supportedpublic MetadataRevisionPortable export()
public java.lang.String toString()
String representation of this revision.
 A connection to the host that originally defines this revision may be
 needed for this method to return the correct representation because some
 information in the representation is lazily loaded.toString in class java.lang.ObjectString representation of this revisionpublic static java.lang.String getLocalHostId()
java.lang.IllegalStateException - if the ID cannot be retrieved due to an
                                  errorpublic static MetadataRevision get(java.lang.String revisionId)
revisionId - the ID of the revisionnull if no such ID is found in the local historyjava.lang.IllegalArgumentException - if the given ID is nullpublic static java.util.List<MetadataRevision> listAfter(MetadataRevision revision)
revision - the revision immediately before the returned list in the
                  local historyjava.lang.IllegalArgumentException - if the specified revision is nullpublic static MetadataRevision getLatest(java.lang.String fromHostId)
fromHostId - the ID of the host where the returned revision is 
                    imported fromnull if the
          local history of revisions does not contain any revision from
          the given host, or if there is no local history of metadata
          revisionsjava.lang.IllegalArgumentException - if the given host ID is nullpublic static MetadataRevision getLatest()
null if there is no historypublic static MetadataRevision create(java.lang.String noteURI)
noteURI - the revision note URI; null is allowed.java.lang.UnsupportedOperationException - if the current application
              context does not support the creation of new revisionspublic static MetadataRevision create(MetadataRevisionNoteURI noteURI)
noteURI - the revision note URI; null is allowed.java.lang.UnsupportedOperationException - if the current application
              context does not support the creation of new revisionspublic static java.util.List<MetadataRevision> list(java.util.Date startDateExclusive, java.util.Date endDateExclusive, int maxListSize)
startDateExclusive - 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 returnedjava.lang.UnsupportedOperationException - if this method is not supportedpublic static java.util.Map<MetadataRepositoryBaseline,MetadataRevision> listMetadataRepositoryBaselines(java.lang.String repositoryId, java.util.Date startDateExclusive, java.util.Date endDateExclusive, int maxSize)
repositoryId - 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 returnedjava.lang.IllegalArgumentException - if the given repository ID is nulljava.lang.UnsupportedOperationException - if this method is not supported