public class CoreVersionManager extends VersionManagerImpl
Constructor and Description |
---|
CoreVersionManager()
Constructors a CoreVersionManager.
|
CoreVersionManager(FdkSession session)
Constructors a CoreVersionManager.
|
Modifier and Type | Method and Description |
---|---|
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,
String[] comments)
Checks out a set of documents.
|
Item[] |
checkoutDocuments(long[] items,
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.
|
protected FdkSessionImpl |
getConnectedSession()
Return the web service session.
|
protected boolean |
isWebServiceCall()
Returns
true if the current call was made from a web services
client. |
Item[] |
listVersions(long id,
NamedValue[] options,
AttributeRequest[] attributes)
Returns the versions of an item and the requested attributes that
apply to each item.
|
protected NamedValue[] |
login(FdkCredential c,
NamedValue[] options,
AttributeRequest[] userAttributes)
Internal login method used by web services login managers.
|
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 |
referenceTypes(TypeReference ref)
Dummy web service method to create a reference to data types used
in the web services to insure that they are defined in the WSDL.
|
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.
|
public CoreVersionManager()
public CoreVersionManager(FdkSession session)
public void setVersioningConfiguration(long folderId, NamedValue[] config) throws FdkException
VersionManager
folderId
- the folder for which to set the versioning configurationconfig
- the versioning configuration options to set;
must include one or more of the following Attributes:
FdkException
- if the operation fails.public void removeVersioningConfiguration(long folderId) throws FdkException
VersionManager
folderId
- the folder from which to remove the configuration.FdkException
- if the operation fails.public Item[] listVersions(long id, NamedValue[] options, AttributeRequest[] attributes) throws FdkException
VersionManager
id
- the ID of the item for which to list versions.options
- Options on the retrieved list. Valid options are:
attributes
- requested attributes for each returned item, or null.FdkException
- if the operation fails.public Item updateVersion(long id, NamedValue[] attrs, AttributeRequest[] attributes) throws FdkException
VersionManager
id
- The ID of the version to update.attrs
- The attributes to update:
attributes
- array of attribute requests representing
attributes the user is interested in seeingFdkException
- if the operation fails.public void makeVersioned(long[] docIds) throws FdkException
VersionManager
docIds
- The IDs of the documents to put under version control.FdkException
- if the operation fails.public Item[] checkout(long[] items, String[] comments) throws FdkException
VersionManager
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).FdkException
- if the operation fails.public Item[] checkoutDocuments(long[] items, String[] comments, NamedValue[] workflowParams, NamedValueSet[] attrs, AttributeRequest[] attributes) throws FdkException
VersionManager
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.FdkException
- if the operation fails.public void cancelCheckout(long[] items) throws FdkException
VersionManager
items
- IDs of the items for which to cancel check out.FdkException
- if the operation fails.public Item[] checkin(long[] items, NamedValue[] workflowParams, NamedValueSet[] attrs, AttributeRequest[] attributes) throws FdkException
VersionManager
items
- The IDs of the items to check in.workflowParams
- The parameters(name/value) used to start workflowattrs
- The attributes for each item;
FdkException
- if the operation fails.public Item copyVersion(long versionId, NamedValue[] attrs) throws FdkException
VersionManager
versionId
- The ID of the version to copyattrs
- The attributes specified for each item.
FdkException
- if the operation fails.public Item moveVersion(long versionId, NamedValue[] attrs) throws FdkException
VersionManager
versionId
- The ID of the version to moveattrs
- The attributes specified for each item.
FdkException
- if the operation failspublic void deleteVersion(long versionId) throws FdkException
VersionManager
versionId
- the ID of the version to delete.FdkException
- if the version is the only version in the version
history, or if the operation fails.public Item copyToLatestVersion(long versionId, NamedValue[] attrs) throws FdkException
VersionManager
versionId
- The ID of the version to copy to the latest versionattrs
- The attributes for the new version;
may include one or more of the following:
FdkException
- if the document is checked out by this user,
or if the operation fails.public Item copyToWorkingCopy(long versionId) throws FdkException
VersionManager
versionId
- ID of the version to copy to the working copy.FdkException
- if the document is not checked out by this user,
or if the operation fails.protected final boolean isWebServiceCall()
true
if the current call was made from a web services
client. This check can be made by any subclasses in order to determine
functionality and restrictions based on the originating call. This
feature should be used lightly and only where really necessary as
this is not an idea way of implementing business logic.public void referenceTypes(TypeReference ref)
protected final NamedValue[] login(FdkCredential c, NamedValue[] options, AttributeRequest[] userAttributes) throws FdkException
FdkException
protected final FdkSessionImpl getConnectedSession() throws FdkException
FdkException
Copyright © 2023. All rights reserved.