|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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:
getVersionSeries
method on a Document
object or by retrieving the object's VersionSeries property.
getObject
method on an ObjectStore
object.
A VersionSeries
object attempts to retrieve itself and its
contained documents in an efficient manner:
VersionSeries
object through the
ObjectStore
interface's getObject
method does not incur
a roundtrip to the Content Services server.
VersionSeries
object through the
Document
interface's getVersionSeries
method
does not incur a roundtrip.
VersionSeries
object accesses
the content retrieval portion of the Java Connector without any additional
roundtrips.
Field Summary |
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 |
public void delete()
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.
public java.lang.String getVersionsXML(java.lang.String[] propNames)
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.
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.
Documents
collection that contains all document versions in this
VersionSeries
object.public Document getCurrentVersion()
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.
Document
object that represents the current
document version in this VersionSeries
object.
public TransportInputStream getContent()
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.
TransportInputStream
object that contains the first
content element of the current document version in this
VersionSeries
object.
public TransportInputStream getContentElement(int contentElement)
VersionSeries
object.
Note: The CS Java Connector only supports the first content transfer element.
Use the accessor methods on the returnedTransportInputStream
object to
determine the filename, MIME type, and content size of the content element (if known).
contentElement
- The number of the content element to be
retrieved. You must enter 1; otherwise, an exception will be thrown.
TransportInputStream
object that contains the content
for the specified content element.
public Document getReleasedVersion()
Not Implemented in CS Java Connector v3.0.
Returns aDocument
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.
Document
object that represents the current
released version in this VersionSeries
object.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |