Skip navigation links

Oracle Content Services Web Services Java API Reference
10g Release 1 (10.1.2.3)

B25584-03


oracle.ifs.fdk
Interface VersionManager


public interface VersionManager

The version management Facade interface.


Method Summary
 void cancelCheckout(long[] items)
          Cancels check-out for a set of items.
 Item[] checkin(long[] items, NamedValue[] workflowParams, NamedValueSet[] attrs, AttributeRequest[] attributes)
          Checks in a set of documents, or creates a request for checkin if operation is workflow-enabled.
 Item[] checkout(long[] items, java.lang.String[] comments)
          Deprecated. This API works with non-workflow enabled checkout only. The results cannot be guaranteed if this API is used in conjunction with WF.
Use checkoutDocuments() for workflow enabled checkout.
 Item[] checkoutDocuments(long[] items, java.lang.String[] comments, NamedValue[] workflowParams, NamedValueSet[] attrs, AttributeRequest[] attributes)
          Checks out a set of documents.
 Item copyToLatestVersion(long versionId, NamedValue[] attrs)
          Copies a version to the latest version in the version history.
 Item copyToWorkingCopy(long versionId)
          Copies a version to the working copy.
 Item copyVersion(long versionId, NamedValue[] attrs)
          Copies a version.
 void deleteVersion(long versionId)
          Deletes a version, so that it is no longer part of the version history.
 Item[] listVersions(long id, NamedValue[] options, AttributeRequest[] attributes)
          Returns the versions of an item and the requested attributes that apply to each item.
 void makeVersioned(long[] docIds)
          Changes non-version-controlled documents into a version-controlled documents with a single version.
 Item moveVersion(long versionId, NamedValue[] attrs)
          Moves a version.
 void removeVersioningConfiguration(long folderId)
          Removes the VersioningConfiguration for a Folder.
 void setVersioningConfiguration(long folderId, NamedValue[] config)
          Sets the VersioningConfiguration for a Folder, replacing any existing VersioningConfiguration.
 Item updateVersion(long id, NamedValue[] attrs, AttributeRequest[] attributes)
          Updates a version-controlled document.

 

Method Detail

setVersioningConfiguration

public void setVersioningConfiguration(long folderId,
                                       NamedValue[] config)
                                throws FdkException
Sets the VersioningConfiguration for a Folder, replacing any existing VersioningConfiguration. The entire configuration will replaced as a set and not added to the existing one.
Parameters:
folderId - the folder for which to set the versioning configuration
config - the versioning configuration options to set; must include one or more of the following Attributes:
  • notation: {Attribute name, Attribute type}
  • {Attributes.VERSIONING_CONFIGURATION_AUTO_LABEL, Boolean}
  • {Attributes.VERSIONING_CONFIGURATION_AUTO_VERSION, Boolean}
  • {Attributes.VERSIONING_CONFIGURATION_LABEL_TYPE, Integer}
  • {Attributes.VERSIONING_CONFIGURATION_MAX_VERSIONS, Integer}
  • {Attributes.CONFIGURATION_FINAL, Boolean}
  • {Attributes.CONFIGURATION_ENABLED, Boolean}
Throws:
FdkException - if the operation fails.

removeVersioningConfiguration

public void removeVersioningConfiguration(long folderId)
                                   throws FdkException
Removes the VersioningConfiguration for a Folder.
Parameters:
folderId - the folder from which to remove the configuration.
Throws:
FdkException - if the operation fails.

listVersions

public Item[] listVersions(long id,
                           NamedValue[] options,
                           AttributeRequest[] attributes)
                    throws FdkException
Returns the versions of an item and the requested attributes that apply to each item. If the item is not version controlled or does not have any versions, returns null.
Parameters:
id - the ID of the item for which to list versions.
options - Options on the retrieved list. Valid options are:
  • notation: {Attribute name, Attribute type}
  • {Options.PRIMARY_SORT_ATTRIBUTE, String}
  • {Options.PRIMARY_SORT_DIRECTION, Boolean}
  • {Options.SECONDARY_SORT_ATTRIBUTE, String}
  • {Options.SECONDARY_SORT_DIRECTION, Boolean}
If an attribute name is specified with no direction, ascending is the default. Attribute names must be valid attributes from @link{Attributes} whose values implement Comparable.
attributes - requested attributes for each returned item, or null.
Returns:
an Item array representing the versions of the item and their attributes (Item of type VERSION).
Throws:
FdkException - if the operation fails.

updateVersion

public Item updateVersion(long id,
                          NamedValue[] attrs,
                          AttributeRequest[] attributes)
                   throws FdkException
Updates a version-controlled document.
Parameters:
id - The ID of the version to update.
attrs - The attributes to update:
  • notation: {Attribute name, Attribute type}
  • {Attributes.VERSION_COMMENT, String}
  • {Attributes.VERSION_LABEL, String}
  • {Attributes.DO_NOT_PURGE, Boolean}
attributes - array of attribute requests representing attributes the user is interested in seeing
Throws:
FdkException - if the operation fails.

