FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface VersionSeries

All Superinterfaces:
BaseObject, GettableObject, ReadableMetadataObject, java.io.Serializable, ValueObject, VersionableObject, WorkflowTarget

public interface VersionSeries
extends BaseObject, VersionableObject, WorkflowTarget, ReadableMetadataObject, GettableObject

A VersionSeries object represents a collection of versionable documents. It is a read-only object in the sense that you cannot modify its properties. Also, a VersionSeries object has no security attached to it; it is secured by the documents contained within it. When you call a method on a VersionSeries object, the method operates on the appropriate document version in the VersionSeries object.

Use the VersionSeries object when you want to be sure that your application is working with the latest version of a document. Note, however, that the CS Java Connector does not hold onto Content Services objects between server round trips. Therefore, it is possible that documents are being added to or deleted from the VersionSeries object while you are operating on it. Because of stale data, this can result in transaction failures. In particular, you should not store the document's ID on the client as a means of remembering the user's state, as a document's ID might become stale and no longer point to the latest version of the document.

Also note that the VersionSeries object and any Document objects you retrieve from it are separate and unrelated Java objects. If you perform versioning-related operations (such as checkout/checkin) on a Document object and then attempt to retrieve properties from a VersionSeries object (or vice versa), you must first call refresh to ensure that your application is working with fresh data. You should also call refresh before calling a convenience method (such as getCurrentVersion) that retrieves a property.

You cannot create a new VersionSeries object, but you can instantiate one in the following ways:

A VersionSeries object attempts to retrieve itself and its contained documents in an efficient manner:

See Also:
CS Java Connector Developer's Guide

Field Summary
 
Fields inherited from interface com.filenet.wcm.api.BaseObject
EXPORT_DEFAULT, EXPORT_ENCODED_CONTENT, EXPORT_FULL, EXPORT_OBJECT_ID, EXPORT_OBJECT_SECURITY, IMPORT_DEFAULT, IMPORT_OBJECT_ID, IMPORT_OWNER, IMPORT_PERMISSIONS, TYPE_ACTIVE_MARKING, TYPE_ANNOTATION, TYPE_ANY, TYPE_CBR_ENGINE_TYPE, TYPE_CHOICE, TYPE_CHOICELIST, TYPE_CLASS_SUBSCRIPTION, TYPE_CLASSDEFINITION, TYPE_CLASSDESCRIPTION, TYPE_COLUMN_DEFINITION, TYPE_COMPUTER, TYPE_CONTENT_CACHE_SERVICE, TYPE_CONTENT_MGR_SERVICE, TYPE_CONTENT_REFERENCE, TYPE_CONTENT_TRANSFER, TYPE_CUSTOMOBJECT, TYPE_DOCUMENT, TYPE_DOCUMENT_CLASSIFICATION_ACTION, TYPE_DOCUMENT_LIFECYCLE_ACTION, TYPE_DOCUMENT_LIFECYCLE_POLICY, TYPE_DOCUMENTSTATE, TYPE_DOMAIN, TYPE_DYNAMIC_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_ENTIRENETWORK, TYPE_EVENT, TYPE_EVENT_ACTION, TYPE_FEATURE_ADD_ON, TYPE_FILESTORE, TYPE_FOLDER, TYPE_GROUP, TYPE_INSTANCE_SUBSCRIPTION, TYPE_LINK, TYPE_LOCALIZED_STRING, TYPE_MARKING_SET, TYPE_MULTIPLEVALUES, TYPE_OBJECT_STORE, TYPE_OBJECTSET, TYPE_OBJSTORE_SERVICE, TYPE_PERMISSION, TYPE_PROPERTY_DEFINITION, TYPE_PROPERTYDESCRIPTION, TYPE_PROPERTYDESCRIPTIONS, TYPE_PUBLISH_REQUEST, TYPE_PUBLISH_TEMPLATE, TYPE_READONLY_OBJECT_SET, TYPE_REALM, TYPE_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_SECURITY_POLICY, TYPE_SECURITY_TEMPLATE, TYPE_STORAGE_POLICY, TYPE_STORED_SEARCH, TYPE_STYLE_TEMPLATE, TYPE_SUBSCRIPTION, TYPE_TABLE_DEFINITION, TYPE_TRANSIENT, TYPE_USER, TYPE_VERSIONSERIES, TYPE_WORKFLOW_CLASS_SUBSCRIPTION, TYPE_WORKFLOW_INSTANCE_SUBSCRIPTION, TYPE_WORKFLOWDEFINITION, TYPE_XML_PROPERTY_MAPPING_SCRIPT
 
Fields inherited from interface com.filenet.wcm.api.VersionableObject
APPLY_STATE_ID_IN_PROCESS, APPLY_STATE_ID_RELEASED, APPLY_STATE_ID_RESERVATION, APPLY_STATE_ID_SUPERSEDED, RESERVATION_TYPE_COLLABORATIVE, RESERVATION_TYPE_DEFAULT, RESERVATION_TYPE_EXCLUSIVE, VERSION_STATUS_IN_PROCESS, VERSION_STATUS_RELEASED, VERSION_STATUS_RESERVATION, VERSION_STATUS_SUPERSEDED
 
