Class ContentOperations
- java.lang.Object
-
- filenet.contentops.ContentOperations
-
public class ContentOperations extends java.lang.ObjectProvides content operations on IBM Content Cortex Content Engine and IBM Content Manager repositories from Process Engine workflows. The methods are described primarily with regard to Content Engine. The content operations available for IBM Content Manager are dependent on the supporting IBM Content Manager release. For descriptions of the IBM Content Manager methods, refer to the DKContentOperationsICM API (which also implements the IContentOperations interface).Note: Date values returned by IBM Content Cortex Content Engine use the ISO 8601 datetime format:
YYYYMMDDThhmmss[,ffff]Z
Where "Z" is the UTC timezone (used when a timezone is not specified).
This class is used by the IBM Content Cortex Component Integrator.
Document Content Constraints
Because document content is stored by Process Engine as a String, the following constraints apply when working using this class:
- These MIME types are supported for document content:
- text/plain
- text/css
- text/html
- text/xml
- Attempting to get or set the content of any document format other than the MIME types listed above is not supported, and will cause unexpected behaviour. For example, you cannot get or set document content stored in Adobe Acrobat™ PDF, or Microsoft Word™ formats.
- The size of the string containing the document content is limited. Getting or sending a large string can cause unexpected behaviour.
- By default, the
ContentOperations.getContent()method uses the default system encoding (Java propertyfile.encoding) to convert bytes from the document into Java String object(s). If the default system encoding does not match the encoding of the document whose contents are being retrieved, then the returned String might be corrupted.At Component Manager start up time, you can specify an optional encoding to convert bytes to strings during the
getContent()operation call. The optional encoding is specified with the following parameter to the JVM used by the Component Manager running the CE_Operations component queue.-DCEOperations.GetContent.Encoding=<encoding>
where <encoding> is the name of a Charset as defined in java.nio.charset.StandardCharsets class. The <encoding> must be supported by the JVM that runs the Component Manager; otherwise, the user-supplied encoding is ignored. For example,-DCEOperations.GetContent.Encoding=UTF-8is a supported encoding.Set JVM parameters with the Process Task Manager. In the "JRE Parameters" edit box of the Component Manager, go to the "Advanced" tab.
If you do not specify an encoding using
CEOperations.GetContent.Encoding, then theContentOperations.getContent()method uses the default encoding of the JVM (Java propertyfile.encoding).
- Since:
- P8 4.0.3
- These MIME types are supported for document content:
-
-
Constructor Summary
Constructors Constructor and Description ContentOperations()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplySecurityTemplate(filenet.vw.api.VWAttachment att, java.lang.String templateGUID)Applies a security template to an attachment.voidapplySecurityTemplateMany(filenet.vw.api.VWAttachment[] atts, java.lang.String templateGUID)Applies a security template to an array of homogeneous attachments.voidcancelCheckout(filenet.vw.api.VWAttachment att)Cancels the checkout of an attachment that is currently checked out, by deleting the reservation object associated with it.voidchangeClass(filenet.vw.api.VWAttachment att, java.lang.String classId)Changes the class of a supplied custom object, document or folder.filenet.vw.api.VWAttachmentcheckin(filenet.vw.api.VWAttachment att, java.lang.String[] propArray, java.lang.String fileName, java.lang.String mimeType, java.lang.String content)Checks in an attachment to the repository.voidcheckout(filenet.vw.api.VWAttachment att)Checks out an attachment from a repository.filenet.vw.api.VWAttachmentcopy(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.VWAttachmentcreateCustomObject(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.VWAttachmentcreateDocument(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.VWAttachmentcreateFolder(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.voiddelete(filenet.vw.api.VWAttachment objAtt)Deletes the specified attachment.voiddeleteMany(filenet.vw.api.VWAttachment[] list)Deletes an array of specified attachments.voidfile(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment destFolder)Files a document attachment, currently existing in a repository, into a specified destination folder.voidfileMany(filenet.vw.api.VWAttachment folder, filenet.vw.api.VWAttachment[] objects)Files one or more document attachments, currently existing in a repository, into a specified destination folder.java.lang.BooleangetBooleanProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)Gets the Boolean value for the specified property from the specified document attachment.java.util.DategetChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a Date attribute value for an attribute from the specified document or folder attachment.java.lang.DoublegetChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a Double attribute value for an attribute from the specified document or folder.java.lang.IntegergetChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets an Integer attribute value for an attribute from the specified document or folder.java.lang.StringgetChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a String attribute value for an attribute from the specified document or folder.java.lang.String[]getContent(filenet.vw.api.VWAttachment att)Gets the content of the attached document.intgetContentCount(filenet.vw.api.VWAttachment att, java.lang.String contentType)Get the number of document content objects of the specified content type (or part type).java.lang.String[]getContentTypes(filenet.vw.api.VWAttachment att)Gets the content types (part types) of the specified document attachment.java.lang.String[]getContentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index)Get the document content based on an index of all the content objects of the specified content type (or part type).java.util.DategetDateProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)Gets the Date value for the specified property from the specified document attachment.java.lang.StringgetDocumentId(filenet.vw.api.VWAttachment att)Gets the document identifier of the specified document attachment.java.lang.DoublegetDoubleProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)Gets the Double value for the specified property from the specified document attachment.java.lang.IntegergetIntegerProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)Gets the Integer value for the specified property from the specified document attachment.filenet.vw.api.VWAttachmentgetLatestAttachmentVersion(filenet.vw.api.VWAttachment att)Get the latest attachment version of the specified document.java.lang.Boolean[]getMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName)Gets the Boolean values of a multivalued property.java.util.Date[]getMultiChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a list of Date values for the specified attribute of the specified document or folder in Content Manager.java.lang.Double[]getMultiChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a list of Double values for the specified attribute of the specified document or folder in Content Manager.java.lang.Integer[]getMultiChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a list of Integer values for the specified attribute of the specified document or folder in Content Manager.java.lang.String[]getMultiChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues)Gets a list of String values for the specified attribute of the specified document or folder in Content Manager.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.VWAttachmentgetObjectProperty(filenet.vw.api.VWAttachment att, java.lang.String propName)Gets the object referenced by an attached object's object-valued property.filenet.vw.api.VWAttachmentgetObjFromPath(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.StringgetStringProperty(filenet.vw.api.VWAttachment sourceDocument, java.lang.String symbolicPropName)Gets the String value for the specified property from the specified document attachment.java.lang.StringgetURLFromAttachment(filenet.vw.api.VWAttachment att, java.lang.String baseURL)Gets the URL for the document attachment.java.lang.StringgetURLFromAttachmentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index)Retrieve the URL of the document content based on an index of all the content objects for the specified part type in Content Manager.voidmove(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).voidmoveMany(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).filenet.vw.api.VWAttachmentpublish(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment publishingTemplate)Function no longer supportedfilenet.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.VWAttachmentsearchForOne(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.voidsendMail(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body)Sends mail as text/plain with no attachment.voidsendMailAttachment(java.lang.String from, java.lang.String to, java.lang.String subject, java.lang.String body, filenet.vw.api.VWAttachment[] att)Sends mail with one or more attached documents.voidsendMailTemplate(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.voidsendMailTemplateAttachment(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 one or more attached documents.voidsendMailTemplateURL(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.voidsendMailURL(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.voidsetBooleanProperty(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.voidsetChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.util.Date value)Sets a Date attribute value for an attribute from the specified document or folder.voidsetChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Double value)Sets a Double attribute value for an attribute from the specified document or folder.voidsetChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Integer value)Sets an Integer attribute value for an attribute from the specified document or folder.voidsetChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.String value)Sets a String attribute value for an attribute from the specified document or folder.voidsetContent(filenet.vw.api.VWAttachment att, java.lang.String[] content)Sets the content of the specified document attachment.voidsetContentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index, java.lang.String[] content)Sets the content of the specified document attachment.voidsetDateProperty(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.voidsetDoubleProperty(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.voidsetIntegerProperty(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.voidsetMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Boolean[] values)Sets the Boolean values of a multivalued property.voidsetMultiChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.util.Date[] values)Sets a list of Date values for the specified attribute of the specified document or folder in Content Manager.voidsetMultiChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Double[] values)Sets a list of Double values for specified attribute of the specified document or folder in Content Manager.voidsetMultiChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Integer[] values)Sets a list of Integer values for specified attribute of the specified document or folder in Content Manager.voidsetMultiChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.String[] values)Sets a list of String values for specified attribute of the specified document or folder in Content Manager.voidsetMultiDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.util.Date[] values)Sets the Date values of a multivalued property.voidsetMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Double[] values)Sets the Double values of a multivalued property.voidsetMultiIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Integer[] values)Sets the Integer values of a multivalued property.voidsetMultiStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] values)Sets the String values of a multivalued property.voidsetObjectProperty(filenet.vw.api.VWAttachment att, java.lang.String propName, filenet.vw.api.VWAttachment attVal)Sets the object value of an object-valued property.voidsetStringProperty(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.voidunfile(filenet.vw.api.VWAttachment sourceDocument, filenet.vw.api.VWAttachment fromFolder)Unfiles the specified document attachment from the specified folder.
-
-
-
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.ExceptionSends mail as text/plain with no attachment.Note: This method is not supported by Content Manager.
- 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.ExceptionSends mail with one or more attached documents. The documents are added to the email as MIME attachments.Note: This method is not supported by Content Manager.
- 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 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.ExceptionSends mail using a template. The template is used as the body of the email message.Note: This method is not supported by Content Manager.
- 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. The template is an HTML document. For example:<h1>Test Email template</h1> <p>Name: $1</p> <p>Acct Number: $2</p> <p>Hello, your request for a loan has been $3.</p> <p>Have a nice day.</p>templateVals- A String array containing the replacement values to use for the template. For example: {"John Doe","P34537","Approved"}.- 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.ExceptionSends mail using a template with one or more attached documents. The documents are added to the email as MIME attachments.Note: This method is not supported by Content Manager.
- 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. The template is an HTML document. SeesendMailTemplatefor an example.templateVals- A String array containing the replacement values to use for the template. SeesendMailTemplatefor an example.attList- An array of VWAttachment objects identifying the documents for 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.ExceptionSends mail using a template with the URLs of the attached documents appended to the end of the body of the email.Note: This method is not supported by Content Manager.
- 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. The template is an HTML document. SeesendMailTemplatefor an example.templateVals- A String array containing the replacement values to use for the template.SeesendMailTemplatefor an example.att- An array of VWAttachment objects identifying the documents for the email MIME attachments.workplaceUrl- A String containing the base 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.ExceptionSends mail with the URLs of the attached documents appended to the end of the body of the email.Note: This method is not supported by Content Manager.
- 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 email MIME attachments.workplaceUrl- A String containing the base 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.ExceptionGets the Boolean value for the specified property from the specified document attachment.Note: This method is not supported by Content Manager.
- 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.ExceptionGets the Date value for the specified property from the specified document attachment.- 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.ExceptionGets the Double value for the specified property from the specified document attachment.- 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.ExceptionGets the Integer value for the specified property from the specified document attachment.- 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.ExceptionGets the String value for the specified property from the specified document attachment.- 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.ExceptionGets the URL for the document attachment.- 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.ExceptionSets the Boolean value for the specified property on the specified document attachment.Note: This method is not supported by Content Manager.
- 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.ExceptionSets the Date value for the specified property on the specified document attachment.- 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.ExceptionSets the Double value for the specified property on the specified document attachment.- 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.ExceptionSets the Integer value for the specified property on the specified document attachment.- 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.Process Designer users can also use the <<NULL>> macro for this value to indicate a value is not set.
- 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.ExceptionSets the String value for the specified property on the specified document attachment.- 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.ExceptionFiles a document attachment, currently existing in a repository, into a specified destination folder. If the document attachment already exists in the specified destination, the request to file the object is ignored.Note: For Content Engine, this method calls the (Content Engine Java API) Folder.file method without supplying a containmentName parameter value. This value is left for the Content Engine to construct.
- 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.ExceptionUnfiles 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: If the object does not exist in the specified folder, the request to unfile the object is ignored.
- 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.ExceptionFunction no longer supported- Throws:
java.lang.Exception- Since:
- P8 5.5.9
-
applySecurityTemplate
public void applySecurityTemplate(filenet.vw.api.VWAttachment att, java.lang.String templateGUID) throws java.lang.ExceptionApplies a security template to an attachment. The object must be associated with a security policy and the specified template must belong to the policy. A SecurityTemplate object is a template for applying permissions to a Document object.Note: This method is not supported by Content Manager.
- 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.ExceptionApplies a security template to an array of homogeneous attachments. The attachments must be associated with a security policy and that the template must belong to the policy. A SecurityTemplate object is a template for applying permissions to a Document object.Note: This method is not supported by Content Manager.
- 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.ExceptionChanges the class of a supplied custom object, document or folder.Note: This method is not supported by Content Manager.
- 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.ExceptionChecks in an attachment to the repository. For Content Engine, the document is checked in as a new major version. As part of the checkin operation, content and property values can also be set.- 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. The format is: {propName1, dataType1, propValue1, propName2, dataType2, ...}. 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. The following MIME types are supported:- text/plain
- text/css
- text/html
- text/xml
Attempting to check in a document of any other document format (such as, a PDF or a Microsoft Word™) is not supported and will cause unexpected behaviour.
content- A String containing the content of the new version. For new lines, use "\n". If no content needs to be set, this can be the value "<<null>>" to signify an empty string.Note: Because the content is represented as a String, it is intended only for attachments having one of the MIME types supported by the
mimeTypeparameter.IBM Content Cortex Process Designer users can use the NULL_STRING_VALUE_TEMPLATE macro function for the
contentvalue to indicate the content will not be updated (for example, checking in a document without updating the content).The size of this String value is limited. Sending a large string can cause unexpected behaviour.
The
contentvalue is checked in as the first element of the content elements. If the attachment object had multiple content elements, the checkin operation will replace all of the existing content elements with this single content element.- 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.ExceptionChecks out an attachment from a repository.- 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.ExceptionCopies a document or custom object within the same repository.Note: If a document is specified, only the first content element is copied.
The following MIME types are supported for the document attachment being copied:
- text/plain
- text/css
- text/html
- text/xml
Attempting to copy a document of any other document format (such as, a Adobe Acrobat PDF or Microsoft Word) is not supported and will cause unexpected behaviour.
- 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.ExceptionCopies documents or custom objects within the same repository.The following MIME types are supported for the document attachments being copied:
- text/plain
- text/css
- text/html
- text/xml
Attempting to copy a document of any other document format (such as, a Adobe Acrobat PDF or Microsoft Word) is not supported and will cause unexpected behaviour.
- 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.ExceptionCreates a custom object using a specified class, and property values. The object is filed into the specified folder.Note: This method is not supported by Content Manager.
- 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.ExceptionCreates a document using the specified class, properties, and content. The document is filed into the specified folder.- 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 for any new content specified. The following MIME types are supported:- text/plain
- text/css
- text/html
- text/xml
Attempting to create a document of any other document format (such as, a Adobe Acrobat PDF or Microsoft Word) is not supported and will cause unexpected behaviour.
content- A String containing the content of the new version. For new lines, use "\n".Note: Because the content is represented as a String, it is intended only for attachments having one of the MIME types supported by the
mimeTypeparameter.IBM Content Cortex Process Designer users can use the NULL_STRING_VALUE_TEMPLATE macro function for the
contentvalue to indicate the content will not be updated (for example, checking in a document without updating the content).The size of this String value is limited. Sending a large string can cause unexpected behaviour.
- 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.ExceptionCreates a folder, either at the root of the object store or as a child of an attached folder.- 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 "||2|3|CE_ObjectStore|" or "|||3|CE_ObjectStore|"; where "2" is the indicator for the Folder type (this value is ignored), 3 is the indicator for the Content Engine, and CE_ObjectStore is the Library name. 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.ExceptionDeletes the specified attachment. Note that if the VWAttachment object is a document it represents one specific version of that document, not all versions, and only the specified version will be deleted.- 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.ExceptionDeletes an array of specified attachments. Any document attachments represent one specific version of that document, not all versions, and only the specified version(s) will be deleted.- 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.ExceptionFiles one or more document attachments, currently existing in a repository, into a specified destination folder. If a document attachment already exists in the specified destination, the request to file the object is ignored.- 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.ExceptionGets the content of the attached document. For Content Engine, this method gets the first content element of the document.- 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.
The following content MIME types are supported (in element 2), and identify the format of the content in element 3:
- text/plain
- text/css
- text/html
- text/xml
Refer to Document Content Constraints for more information.
- 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.ExceptionGets an object (custom object, folder or document) from a specified repository using a specified path.Note: This method is not supported by Content Manager.
- 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.- For folder object types, use the folder path (such as, "/MyFolder").
- For custom object or document object types, use the folder path with the containment name of the document or custom object (such as, "/MyFolder/MyDocA.txt").
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.ExceptionGets 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.
Note: This method is not supported by Content Manager.
- 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.ExceptionGets the Boolean values of a multivalued property.Note: This method is not supported by Content Manager.
- 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.ExceptionGets the Date values of a multivalued property.- 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
- See Also:
- Content Engine date format
-
getMultiDoubleProperty
public java.lang.Double[] getMultiDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName) throws java.lang.ExceptionGets the Double values of a multivalued property.- 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.ExceptionGets the Integer values of a multivalued property.- 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.ExceptionGets the object values of a multivalued property.An object-valued property is a property that has as its value a reference to an object.
Note: This method is not supported by Content Manager.
- 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.ExceptionGets the String values of a multivalued property.- 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.ExceptionMoves the specified document or custom object from its existing folder to the specified folder (similar to an unfile and file operation).- 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.ExceptionMoves the specified documents or custom objects from their existing folder to the specified folder (similar to an unfile and file operation).- Parameters:
folder- A VWAttachment object identifying the destination folder for the object.objects- 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.ExceptionExecutes 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.
- 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 thesearchparameter, 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 thesearchparameter, this must be {0}, the empty set.values- When a search template is specified in thesearchparameter, this must be a String array of values correlated to the array of item IDs. When a stored search is specified in thesearchparameter, this must be {""}, the empty set.- Returns:
- An array of VWAttachment objects identifying the objects matching the search criteria. The search criteria and the search results must be located in the same object store. The object store is specified by the library portion of the input search criteria.
- Throws:
java.lang.Exception- Since:
- P8 4.0.3
- See Also:
- Content Engine date format
-
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.ExceptionExecutes 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.
- 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 thesearchparameter, 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 thesearchparameter, this must be {0}, the empty set.values- When a search template is specified in thesearchparameter, this must be a String array of values correlated to the array of item IDs. When a stored search is specified in thesearchparameter, this must be {""}, the empty set.- Returns:
- A VWAttachment object identifying the first object found to match the search criteria. The search criteria and the search results must be located in the same object store. The object store is specified by the library portion of the input 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
- See Also:
- Content Engine date format
-
setMultiBooleanProperty
public void setMultiBooleanProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.Boolean[] values) throws java.lang.ExceptionSets the Boolean values of a multivalued property. To clear all values, see setMultiStringProperty.Note: This method is not supported by Content Manager.
- 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.ExceptionSets the Date values of a multivalued property. To clear all values, see setMultiStringProperty.- 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.ExceptionSets the Double values of a multivalued property. To clear all values, see setMultiStringProperty.- 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.ExceptionSets the Integer values of a multivalued property. To clear all values, see setMultiStringProperty.- 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.ExceptionSets the String values of a multivalued property.Note: To clear all existing values of any multi-valued property, regardless of datatype, pass an array with a single element containing the string null alias ("<<null>>") for the values parameter of this method. Passing an empty string ("") will not work and will cause an exception on some database platforms.
- 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. An array with a single null element ("<<null>>") will cause all existing values to be removed.- 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.ExceptionSets 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.
Note: This method is not supported by Content Manager.
- 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
-
cancelCheckout
public void cancelCheckout(filenet.vw.api.VWAttachment att) throws java.lang.ExceptionCancels the checkout of an attachment that is currently checked out, by deleting the reservation object associated with it.Note: This method is not supported by Content Manager.
- Parameters:
att- A VWAttachment object identifying the object for which the checkout is to be canceled.- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getContentWithIndex
public java.lang.String[] getContentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index) throws java.lang.ExceptionGet the document content based on an index of all the content objects of the specified content type (or part type).- Parameters:
att- A VWAttachment object (custom object or document) from which the content is retrieved.contentType- A String identifying the object content type to use in the search. For the Content Engine, the check for content type is ignored when this parameter is null (returning any content referenced by the specified index); otherwise, this method returns the document content that matches both the content type and the specified index.IBM Content Cortex Process Designer users can use the NULL_STRING_VALUE_TEMPLATE macro function for the
contentTypevalue to indicate the content will not be updated (for example, checking in a document without updating the content).index- An integer indicating the (nth) index element referencing the object of contentType. The index origin is 1 (one).- Returns:
- A String array of three elements: Element 1 is the file name; element 2 is the MIME type; element
3 is the content.
The following content MIME types are supported (in element 2), and identify the format of the content in element 3:
- text/plain
- text/css
- text/html
- text/xml
If the
contentTypeparameter is not specified, this method returns any document referenced by the specified index. WhencontentTypeis specified, this method returns the document that matches both the content type and the specified index.Refer to Document Content Constraints for more information.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getContentCount
public int getContentCount(filenet.vw.api.VWAttachment att, java.lang.String contentType) throws java.lang.ExceptionGet the number of document content objects of the specified content type (or part type).- Parameters:
att- A VWAttachment object (custom object or document) from which the content object count is retrieved.contentType- A String identifying the object content type to use in the search. For the Content Engine, the check for content type is ignored when this parameter is null (returning any content referenced by the specified index); otherwise, this method returns the document content that matches both the content type and the specified index.IBM Content Cortex Process Designer users can use the NULL_STRING_VALUE_TEMPLATE macro function for the
contentTypevalue to indicate the content will not be updated (for example, checking in a document without updating the content).- Returns:
- An integer indicating the number of content objects of the specified content type (or part type).
If the
contentTypeparameter is not specified, this method returns the total number of content elements attached in the document. WhencontentTypeis specified, this method returns the number of documents that match the content type. - Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getLatestAttachmentVersion
public filenet.vw.api.VWAttachment getLatestAttachmentVersion(filenet.vw.api.VWAttachment att) throws java.lang.ExceptionGet the latest attachment version of the specified document.- Parameters:
att- A VWAttachment object (document) from which the latest version is retrieved.- Returns:
- A VWAttachment object for the latest version of the document. For Content Engine, this is the current version, which can be either a minor or major version.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getURLFromAttachmentWithIndex
public java.lang.String getURLFromAttachmentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index) throws java.lang.ExceptionRetrieve the URL of the document content based on an index of all the content objects for the specified part type in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
att- A VWAttachment object (document) from which the URL is retrieved.contentType- A String containing the Content Manager part type for the document model document (such as, ICMBASE, ICMBASETEXT, ICMANNOTATION, ICMNOTELOG, or ICMBASESTREAM).index- An integer indicating the (nth) index element referencing the object of contentType. The index origin is 1 (one).- Returns:
- A String containing the URL for the document part of the specified document.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getMultiChildDateProperty
public java.util.Date[] getMultiChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a list of Date values for the specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- A String array of child attribute values.- Returns:
- An array of Date values for the attribute specified.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getMultiChildDoubleProperty
public java.lang.Double[] getMultiChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a list of Double values for the specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- A String array of child attribute values.- Returns:
- An array of Double values for the attribute specified.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getMultiChildIntegerProperty
public java.lang.Integer[] getMultiChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a list of Integer values for the specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- A String array of child attribute values.- Returns:
- An array of Integer values for the attribute specified.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getMultiChildStringProperty
public java.lang.String[] getMultiChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a list of String values for the specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- A String array of child attribute values.- Returns:
- An array of String values for the attribute specified.
- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
setMultiChildDateProperty
public void setMultiChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.util.Date[] values) throws java.lang.ExceptionSets a list of Date values for the specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.values- An array of Date values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
setMultiChildDoubleProperty
public void setMultiChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Double[] values) throws java.lang.ExceptionSets a list of Double values for specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.values- An array of Double values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
setMultiChildIntegerProperty
public void setMultiChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Integer[] values) throws java.lang.ExceptionSets a list of Integer values for specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.values- An array of Integer values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
setMultiChildStringProperty
public void setMultiChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.String[] values) throws java.lang.ExceptionSets a list of String values for specified attribute of the specified document or folder in Content Manager.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object referencing the document or folder information.propName- A String containing the name of the attribute having the Date values.childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.values- An array of String values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 4.5.1
-
getDocumentId
public java.lang.String getDocumentId(filenet.vw.api.VWAttachment att) throws java.lang.ExceptionGets the document identifier of the specified document attachment.- Parameters:
att- A VWAttachment object (document) from which the document id is retrieved.- Returns:
- A String containing the document id of the attachment.
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
getContentTypes
public java.lang.String[] getContentTypes(filenet.vw.api.VWAttachment att) throws java.lang.ExceptionGets the content types (part types) of the specified document attachment.Note: This method is not supported by Content Engine.
- Parameters:
att- A VWAttachment object from which the number of content types is retrieved.- Returns:
- A String array containing the Content Manager part type for the document model document (such as, ICMBASE, ICMBASETEXT, ICMANNOTATION, ICMNOTELOG, or ICMBASESTREAM).
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setContent
public void setContent(filenet.vw.api.VWAttachment att, java.lang.String[] content) throws java.lang.ExceptionSets the content of the specified document attachment.Note: This method is not supported by Content Engine.
- Parameters:
att- A VWAttachment object (document) for which to set the content.content- A three-element String array. Element 1 is the filename, element 2 is the mimeType, and element 3 is the content.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setContentWithIndex
public void setContentWithIndex(filenet.vw.api.VWAttachment att, java.lang.String contentType, int index, java.lang.String[] content) throws java.lang.ExceptionSets the content of the specified document attachment.Note: This method is not supported by Content Engine.
- Parameters:
att- A VWAttachment object (document) for which to set the content.contentType- A String containing the specified content type for the document attachment. This is the Content Manager part type for the document model document (such as, ICMBASE, ICMBASETEXT, ICMANNOTATION, ICMNOTELOG, or ICMBASESTREAM).index- An integer indicating the (nth) index element referencing the object of contentType. The index origin is 1 (one).content- A three-element String array. Element 1 is the filename, element 2 is the mimeType, and element 3 is the content.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
getChildDateProperty
public java.util.Date getChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a Date attribute value for an attribute from the specified document or folder attachment.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Returns:
- A Date attribute value.
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
getChildDoubleProperty
public java.lang.Double getChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a Double attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Returns:
- A Double attribute value.
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
getChildIntegerProperty
public java.lang.Integer getChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets an Integer attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Returns:
- An Integer attribute value.
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
getChildStringProperty
public java.lang.String getChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues) throws java.lang.ExceptionGets a String attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Returns:
- A String attribute value.
- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setChildDateProperty
public void setChildDateProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.util.Date value) throws java.lang.ExceptionSets a Date attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setChildDoubleProperty
public void setChildDoubleProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Double value) throws java.lang.ExceptionSets a Double attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setChildIntegerProperty
public void setChildIntegerProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.Integer value) throws java.lang.ExceptionSets an Integer attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
setChildStringProperty
public void setChildStringProperty(filenet.vw.api.VWAttachment objAtt, java.lang.String propName, java.lang.String[] childPropNames, java.lang.String[] childPropTypes, java.lang.String[] childPropValues, java.lang.String value) throws java.lang.ExceptionSets a String attribute value for an attribute from the specified document or folder.Note: This method is not supported by Content Engine.
- Parameters:
objAtt- A VWAttachment object for the document or folder information.propName- A String containing the attribute name. Attribute names are in the form: ChildComponentName1/ChildComponentName2/�/attributeName or ChildComponentName1/ChildComponentName2/�/attributeGroup.attributeName).childPropNames- A String array of child attribute names.childPropTypes- A String array of child attribute types.childPropValues- An String array of values to set for the attribute specified.- Throws:
java.lang.Exception- Since:
- P8 5.0
-
-