Content Operations API

filenet.contentops
Class ContentOperations

java.lang.Object
  extended by filenet.contentops.ContentOperations
All Implemented Interfaces:
filenet.contentops.IContentOperations

public class ContentOperations
extends java.lang.Object
implements filenet.contentops.IContentOperations

Provides content operations on Content Engine and Content Manager repositories from Process Engine workflows.

This class is used by the IBM FileNet Component Integrator.

Since:
P8 4.0.3

Constructor Summary
ContentOperations()
           
 
Method Summary
 void applySecurityTemplate(filenet.vw.api.VWAttachment att, java.lang.String templateGUID)
          Applies a security template to an attachment.
 void applySecurityTemplateMany(filenet.vw.api.VWAttachment[] atts, java.lang.String templateGUID)
          Applies a security template to an array of homogeneous attachments.
 void changeClass(filenet.vw.api.VWAttachment att, java.lang.String classId)
          Changes the class of a supplied custom object, document or folder.
 filenet.vw.api.VWAttachment checkin(filenet.vw.api.VWAttachment att, java.lang.String[] propArray, java.lang.String fileName, java.lang.String mimeType, java.lang.String content)
          Checks in an attached document as a new major version.
 void checkout(filenet.vw.api.VWAttachment att)
          Checks out an attachment from a repository.
 filenet.vw.api.VWAttachment copy(filenet.vw.api.VWAttachment att, boolean file)
          Copies a document or custom object within the same repository.
 filenet.vw.api.VWAttachment[] copyMany(filenet.vw.api.VWAttachment[] atts, boolean file)
          Copies documents or custom objects within the same repository.
 filenet.vw.api.VWAttachment createCustomObject(filenet.vw.api.VWAttachment destFolder, java.lang.String className, java.lang.String[] propArray)
          Creates a custom object using a specified class, and property values.
 filenet.vw.api.VWAttachment createDocument(filenet.vw.api.VWAttachment destFolder, java.lang.String className, java.lang.String[] propArray, java.lang.String fileName, java.lang.String mimeType, java.lang.String content)
          Creates a document using the specified class, properties, and content.
 filenet.vw.api.VWAttachment createFolder(filenet.vw.api.VWAttachment parentFolderAtt, java.lang.String className, java.lang.String[] propArray)
          Creates a folder, either at the root of the object store or as a child of an attached folder.
 void delete(filenet.vw.api.VWAttachment objAtt)
          Deletes the specified attachment.
 void deleteMany(filenet.vw.api.VWAttachment[] list)
          Deletes an array of specified attachments.
 void file(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment destFolder)
          Takes an object that is already in the repository and files it into a new folder.
 void fileMany(filenet.vw.api.VWAttachment folder, filenet.vw.api.VWAttachment[] objects)
          Files one or more objects (documents or custom objects) into a specified folder.
 java.lang.Boolean getBooleanProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)
          Gets the Boolean value for the specified property from the specified document attachment.
 java.lang.String[] getContent(filenet.vw.api.VWAttachment att)
          Gets the content of the attached document.
 java.util.Date getDateProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)
          Gets the Date value for the specified property from the specified document attachment.
 java.lang.Double getDoubleProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)
          Gets the Double value for the specified property from the specified document attachment.
 java.lang.Integer getIntegerProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)
          Gets the Integer value for the specified property from the specified document attachment.
 java.lang.Boolean[] getMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the Boolean values of a multivalued property.
 java.util.Date[] getMultiDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the Date values of a multivalued property.
 java.lang.Double[] getMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the Double values of a multivalued property.
 java.lang.Integer[] getMultiIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the Integer values of a multivalued property.
 filenet.vw.api.VWAttachment[] getMultiObjectProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the object values of a multivalued property.
 java.lang.String[] getMultiStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)
          Gets the String values of a multivalued property.
 filenet.vw.api.VWAttachment getObjectProperty(filenet.vw.api.VWAttachment att, java.lang.String propName)
          Gets the object referenced by an attached object's object-valued property.
 filenet.vw.api.VWAttachment getObjFromPath(java.lang.String osName, java.lang.String path, java.lang.String objType)
          Gets an object (custom object, folder or document) from a specified repository using a specified path.
 java.lang.String getStringProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)
          Gets the String value for the specified property from the specified document attachment.
 java.lang.String getURLFromAttachment(filenet.vw.api.VWAttachment att, java.lang.String baseURL)
          Gets the URL for the document attachment.
 void move(filenet.vw.api.VWAttachment folder, filenet.vw.api.VWAttachment object)
          Moves the specified document or custom object from its existing folder to the specified folder (similar to an unfile and file operation).
 void moveMany(filenet.vw.api.VWAttachment folder, filenet.vw.api.VWAttachment[] objects)
          Moves the specified documents or custom objects from their existing folder to the specified folder (similar to an unfile and file operation).
 void PECMInit()
          For FileNet internal use only.
 void PECMStop()
          For FileNet internal use only.
 filenet.vw.api.VWAttachment publish(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment publishingTemplate)
          Publishes the specified document attachment using the specified template.
 filenet.vw.api.VWAttachment[] searchForMany(filenet.vw.api.VWAttachment search, java.lang.String objectType, int[] itemIds, java.lang.String[] values)
          Executes the simple search template or stored search identified in an attachment, returning an array of objects matching the search criteria.
 filenet.vw.api.VWAttachment searchForOne(filenet.vw.api.VWAttachment search, java.lang.String objectType, int[] itemIds, java.lang.String[] values)
          Executes the simple search template or stored search identified in an attachment, returning the first object matching the search criteria.
 void sendMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body)
          Sends mail as text/plain with no attachment.
 void sendMailAttachment(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body, filenet.vw.api.VWAttachment[] att)
          Sends mail with a document attachment.
 void sendMailTemplate(java.lang.String from, java.lang.String to, java.lang.String subject, filenet.vw.api.VWAttachment template, java.lang.String[] templateVals)
          Sends mail using a template.
 void sendMailTemplateAttachment(java.lang.String from, java.lang.String to, java.lang.String subject, filenet.vw.api.VWAttachment template, java.lang.String[] templateVals, filenet.vw.api.VWAttachment[] attList)
          Sends mail using a template with a document attachment.
 void sendMailTemplateURL(java.lang.String from, java.lang.String to, java.lang.String subject, filenet.vw.api.VWAttachment template, java.lang.String[] templateVals, filenet.vw.api.VWAttachment[] att, java.lang.String workplaceUrl)
          Sends mail using a template with the URLs of the attached documents appended to the end of the body of the email.
 void sendMailURL(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body, filenet.vw.api.VWAttachment[] att, java.lang.String workplaceUrl)
          Sends mail with the URLs of the attached documents appended to the end of the body of the email.
 void setBooleanProperty(filenet.vw.api.VWAttachment destDocument, java.lang.String symbolicPropName, java.lang.Boolean val)
          Sets the Boolean value for the specified property on the specified document attachment.
 void setDateProperty(filenet.vw.api.VWAttachment destDocument, java.lang.String symbolicPropName, java.util.Date val)
          Sets the Date value for the specified property on the specified document attachment.
 void setDoubleProperty(filenet.vw.api.VWAttachment destDocument, java.lang.String symbolicPropName, java.lang.Double val)
          Sets the Double value for the specified property on the specified document attachment.
 void setIntegerProperty(filenet.vw.api.VWAttachment destDocument, java.lang.String symbolicPropName, java.lang.Integer val)
          Sets the Integer value for the specified property on the specified document attachment.
 void setMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Boolean[] values)
          Sets the Boolean values of a multivalued property.
 void setMultiDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.util.Date[] values)
          Sets the Date values of a multivalued property.
 void setMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Double[] values)
          Sets the Double values of a multivalued property.
 void setMultiIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Integer[] values)
          Sets the Integer values of a multivalued property.
 void setMultiStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] values)
          Sets the String values of a multivalued property.
 void setObjectProperty(filenet.vw.api.VWAttachment att, java.lang.String propName, filenet.vw.api.VWAttachment attVal)
          Sets the object value of an object-valued property.
 void setStringProperty(filenet.vw.api.VWAttachment destDocument, java.lang.String symbolicPropName, java.lang.String val)
          Sets the String value for the specified property on the specified document attachment.
 void unfile(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment fromFolder)
          Unfiles the specified document attachment from the specified folder.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentOperations

public ContentOperations()
Method Detail

sendMail

public void sendMail(java.lang.String from,
                     java.lang.String to,
                     java.lang.String subject,
                     java.lang.String body)
              throws java.lang.Exception
Sends mail as text/plain with no attachment.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address(es) to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
body - A String containing the body (text/plain) for the email.
Throws:
java.lang.Exception
Since:
P8 4.0.3

sendMailAttachment

public void sendMailAttachment(java.lang.String from,
                               java.lang.String to,
                               java.lang.String subject,
                               java.lang.String body,
                               filenet.vw.api.VWAttachment[] att)
                        throws java.lang.Exception
Sends mail with a document attachment. The document is added to the email as a MIME attachment.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address(es) to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
body - A String containing the body (text/plain) for the email.
att - An array of VWAttachment objects identifying the documents for the the email MIME attachments.
Throws:
java.lang.Exception
Since:
P8 4.0.3

sendMailTemplate

public void sendMailTemplate(java.lang.String from,
                             java.lang.String to,
                             java.lang.String subject,
                             filenet.vw.api.VWAttachment template,
                             java.lang.String[] templateVals)
                      throws java.lang.Exception
Sends mail using a template. The template is used as the body of the email message.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address or addresses to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
template - A VWAttachment object identifying the template to use for the body of the email.
templateVals - A String array containing the replacement values to use for the template.
Throws:
java.lang.Exception
Since:
P8 4.0.3