Method Summary
 void delete()
          Deletes this VersionSeries object and all document versions in this version series.
 TransportInputStream getContent()
          Provides a stream retrieving the first content element of the current document version in this VersionSeries object.
 TransportInputStream getContentElement(int contentElement)
          Provides a stream retrieving the specified content element of the current document version in this VersionSeries object.
 Document getCurrentVersion()
          Returns a Document object representing the current document version in this VersionSeries object.
 Document getReleasedVersion()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getVersionsXML(java.lang.String[] propNames)
          Returns a string in XML that represents a collection of all document versions (and their requested properties) in this VersionSeries object.
 
Methods inherited from interface com.filenet.wcm.api.BaseObject
equals, exportObject, getClassId, getId, getName, getObjectStoreId, getObjectType, getSession, hashCode, thisBaseObject
 
Methods inherited from interface com.filenet.wcm.api.VersionableObject
cancelCheckout, checkin, checkin, checkout, checkout, demoteVersion, freeze, getReservation, getVersions, getVersions, promoteVersion
 
Methods inherited from interface com.filenet.wcm.api.WorkflowTarget
getWorkflowSubscriptions, getWorkflowSubscriptionsXML, getWorkflowSubscriptionsXML
 
Methods inherited from interface com.filenet.wcm.api.ReadableMetadataObject
getProperties, getProperties, getPropertiesXML, getPropertyBinaryValue, getPropertyBooleanValue, getPropertyDateValue, getPropertyDoubleValue, getPropertyIntValue, getPropertyStringValue, getPropertyValue, getPropertyValuesValue, refresh, refresh
 

Method Detail

delete

public void delete()
Deletes this VersionSeries object and all document versions in this version series. Dynamic references (such as containment relationships) to documents in the version series are also deleted. The user must have Delete permission on the current version of the document. If a document in this version series is currently checked out, the user must also have Delete permission on the reservation object. There might be other constraints upon the VersionSeries object that make it unable to be deleted.

After a successful call to delete, all properties for this VersionSeries object are considered stale and are removed from cache.


getVersionsXML

public java.lang.String getVersionsXML(java.lang.String[] propNames)
Returns a string in XML that represents a collection of all document versions (and their requested properties) in this VersionSeries object. If the propNames parameter is null or an empty array, this method returns all properties for the documents in this VersionSeries object. If the array includes properties that do not exist for the documents, those properties are ignored (no exception is thrown).

This method always makes a roundtrip to the Content Services server and never uses cached properties.

Parameters:
propNames - A String array whose elements specify the symbolic names of the properties to retrieve. If null or an empty array, retrieves all properties. However, if you pass in a null, you must first explicitly cast it to a String[] to avoid a compilation error.

Returns:
A String in XML containing a representation of a Documents collection that contains all document versions in this VersionSeries object.

getCurrentVersion

public Document getCurrentVersion()
Returns a Document object representing the current document version in this VersionSeries object.

If your application is performing versioning-related activities (such as checkout and checkin) on a Document object obtained from the VersionSeries object, include a call to refresh before calling getCurrentVersion to ensure that your application is not working with stale cached data.

Returns:
A Document object that represents the current document version in this VersionSeries object.


getContent

public TransportInputStream getContent()
Provides a stream retrieving the first content element of the current document version in this VersionSeries object. Use the accessor methods on the returned TransportInputStream object to determine the filename, MIME type, and content size of the content element (if known). If you call getContent on a reservation object that does not yet have content associated with it, this method returns an error.

Returns:
A TransportInputStream object that contains the first content element of the current document version in this VersionSeries object.


getContentElement

public TransportInputStream getContentElement(int contentElement)
Provides a stream retrieving the specified content element of the current document version in this VersionSeries object.

Note: The CS Java Connector only supports the first content transfer element.

Use the accessor methods on the returned TransportInputStream object to determine the filename, MIME type, and content size of the content element (if known).

Parameters:
contentElement - The number of the content element to be retrieved. You must enter 1; otherwise, an exception will be thrown.

Returns:
A TransportInputStream object that contains the content for the specified content element.


getReleasedVersion

public Document getReleasedVersion()

Not Implemented in CS Java Connector v3.0.

Returns a Document object representing the current released version in this VersionSeries object. A released document is a major version (and the value of its VersionStatus property is VersionableObject.VERSION_STATUS_RELEASED). Note that only one version of a document in a given version series can be in the released state at any one time.

This method is a convenience method that returns the value of a VersionSeries object's ReleasedVersion property. If your application is performing versioning-related activities (such as checkout and checkin) on a Document object obtained from the VersionSeries object, include a call to refresh before calling getReleasedVersion to ensure that your application is not working with stale cached data. For example:
 objVersionSeries.refresh(new String[] {Property.RELEASED_VERSION});
 

To return the current version in this VersionSeries object, use the getCurrentVersion method.

Returns:
A Document object that represents the current released version in this VersionSeries object.


FileNet Content Services
Java Connector v3.0