makeVersioned

public void makeVersioned(long[] docIds)
                   throws FdkException
Changes non-version-controlled documents into a version-controlled documents with a single version.
Parameters:
docIds - The IDs of the documents to put under version control.
Throws:
FdkException - if the operation fails.

checkout

public Item[] checkout(long[] items,
                       java.lang.String[] comments)
                throws FdkException
Deprecated. This API works with non-workflow enabled checkout only. The results cannot be guaranteed if this API is used in conjunction with WF.
Use checkoutDocuments() for workflow enabled checkout.
Checks out a set of documents.
Parameters:
items - IDs of the items to be checked out.
comments - reservation comments for each item to check out (each element or the entire array may be null).
Returns:
working copies (Item of type DOCUMENT) for each item that was checked out.
Throws:
FdkException - if the operation fails.

checkoutDocuments

public Item[] checkoutDocuments(long[] items,
                                java.lang.String[] comments,
                                NamedValue[] workflowParams,
                                NamedValueSet[] attrs,
                                AttributeRequest[] attributes)
                         throws FdkException
Checks out a set of documents.
Parameters:
items - IDs of the items to be checked out.
comments - reservation comments for each item to check out (each element or the entire array may be null).
workflowParams - workflow parameters, or null.
attrs - additional options, or null.
attributes - requested attributes for the returned items.
Returns:
working copies (Item of type DOCUMENT) for each item that was checked out.
Throws:
FdkException - if the operation fails.

cancelCheckout

public void cancelCheckout(long[] items)
                    throws FdkException
Cancels check-out for a set of items.
Parameters:
items - IDs of the items for which to cancel check out.
Throws:
FdkException - if the operation fails.

checkin

public Item[] checkin(long[] items,
                      NamedValue[] workflowParams,
                      NamedValueSet[] attrs,
                      AttributeRequest[] attributes)
               throws FdkException
Checks in a set of documents, or creates a request for checkin if operation is workflow-enabled.
Parameters:
items - The IDs of the items to check in.
workflowParams - The parameters(name/value) used to start workflow
attrs - The attributes for each item;
  • notation: {Attribute name, Attribute type}
  • {Attributes.VERSION_COMMENT, String}
  • {Attributes.VERSION_LABEL, String}
  • {Attributes.DO_NOT_PURGE, Boolean}
Returns:
The checked in items.
Throws:
FdkException - if the operation fails.

copyVersion

public Item copyVersion(long versionId,
                        NamedValue[] attrs)
                 throws FdkException
Copies a version.
Parameters:
versionId - The ID of the version to copy
attrs - The attributes specified for each item.
  • notation: {Attribute name, Attribute type}
  • {Attributes.NAME, String}
  • {Options.DESTFOLDER, Long}
  • {Options.OVERWRITE, Boolean}
  • {Options.UNIQUENAME, Boolean}
  • {Options.COPY_NEWVERSION, Boolean}
  • {Options.RESPECT_NULL_RESOURCE_LOCKS, Boolean}
Returns:
The copied item (ItemType DOCUMENT).
Throws:
FdkException - if the operation fails.

moveVersion

public Item moveVersion(long versionId,
                        NamedValue[] attrs)
                 throws FdkException
Moves a version.
Parameters:
versionId - The ID of the version to move
attrs - The attributes specified for each item.
  • notation: {Attribute name, Attribute type}
  • {Attributes.NAME, String}
  • {Options.DESTFOLDER, Long}
  • {Options.RESPECT_NULL_RESOURCE_LOCKS, Boolean}
Returns:
The moved item (Item of type DOCUMENT).
Throws:
FdkException - if the operation fails

deleteVersion

public void deleteVersion(long versionId)
                   throws FdkException
Deletes a version, so that it is no longer part of the version history.
Parameters:
versionId - the ID of the version to delete.
Throws:
FdkException - if the version is the only version in the version history, or if the operation fails.

copyToLatestVersion

public Item copyToLatestVersion(long versionId,
                                NamedValue[] attrs)
                         throws FdkException
Copies a version to the latest version in the version history.
Parameters:
versionId - The ID of the version to copy to the latest version
attrs - The attributes for the new version; may include one or more of the following:
  • notation: {Attribute name, Attribute type}
  • {Attributes.VERSION_COMMENT, String}
  • {Attributes.VERSION_LABEL, String}
Returns:
the newly created document that is now the latest version (Item of type DOCUMENT).
Throws:
FdkException - if the document is checked out by this user, or if the operation fails.

copyToWorkingCopy

public Item copyToWorkingCopy(long versionId)
                       throws FdkException
Copies a version to the working copy.
Parameters:
versionId - ID of the version to copy to the working copy.
Returns:
working copy (Item of type DOCUMENT).
Throws:
FdkException - if the document is not checked out by this user, or if the operation fails.

Skip navigation links

Oracle Content Services Web Services Java API Reference
10g Release 1 (10.1.2.3)

B25584-03


Copyright © 2002, 2005, Oracle. All rights reserved.