sendMailTemplateAttachment

public void sendMailTemplateAttachment(java.lang.String from,
                                       java.lang.String to,
                                       java.lang.String subject,
                                       filenet.vw.api.VWAttachment template,
                                       java.lang.String[] templateVals,
                                       filenet.vw.api.VWAttachment[] attList)
                                throws java.lang.Exception
Sends mail using a template with a document attachment. The document is added to the email as a MIME attachment.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address or addresses to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
template - A VWAttachment object identifying the template to use for the body of the email.
templateVals - A String array containing the replacement values to use for the template.
attList - An array of VWAttachment objects identifying the documents for the the email MIME attachments.
Throws:
java.lang.Exception
Since:
P8 4.0.3

sendMailTemplateURL

public void sendMailTemplateURL(java.lang.String from,
                                java.lang.String to,
                                java.lang.String subject,
                                filenet.vw.api.VWAttachment template,
                                java.lang.String[] templateVals,
                                filenet.vw.api.VWAttachment[] att,
                                java.lang.String workplaceUrl)
                         throws java.lang.Exception
Sends mail using a template with the URLs of the attached documents appended to the end of the body of the email.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address or addresses to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
template - A VWAttachment object containing the template to use for the body of the email.
templateVals - A String array containing the replacement values to use for the template.
att - An array of VWAttachment objects identifying the documents for the the email MIME attachments.
workplaceUrl - A String containing the base Workplace URL to use for the document attachment (such as, http://hqdemo:8080/Workplace).
Throws:
java.lang.Exception
Since:
P8 4.0.3

sendMailURL

public void sendMailURL(java.lang.String from,
                        java.lang.String to,
                        java.lang.String subject,
                        java.lang.String body,
                        filenet.vw.api.VWAttachment[] att,
                        java.lang.String workplaceUrl)
                 throws java.lang.Exception
Sends mail with the URLs of the attached documents appended to the end of the body of the email.

Parameters:
from - A String containing the email address of the sender.
to - A String containing the email address(es) to which the email is to be sent. Separate multiple addresses with commas.
subject - A String containing the subject of the email.
body - A String containing the body (text/plain) for the email.
att - An array of VWAttachment objects identifying the documents for the the email MIME attachments.
workplaceUrl - A String containing the base Workplace URL to use for the attachment (such as, http://hqdemo:8080/Workplace).
Throws:
java.lang.Exception
Since:
P8 4.0.3

getBooleanProperty

public java.lang.Boolean getBooleanProperty(filenet.vw.api.VWAttachment sourceDocument,
                                            java.lang.String symbolicPropName)
                                     throws java.lang.Exception
Gets the Boolean value for the specified property from the specified document attachment.

Specified by:
getBooleanProperty in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the document property. The property must be of type Boolean.
Returns:
The Boolean value of the document property identified by the symbolic name.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException when the requested property is not of type Boolean.
Since:
P8 4.0.3

getDateProperty

public java.util.Date getDateProperty(filenet.vw.api.VWAttachment sourceDocument,
                                      java.lang.String symbolicPropName)
                               throws java.lang.Exception
Gets the Date value for the specified property from the specified document attachment.

Specified by:
getDateProperty in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the document property. The property must be of type Date.
Returns:
The Date value of the document property identified by the symbolic name.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException when the requested property is not of type Date.
Since:
P8 4.0.3

getDoubleProperty

public java.lang.Double getDoubleProperty(filenet.vw.api.VWAttachment sourceDocument,
                                          java.lang.String symbolicPropName)
                                   throws java.lang.Exception
Gets the Double value for the specified property from the specified document attachment.

Specified by:
getDoubleProperty in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the document property. The property must be of type Double.
Returns:
The Double value of the document property identified by the symbolic name.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException when the requested property is not of type Double.
Since:
P8 4.0.3

getIntegerProperty

public java.lang.Integer getIntegerProperty(filenet.vw.api.VWAttachment sourceDocument,
                                            java.lang.String symbolicPropName)
                                     throws java.lang.Exception
Gets the Integer value for the specified property from the specified document attachment.

Specified by:
getIntegerProperty in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the document property. The property must be of type Integer.
Returns:
The Integer value of the document property identified by the symbolic name.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException when the requested property is not of type Integer.
Since:
P8 4.0.3

getStringProperty

public java.lang.String getStringProperty(filenet.vw.api.VWAttachment sourceDocument,
                                          java.lang.String symbolicPropName)
                                   throws java.lang.Exception
Gets the String value for the specified property from the specified document attachment.

Specified by:
getStringProperty in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the document property. The property must be of type String.
Returns:
The String value of the document property identified by the symbolic name.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException when the requested property is not of type String.
Since:
P8 4.0.3

getURLFromAttachment

public java.lang.String getURLFromAttachment(filenet.vw.api.VWAttachment att,
                                             java.lang.String baseURL)
                                      throws java.lang.Exception
Gets the URL for the document attachment.

Specified by:
getURLFromAttachment in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object containing the information for the document attachment.
baseURL - A String containing the base Workplace URL (such as, http://hqdemo:8080/Workplace).
Returns:
A String containing the URL of the document attachment (relative to the base Workplace URL).
Throws:
java.lang.Exception
Since:
P8 4.0.3

setBooleanProperty

public void setBooleanProperty(filenet.vw.api.VWAttachment destDocument,
                               java.lang.String symbolicPropName,
                               java.lang.Boolean val)
                        throws java.lang.Exception
Sets the Boolean value for the specified property on the specified document attachment.

Specified by:
setBooleanProperty in interface filenet.contentops.IContentOperations
Parameters:
destDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the property on destDocument. The property must be of type Boolean.
val - The Boolean value to assign to the property specified in symbolicPropName.
Throws:
java.lang.Exception - Throws WcmException when the requested property is not of type Boolean.
Since:
P8 4.0.3

setDateProperty

public void setDateProperty(filenet.vw.api.VWAttachment destDocument,
                            java.lang.String symbolicPropName,
                            java.util.Date val)
                     throws java.lang.Exception
Sets the Date value for the specified property on the specified document attachment.

Specified by:
setDateProperty in interface filenet.contentops.IContentOperations
Parameters:
destDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the property on destDocument. The property must be of type Date.
val - The Date value to assign to the property specified in symbolicPropName.
Throws:
java.lang.Exception - Throws WcmException when the requested property is not of type Date.
Since:
P8 4.0.3

setDoubleProperty

public void setDoubleProperty(filenet.vw.api.VWAttachment destDocument,
                              java.lang.String symbolicPropName,
                              java.lang.Double val)
                       throws java.lang.Exception
Sets the Double value for the specified property on the specified document attachment.

Specified by:
setDoubleProperty in interface filenet.contentops.IContentOperations
Parameters:
destDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the property on destDocument. The property must be of type Double.
val - The Double value to assign to the property specified in symbolicPropName.
Throws:
java.lang.Exception - Throws WcmException when the requested property is not of type Double.
Since:
P8 4.0.3

setIntegerProperty

public void setIntegerProperty(filenet.vw.api.VWAttachment destDocument,
                               java.lang.String symbolicPropName,
                               java.lang.Integer val)
                        throws java.lang.Exception
Sets the Integer value for the specified property on the specified document attachment.

Specified by:
setIntegerProperty in interface filenet.contentops.IContentOperations
Parameters:
destDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the property on destDocument. The property must be of type Integer.
val - The Integer value to assign to the property specified in symbolicPropName.
Throws:
java.lang.Exception - Throws WcmException when the requested property is not of type Integer.
Since:
P8 4.0.3

setStringProperty

public void setStringProperty(filenet.vw.api.VWAttachment destDocument,
                              java.lang.String symbolicPropName,
                              java.lang.String val)
                       throws java.lang.Exception
Sets the String value for the specified property on the specified document attachment.

Specified by:
setStringProperty in interface filenet.contentops.IContentOperations
Parameters:
destDocument - A VWAttachment object for the document attachment.
symbolicPropName - A String containing the symbolic name of the property on destDocument. The property must be of type String.
val - The String value to assign to the property specified in symbolicPropName.
Throws:
java.lang.Exception - Throws WcmException when the requested property is not of type String.
Since:
P8 4.0.3

file

public void file(filenet.vw.api.VWAttachment sourceDocument,
                 filenet.vw.api.VWAttachment destFolder)
          throws java.lang.Exception
Takes an object that is already in the repository and files it into a new folder. The object will not be unfiled from the existing containers (if any).

Note: Multiple requests to file the document in the same folder will be ignored, although the requests will appear to be successful.

Specified by:
file in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment to file.
destFolder - A VWAttachment object for the folder in which to file the document.
Throws:
java.lang.Exception
Since:
P8 4.0.3

unfile

public void unfile(filenet.vw.api.VWAttachment sourceDocument,
                   filenet.vw.api.VWAttachment fromFolder)
            throws java.lang.Exception
Unfiles the specified document attachment from the specified folder. Upon successful completion of this method the document will no longer be filed in the folder.

Note: Multiple requests to unfile the document in the same folder will be ignored, although the requests will appear to be successful.

Specified by:
unfile in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment to unfile.
fromFolder - A VWAttachment object for the folder in which the document is filed.
Throws:
java.lang.Exception
Since:
P8 4.0.3

publish

public filenet.vw.api.VWAttachment publish(filenet.vw.api.VWAttachment sourceDocument,
                                           filenet.vw.api.VWAttachment publishingTemplate)
                                    throws java.lang.Exception
Publishes the specified document attachment using the specified template.

Specified by:
publish in interface filenet.contentops.IContentOperations
Parameters:
sourceDocument - A VWAttachment object for the document attachment to file.
publishingTemplate - A VWAttachment object for the publishing template to use.
Returns:
A VWAttachment object for the target document created from the publishing request.

Note: The publishing template may not immediately return the published document. In this case, the return value can be null until the publishing template completes the operation.

Throws:
java.lang.Exception
Since:
P8 4.0.3

applySecurityTemplate

public void applySecurityTemplate(filenet.vw.api.VWAttachment att,
                                  java.lang.String templateGUID)
                           throws java.lang.Exception
Applies a security template to an attachment. Note that the object must be associated with a security policy and the specified template must belong to the policy.

Specified by:
applySecurityTemplate in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object (document type only) identifying the document to which to apply the security template. This document must be associated with a security policy.
templateGUID - A String containing the GUID of a custom/application template. The template must be associated with the same security policy as the attached document.
Throws:
java.lang.Exception
Since:
P8 4.0.3

applySecurityTemplateMany

public void applySecurityTemplateMany(filenet.vw.api.VWAttachment[] atts,
                                      java.lang.String templateGUID)
                               throws java.lang.Exception
Applies a security template to an array of homogeneous attachments. Note that the attachments must be associated with a security policy and that the template must belong to the policy.

Specified by:
applySecurityTemplateMany in interface filenet.contentops.IContentOperations
Parameters:
atts - An array of VWAttachment objects (document type only) identifying the objects to which to apply the security template. These objects must be associated with a security policy.
templateGUID - A String containing the GUID of a custom/application template. The template must be associated with the same security policy as the attached objects.
Throws:
java.lang.Exception
Since:
P8 4.0.3

changeClass

public void changeClass(filenet.vw.api.VWAttachment att,
                        java.lang.String classId)
                 throws java.lang.Exception
Changes the class of a supplied custom object, document or folder.

Specified by:
changeClass in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object for the class to change. The object can be a custom object, folder or document.
classId - A String containing the class ID for the new class to apply. The new class must be of the same type (custom object, document or folder) as the object's previous class.
Throws:
java.lang.Exception
Since:
P8 4.0.3

checkin

public filenet.vw.api.VWAttachment checkin(filenet.vw.api.VWAttachment att,
                                           java.lang.String[] propArray,
                                           java.lang.String fileName,
                                           java.lang.String mimeType,
                                           java.lang.String content)
                                    throws java.lang.Exception
Checks in an attached document as a new major version. As part of the checkin, content and property values can also be set.

Specified by:
checkin in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object (document or custom object) for the document to check in. This document must already be checked out.
propArray - A String array of properties (if any) to apply to the new document version. If no properties need to be set, specify a null string {""} as an empty set.
fileName - A String containing the file name for the attached document.
mimeType - A String containing the MIME type for any new content specified.
content - A String containing the content of the new version. For newlines, use "\n".
Returns:
A VWAttachment object identifying the new document version.
Throws:
java.lang.Exception
Since:
P8 4.0.3

checkout

public void checkout(filenet.vw.api.VWAttachment att)
              throws java.lang.Exception
Checks out an attachment from a repository.

Specified by:
checkout in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object (document or custom object) for the document to check out. This document must not currently be checked out.
Throws:
java.lang.Exception
Since:
P8 4.0.3

copy

public filenet.vw.api.VWAttachment copy(filenet.vw.api.VWAttachment att,
                                        boolean file)
                                 throws java.lang.Exception
Copies a document or custom object within the same repository.

Note: If a document is specified, only the first content element is copied.

Specified by:
copy in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object for the attached document or custom object to copy.
file - A boolean value. If true, the object copy will be filed into the same folder as the originating object. If false, the object copy will not be filed at all.
Returns:
A VWAttachment object referencing the new document or custom object copy.
Throws:
java.lang.Exception
Since:
P8 4.0.3

copyMany

public filenet.vw.api.VWAttachment[] copyMany(filenet.vw.api.VWAttachment[] atts,
                                              boolean file)
                                       throws java.lang.Exception
Copies documents or custom objects within the same repository.

Note: If documents are specified, only the first content element in each document is copied.

Specified by:
copyMany in interface filenet.contentops.IContentOperations
Parameters:
atts - An array of VWAttachment objects for the attached documents or custom objects to copy.
file - A boolean value. If true, the object copies will be filed into the same folder as the originating objects. If false, the object copies will not be filed at all.
Returns:
An array of VWAttachment objects referencing the new document or custom object copies.
Throws:
java.lang.Exception
Since:
P8 4.0.3

createCustomObject

public filenet.vw.api.VWAttachment createCustomObject(filenet.vw.api.VWAttachment destFolder,
                                                      java.lang.String className,
                                                      java.lang.String[] propArray)
                                               throws java.lang.Exception
Creates a custom object using a specified class, and property values. The object is filed into the specified folder.

Specified by:
createCustomObject in interface filenet.contentops.IContentOperations
Parameters:
destFolder - A VWAttachment object identifying the folder in which to create the new custom object.
className - A String containing the class name to use for the new custom object.
propArray - A String array containing the value pairs specifying the properties for the new custom object. The format is: {propName1, dataType1, propValue1, propName2, dataType2, ...}.
Returns:
A VWAttachment object referencing the new custom object.
Throws:
java.lang.Exception
Since:
P8 4.0.3

createDocument

public filenet.vw.api.VWAttachment createDocument(filenet.vw.api.VWAttachment destFolder,
                                                  java.lang.String className,
                                                  java.lang.String[] propArray,
                                                  java.lang.String fileName,
                                                  java.lang.String mimeType,
                                                  java.lang.String content)
                                           throws java.lang.Exception
Creates a document using the specified class, properties, and content. The document is filed into the specified folder.

Specified by:
createDocument in interface filenet.contentops.IContentOperations
Parameters:
destFolder - A VWAttachment object identifying the folder in which to create the new document.
className - A String containing the class name to use for the new document.
propArray - A String array containing the value pairs specifying the properties for the new document. The format is: {propName1, dataType1, propValue1, propName2, dataType2, ...}.
fileName - A String containing the file name for the new document.
mimeType - A String containing the MIME type (such as, text/plain or text/xml) for the new content specified.
content - A String containing the content of the new document. For newlines, use "\n".
Returns:
A VWAttachment object referencing the new document.
Throws:
java.lang.Exception
Since:
P8 4.0.3

createFolder

public filenet.vw.api.VWAttachment createFolder(filenet.vw.api.VWAttachment parentFolderAtt,
                                                java.lang.String className,
                                                java.lang.String[] propArray)
                                         throws java.lang.Exception
Creates a folder, either at the root of the object store or as a child of an attached folder.

Specified by:
createFolder in interface filenet.contentops.IContentOperations
Parameters:
parentFolderAtt - A VWAttachment object identifying the parent location of the new folder. If the desired location of the child folder is at the top of the object store, specify "||0|0||". This represents an empty attachment.
className - A String containing the class name to use for the new folder.
propArray - A String array containing the value pairs specifying the properties for the new folder. The format is: {propName1, dataType1, propValue1, propName2, dataType2, ...}. Note: The folder name property must be set.
Returns:
A VWAttachment object referencing the new folder object.
Throws:
java.lang.Exception
Since:
P8 4.0.3

delete

public void delete(filenet.vw.api.VWAttachment objAtt)
            throws java.lang.Exception
Deletes the specified attachment.

Specified by:
delete in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object (custom object, document, or folder) identifying the object to delete.
Throws:
java.lang.Exception
Since:
P8 4.0.3

deleteMany

public void deleteMany(filenet.vw.api.VWAttachment[] list)
                throws java.lang.Exception
Deletes an array of specified attachments.

Specified by:
deleteMany in interface filenet.contentops.IContentOperations
Parameters:
list - An array of VWAttachment objects (custom object, document, or folder) to delete.
Throws:
java.lang.Exception
Since:
P8 4.0.3

fileMany

public void fileMany(filenet.vw.api.VWAttachment folder,
                     filenet.vw.api.VWAttachment[] objects)
              throws java.lang.Exception
Files one or more objects (documents or custom objects) into a specified folder. The objects will not be unfiled from their existing containers (if any).

Specified by:
fileMany in interface filenet.contentops.IContentOperations
Parameters:
folder - A VWAttachment object identifying the folder in which to file the object or objects.
objects - An array of VWAttachment objects identifying the objects to file.
Throws:
java.lang.Exception
Since:
P8 4.0.3

getContent

public java.lang.String[] getContent(filenet.vw.api.VWAttachment att)
                              throws java.lang.Exception
Gets the content of the attached document.

Specified by:
getContent in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object (custom object or document) from which the content is retrieved.
Returns:
A String array of three elements: Element 1 is the file name; element 2 is the MIME type; element 3 is the content.
Throws:
java.lang.Exception
Since:
P8 4.0.3

getObjFromPath

public filenet.vw.api.VWAttachment getObjFromPath(java.lang.String osName,
                                                  java.lang.String path,
                                                  java.lang.String objType)
                                           throws java.lang.Exception
Gets an object (custom object, folder or document) from a specified repository using a specified path.

Specified by:
getObjFromPath in interface filenet.contentops.IContentOperations
Parameters:
osName - A String containing the name or GUID of the repository storing the object.
path - A String containing the path of the desired object (such as, "/MyFolder/Mydoc.doc").
objType - A String containing the name of the object type. This must be one of the following: "custom object", "document" or "folder".
Returns:
A VWAttachment object referencing the object retrieved, or an empty attachment if the object does not exist.
Throws:
java.lang.Exception
Since:
P8 4.0.3

getObjectProperty

public filenet.vw.api.VWAttachment getObjectProperty(filenet.vw.api.VWAttachment att,
                                                     java.lang.String propName)
                                              throws java.lang.Exception
Gets the object referenced by an attached object's object-valued property.

An object-valued property is a property that has as its value a reference to an object.

Specified by:
getObjectProperty in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object identifying the object having the object-valued property.
propName - A String containing the name of the object-valued property.
Returns:
A VWAttachment object for the object referenced by the object-valued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiBooleanProperty

public java.lang.Boolean[] getMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt,
                                                   java.lang.String propName)
                                            throws java.lang.Exception
Gets the Boolean values of a multivalued property.

Specified by:
getMultiBooleanProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of the Boolean property values stored in the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiDateProperty

public java.util.Date[] getMultiDateProperty(filenet.vw.api.VWAttachment objAtt,
                                             java.lang.String propName)
                                      throws java.lang.Exception
Gets the Date values of a multivalued property.

Specified by:
getMultiDateProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of the Date property values stored in the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiDoubleProperty

public java.lang.Double[] getMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt,
                                                 java.lang.String propName)
                                          throws java.lang.Exception
Gets the Double values of a multivalued property.

Specified by:
getMultiDoubleProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of the Double property values stored in the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiIntegerProperty

public java.lang.Integer[] getMultiIntegerProperty(filenet.vw.api.VWAttachment objAtt,
                                                   java.lang.String propName)
                                            throws java.lang.Exception
Gets the Integer values of a multivalued property.

Specified by:
getMultiIntegerProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of the Integer property values stored in the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiObjectProperty

public filenet.vw.api.VWAttachment[] getMultiObjectProperty(filenet.vw.api.VWAttachment objAtt,
                                                            java.lang.String propName)
                                                     throws java.lang.Exception
Gets the object values of a multivalued property.

An object-valued property is a property that has as its value a reference to an object.

Specified by:
getMultiObjectProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of VWAttachment objects identifying the objects referenced by the object values of the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

getMultiStringProperty

public java.lang.String[] getMultiStringProperty(filenet.vw.api.VWAttachment objAtt,
                                                 java.lang.String propName)
                                          throws java.lang.Exception
Gets the String values of a multivalued property.

Specified by:
getMultiStringProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
Returns:
An array of the String property values stored in the multivalued property.
Throws:
java.lang.Exception - Throws WcmException, PropertyNotFoundException if the specified property name is not found.
Since:
P8 4.0.3

move

public void move(filenet.vw.api.VWAttachment folder,
                 filenet.vw.api.VWAttachment object)
          throws java.lang.Exception
Moves the specified document or custom object from its existing folder to the specified folder (similar to an unfile and file operation).

Specified by:
move in interface filenet.contentops.IContentOperations
Parameters:
folder - A VWAttachment object identifying the destination folder for the object.
object - A VWAttachment object identifying the object to move. This must be a document or custom object.
Throws:
java.lang.Exception
Since:
P8 4.0.3

moveMany

public void moveMany(filenet.vw.api.VWAttachment folder,
                     filenet.vw.api.VWAttachment[] objects)
              throws java.lang.Exception
Moves the specified documents or custom objects from their existing folder to the specified folder (similar to an unfile and file operation).

Specified by:
moveMany in interface filenet.contentops.IContentOperations
Parameters:
folder - A VWAttachment object identifying the destination folder for the object.
object - An array of VWAttachment objects identifying the objects to move. These must be a documents or custom objects.
Throws:
java.lang.Exception
Since:
P8 4.0.3

searchForMany

public filenet.vw.api.VWAttachment[] searchForMany(filenet.vw.api.VWAttachment search,
                                                   java.lang.String objectType,
                                                   int[] itemIds,
                                                   java.lang.String[] values)
                                            throws java.lang.Exception
Executes the simple search template or stored search identified in an attachment, returning an array of objects matching the search criteria.

Note: This method can be used solely for property-based search templates. It does not support content-based retrieval.

Specified by:
searchForMany in interface filenet.contentops.IContentOperations
Parameters:
search - A VWAttachment object identifying the stored search or search template to execute.
objectType - A String containing the type of object being searched for. This can be any one of the following: "document", "customobject", or "folder". Note the lack of a space in "customobject".
itemIds - When a search template is specified in the search parameter, this must be an array of int values indicating the item IDs from the XML of the search template. When a stored search is specified in the search parameter, this must be {0}, the empty set.
values - When a search template is specified in the search parameter, this must be a String array of values correlated to the array of item IDs. When a stored search is specified in the search parameter, this must be {""}, the empty set.
Returns:
An array of VWAttachment objects identifying the objects matching the search criteria.
Throws:
java.lang.Exception
Since:
P8 4.0.3

searchForOne

public filenet.vw.api.VWAttachment searchForOne(filenet.vw.api.VWAttachment search,
                                                java.lang.String objectType,
                                                int[] itemIds,
                                                java.lang.String[] values)
                                         throws java.lang.Exception
Executes the simple search template or stored search identified in an attachment, returning the first object matching the search criteria.

Note: This method can be used solely for property-based search templates. It does not support content-based retrieval.

Specified by:
searchForOne in interface filenet.contentops.IContentOperations
Parameters:
search - A VWAttachment object identifying the stored search or search template to execute.
objectType - A String containing the type of object being searched for. This can be any one of the following: "document", "customobject", or "folder". Note the lack of a space in "customobject".
itemIds - When a search template is specified in the search parameter, this must be an array of int values indicating the item IDs from the XML of the search template. When a stored search is specified in the search parameter, this must be {0}, the empty set.
values - When a search template is specified in the search parameter, this must be a String array of values correlated to the array of item IDs. When a stored search is specified in the search parameter, this must be {""}, the empty set.
Returns:
A VWAttachment object identifying the first object found to match the search criteria. There is no guarantee that the object returned is the only object matching the search criteria.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setMultiBooleanProperty

public void setMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt,
                                    java.lang.String propName,
                                    java.lang.Boolean[] values)
                             throws java.lang.Exception
