com.ibm.workplace.wcm.api
Interface VersionCatalog

All Superinterfaces:
java.lang.Iterable<Version>

public interface VersionCatalog
extends java.lang.Iterable<Version>

Access the set of available Versions of a Document

Since:
8.0

Method Summary
 java.util.Iterator<Version> all()
          Returns an Iterator to all available Versions of this Document
 void createVersion(java.lang.String... labels)
          Create a new Version of the live Document stored in the repository.
 boolean hasVersions()
          Returns true if this Document has stored Version documents in the repository.
 void remove(Version version)
          Remove the specified Version Documents for this item.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

hasVersions

boolean hasVersions()
Returns true if this Document has stored Version documents in the repository.

Returns:
Iterator to all Versions that exist for this Document.
Since:
8.0

all

java.util.Iterator<Version> all()
Returns an Iterator to all available Versions of this Document

Returns:
Iterator of all Versions of this Document if they exist.
Since:
8.0

remove

void remove(Version version)
            throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                   com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException,
                   DocumentLockedException,
                   com.ibm.workplace.wcm.api.exceptions.VersioningException
Remove the specified Version Documents for this item.

Parameters:
version - to be removed
Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the current user does not have sufficient access rights to remove the version
com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException - if the version could be found in the repository
DocumentLockedException - if the live item is currently locked
com.ibm.workplace.wcm.api.exceptions.VersioningException - if an error occurred trying to remove the version from the repository
com.ibm.workplace.wcm.api.exceptions.BaseVersionDeletionException - when attempting to remove the most recent (the base) version created of an Item
com.ibm.workplace.wcm.api.exceptions.LastVersionDeletionException - when attempting to remove the last remaining Version of a deleted item
Since:
8.0

createVersion

void createVersion(java.lang.String... labels)
                   throws com.ibm.workplace.wcm.api.exceptions.AuthorizationException,
                          com.ibm.workplace.wcm.api.exceptions.OperationFailedException,
                          com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException
Create a new Version of the live Document stored in the repository. Note: An single empty string is treated as a value and is not the same as passing in null or an empty String[].

Parameters:
labels - the String labels to set on the new Version
Throws:
com.ibm.workplace.wcm.api.exceptions.AuthorizationException - if the current user does not have sufficient access rights to remove the version
com.ibm.workplace.wcm.api.exceptions.DocumentNotFoundException - if the version could be found in the repository
com.ibm.workplace.wcm.api.exceptions.OperationFailedException - if an error occurred trying to remove the version from the repository
Since:
8.0