Sets the Boolean values of a multivalued property.

Specified by:
setMultiBooleanProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
values - A Boolean array containing the new values for the multivalued property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setMultiDateProperty

public void setMultiDateProperty(filenet.vw.api.VWAttachment objAtt,
                                 java.lang.String propName,
                                 java.util.Date[] values)
                          throws java.lang.Exception
Sets the Date values of a multivalued property.

Specified by:
setMultiDateProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
values - A Date array containing the new values for the multivalued property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setMultiDoubleProperty

public void setMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt,
                                   java.lang.String propName,
                                   java.lang.Double[] values)
                            throws java.lang.Exception
Sets the Double values of a multivalued property.

Specified by:
setMultiDoubleProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
values - A Double array containing the new values for the multivalued property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setMultiIntegerProperty

public void setMultiIntegerProperty(filenet.vw.api.VWAttachment objAtt,
                                    java.lang.String propName,
                                    java.lang.Integer[] values)
                             throws java.lang.Exception
Sets the Integer values of a multivalued property.

Specified by:
setMultiIntegerProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
values - An Integer array containing the new values for the multivalued property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setMultiStringProperty

public void setMultiStringProperty(filenet.vw.api.VWAttachment objAtt,
                                   java.lang.String propName,
                                   java.lang.String[] values)
                            throws java.lang.Exception
Sets the String values of a multivalued property.

Specified by:
setMultiStringProperty in interface filenet.contentops.IContentOperations
Parameters:
objAtt - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
values - A String array containing the new values for the multivalued property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

setObjectProperty

public void setObjectProperty(filenet.vw.api.VWAttachment att,
                              java.lang.String propName,
                              filenet.vw.api.VWAttachment attVal)
                       throws java.lang.Exception
Sets the object value of an object-valued property.

An object-valued property is a property that has as its value a reference to an object.

Specified by:
setObjectProperty in interface filenet.contentops.IContentOperations
Parameters:
att - A VWAttachment object identifying the object having the multivalued property.
propName - A String containing the name of the multivalued property.
attVal - A VWAttachment object identifying the new object value of the property.
Throws:
java.lang.Exception
Since:
P8 4.0.3

PECMInit

public void PECMInit()
              throws java.lang.Exception
For FileNet internal use only. Do not call. Calling both of the instances of the IContentOperations to do a PECMInit()

Specified by:
PECMInit in interface filenet.contentops.IContentOperations
Throws:
java.lang.Exception
Since:
P8 4.0.3

PECMStop

public void PECMStop()
              throws java.lang.Exception
For FileNet internal use only. Do not call. Calling both of the instances of the IContentOperations to do a PECMStop()

Specified by:
PECMStop in interface filenet.contentops.IContentOperations
Throws:
java.lang.Exception
Since:
P8 4.0.3

Content Operations API

© Copyright IBM Corporation 2002, 2008. All rights reserved.