FileNet Content Services
Java Connector v3.0

com.filenet.wcm.api
Interface Annotation

All Superinterfaces:
BaseObject, CreatableObject, GettableObject, ReadableMetadataObject, ReadableSecurityObject, java.io.Serializable, ValueObject, WriteableMetadataObject, WriteableSecurityObject

public interface Annotation
extends BaseObject, GettableObject, CreatableObject, WriteableSecurityObject

Not Implemented in CS Java Connector v3.0.

An Annotation object represent incidental information that is attached to another object for the purpose of annotating that object. An Annotation object is independently securable but is not versionable. Objects that can have an annotation associated with them include CustomObject, Document, and Folder objects (and their subclasses).

To create an Annotation object and persist it to a Content Services object store, call the createObject method on an ObjectStore object. For more information, see Creating an Annotation Object. You can instantiate a persisted Annotation object in the following ways:


Field Summary
 
Fields inherited from interface com.filenet.wcm.api.BaseObject
EXPORT_DEFAULT, EXPORT_ENCODED_CONTENT, EXPORT_FULL, EXPORT_OBJECT_ID, EXPORT_OBJECT_SECURITY, IMPORT_DEFAULT, IMPORT_OBJECT_ID, IMPORT_OWNER, IMPORT_PERMISSIONS, TYPE_ACTIVE_MARKING, TYPE_ANNOTATION, TYPE_ANY, TYPE_CBR_ENGINE_TYPE, TYPE_CHOICE, TYPE_CHOICELIST, TYPE_CLASS_SUBSCRIPTION, TYPE_CLASSDEFINITION, TYPE_CLASSDESCRIPTION, TYPE_COLUMN_DEFINITION, TYPE_COMPUTER, TYPE_CONTENT_CACHE_SERVICE, TYPE_CONTENT_MGR_SERVICE, TYPE_CONTENT_REFERENCE, TYPE_CONTENT_TRANSFER, TYPE_CUSTOMOBJECT, TYPE_DOCUMENT, TYPE_DOCUMENT_CLASSIFICATION_ACTION, TYPE_DOCUMENT_LIFECYCLE_ACTION, TYPE_DOCUMENT_LIFECYCLE_POLICY, TYPE_DOCUMENTSTATE, TYPE_DOMAIN, TYPE_DYNAMIC_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_ENTIRENETWORK, TYPE_EVENT, TYPE_EVENT_ACTION, TYPE_FEATURE_ADD_ON, TYPE_FILESTORE, TYPE_FOLDER, TYPE_GROUP, TYPE_INSTANCE_SUBSCRIPTION, TYPE_LINK, TYPE_LOCALIZED_STRING, TYPE_MARKING_SET, TYPE_MULTIPLEVALUES, TYPE_OBJECT_STORE, TYPE_OBJECTSET, TYPE_OBJSTORE_SERVICE, TYPE_PERMISSION, TYPE_PROPERTY_DEFINITION, TYPE_PROPERTYDESCRIPTION, TYPE_PROPERTYDESCRIPTIONS, TYPE_PUBLISH_REQUEST, TYPE_PUBLISH_TEMPLATE, TYPE_READONLY_OBJECT_SET, TYPE_REALM, TYPE_REFERENTIAL_CONTAINMENT_RELATIONSHIP, TYPE_SECURITY_POLICY, TYPE_SECURITY_TEMPLATE, TYPE_STORAGE_POLICY, TYPE_STORED_SEARCH, TYPE_STYLE_TEMPLATE, TYPE_SUBSCRIPTION, TYPE_TABLE_DEFINITION, TYPE_TRANSIENT, TYPE_USER, TYPE_VERSIONSERIES, TYPE_WORKFLOW_CLASS_SUBSCRIPTION, TYPE_WORKFLOW_INSTANCE_SUBSCRIPTION, TYPE_WORKFLOWDEFINITION, TYPE_XML_PROPERTY_MAPPING_SCRIPT
 
Method Summary
 void changeClass(java.lang.String classId, Properties props, Permissions perms)
          

Not Implemented in CS Java Connector v3.0.

 void delete()
          

Not Implemented in CS Java Connector v3.0.

 int getAccessMask()
          

Not Implemented in CS Java Connector v3.0.

 TransportInputStream getContent()
          

Not Implemented in CS Java Connector v3.0.

 TransportInputStream getContentElement(int contentElement)
          

Not Implemented in CS Java Connector v3.0.

 int[] getContentElementObjectTypes()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getContentReferenceLocation()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getContentReferenceLocation(int contentElement)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getContentReferenceMimeType()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getContentReferenceMimeType(int contentElement)
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getFilename()
          

Not Implemented in CS Java Connector v3.0.

 java.lang.String getFilename(int contentElement)
          

Not Implemented in CS Java Connector v3.0.

 Permissions getUserAccess()
          

Not Implemented in CS Java Connector v3.0.

 Permissions getUserAccess(java.lang.String collectionType)
          

Not Implemented in CS Java Connector v3.0.

 Permissions getUserAccess(java.lang.String collectionType, java.lang.String userId)
          

Not Implemented in CS Java Connector v3.0.

 void setContent(TransportInputStream content)
          

Not Implemented in CS Java Connector v3.0.

 void setContentReference(java.lang.String location, java.lang.String mimeType, int contentElement)
          

Not Implemented in CS Java Connector v3.0.

 
Methods inherited from interface com.filenet.wcm.api.BaseObject
equals, exportObject, getClassId, getId, getName, getObjectStoreId, getObjectType, getSession, hashCode, thisBaseObject
 
Methods inherited from interface com.filenet.wcm.api.WriteableSecurityObject
setPermissions, setPermissions
 
Methods inherited from interface com.filenet.wcm.api.WriteableMetadataObject
setProperties
 
Methods inherited from interface com.filenet.wcm.api.ReadableMetadataObject
getProperties, getProperties, getPropertiesXML, getPropertyBinaryValue, getPropertyBooleanValue, getPropertyDateValue, getPropertyDoubleValue, getPropertyIntValue, getPropertyStringValue, getPropertyValue, getPropertyValuesValue, refresh, refresh
 
Methods inherited from interface com.filenet.wcm.api.ReadableSecurityObject
getPermissions, getPermissions
 

Method Detail

delete

public void delete()

Not Implemented in CS Java Connector v3.0.

Deletes this Annotation object from the object store. To execute this method, the user must have Delete permission (Permission.RIGHT_DELETE or Permission.LEVEL_FULL_CONTROL_ANNOTATION) on this Annotation object.

After a successful call to the delete method, all properties are considered stale and are removed from cache for this Annotation.


changeClass

public void changeClass(java.lang.String classId,
                        Properties props,
                        Permissions perms)

Not Implemented in CS Java Connector v3.0.

Changes the class with which this Annotation object is associated in the object store. The new class and the old class must have the same base class type (that is, if an object's current class is an annotation class, you cannot change it to a document class, folder class, etc.).

Since the required properties for the two classes might differ, this method takes an optional Properties collection as one of its parameters. The collection can be empty or the parameter can be null if no property changes are required. Properties on the old class that do not exist on the new class will be lost. This method will throw an exception if you explicitly set the value of a contained Property object that cannot be set due to its Settability property (for example, it is Read-only). Note that this exception will be thrown even if the new value of a property you explicitly set is the same as its old value.

This method also takes an optional Permissions collection as one of its parameters. If this parameter is null, the Annotation object's security is not modified, even if the object's current security is derived from the default security for its source class. Note that this Permissions collection represents the basic object permissions for the object (that is, the object's Permissions property). If you pass in an empty Permissions collection, all existing permissions are removed. If the permissions are modified inappropriately, it is possible to make a change that cannot be reversed by the same user.

Parameters:
classId - A String that represents the ID or the symbolic name of the class to which this object is to be changed. (The ClassDescription interface has constants for well-known class IDs.)

props - A Properties collection whose elements specify the properties to change. Can be null or an empty collection if no property changes are necessary.

perms - A Permissions collection whose elements specify the permissions to change. Can be null if no permission changes are necessary. Passing an empty collection removes all existing permissions.

an Object's Class

getContent

public TransportInputStream getContent()

Not Implemented in CS Java Connector v3.0.

Provides a stream retrieving the first content element of this Annotation object. The first content element must be a content transfer element. Use the accessor methods on the returned TransportInputStream object to determine the filename, MIME type, and content size of the content element (if known). This method throws an exception if you call it on an annotation that has no content or that has its first content element as a content reference element.

If an annotation has more than one content transfer element associated with it, use getContentElement to specify which element to return. Use getContentReferenceLocation and getContentReferenceMimeType to return the location and MIME type, respectively, for a content reference element.

Returns:
A TransportInputStream object that contains the input stream of this Annotation object's first content element.


getContentElement

public TransportInputStream getContentElement(int contentElement)

Not Implemented in CS Java Connector v3.0.

Provides a stream retrieving the specified content transfer element of this Annotation object. Use the accessor methods on the returned TransportInputStream object to determine the filename, MIME type, and content size of the content element (if known). This method throws an exception if you call it on an annotation that does not have the specified content element or the specified content element is a content reference element.

To return the location and MIME type of a specified content reference element, call getContentReferenceLocation(contentElement) and getContentReferenceMimeType(contentElement).

Parameters:
contentElement - The number of the content transfer element to be retrieved. Content element numbering begins at 1.

Returns:
A TransportInputStream object that contains the content for the specified content element.


setContent

public void setContent(TransportInputStream content)

Not Implemented in CS Java Connector v3.0.

Sets the content for this Annotation object and persists it to the Content Services object store. The content element you set must be a content transfer element (content stored in a Content Services object store) and not a content reference element (content stored externally, which you set by calling setContentReference). Before you call setContent, use the accessor methods on the TransportInputStream object to supply content size, MIME type, and filename.

The setContent method defaults to setting the first content element for an annotation. You can set additional content transfer elements via the TransportInputStream object's setContentElement method. You must either add elements in ascending order with no gaps (1, 2, 3, 4, ...) or you can replace elements that were added earlier to this Annotation object. If you attempt to add an element that would create a gap (for example, adding 2 before 1), then an ElementOrderException will be thrown.

After a successful call to setContent, the following properties are considered stale and are removed from cache for this Annotation object:

A subsequent request for any of these properties causes the Content Services Java Connector to retrieve fresh data from the Content Services server.

Parameters:
content - A TransportInputStream object that specifies the stream for the content as well as the content's size, MIME type, and filename.


setContentReference

public void setContentReference(java.lang.String location,
                                java.lang.String mimeType,
                                int contentElement)

Not Implemented in CS Java Connector v3.0.

Sets external content information for the specified content reference element in this Annotation object. This information includes the location, in URL format, of the content as well as the external content type referenced by the URL. Note that this content type does not get reflected back to the annotation's MimeType property.

After a successful call to setContentReference, the following properties are considered stale and are removed from cache for this Annotation object:

A subsequent request for any of these properties causes the Content Services Java Connector to retrieve fresh data from the Content Services server.

Parameters:
location - A String that specifies, in URL format, the name of the resource that contains the content data.

mimeType - A String that specifies the MIME type of the external content associated with this Annotation object. Note that this is not the MIME type of the annotation referencing the external content.

contentElement - The number of the content element to set. Content element numbering begins at 1.


getContentReferenceLocation

public java.lang.String getContentReferenceLocation()

Not Implemented in CS Java Connector v3.0.

Returns the location, in URL format, for the first content element in this Annotation object. The first content element must be a content reference element. This method throws an exception if you call it on an annotation that has no content or its first content element is a content transfer element.

If an annotation has more than one content reference element associated with it, use the getContentReferenceLocation(contentElement) form of this method. To determine whether a content element is a content reference or a content transfer element, call getContentElementObjectTypes().

Returns:
A String that specifies, in URL format, the name of the resource that contains the first content element in this Annotation object.


getContentReferenceLocation

public java.lang.String getContentReferenceLocation(int contentElement)

Not Implemented in CS Java Connector v3.0.

Returns the location, in URL format, for the specified content reference element in this Annotation object. This method throws an exception if you call it on an annotation that does not have the specified content element or the specified content element is a content transfer element.

To determine whether a content element is a content reference or a content transfer element, call getContentElementObjectTypes().

Parameters:
contentElement - The number of the content element. Content element numbering begins at 1.

Returns:
A String that specifies, in URL format, the name of the resource that contains the first content element in this Annotation object.


getContentReferenceMimeType

public java.lang.String getContentReferenceMimeType()

Not Implemented in CS Java Connector v3.0.

Returns the MIME content type for the first content element in this Annotation object. The first content element must be a content reference element. This method throws an exception if you call it on an annotation that has no content or its first content element is a content transfer element.

If an annotation has more than one content reference element associated with it, use the getContentReferenceMimeType(contentElement) form of this method. To determine whether a content element is a content reference or a content transfer element, call getContentElementObjectTypes().

Returns:
A String that specifies the MIME content type for the first content element in this Annotation object.


getContentReferenceMimeType

public java.lang.String getContentReferenceMimeType(int contentElement)

Not Implemented in CS Java Connector v3.0.

Returns the MIME content type for the specified content reference element in this Annotation object. This method throws an exception if you call it on an annotation that does not have the specified content element or the specified content element is a content transfer element.

To determine whether a content element is a content reference or a content transfer element, call getContentElementObjectTypes().

Parameters:
contentElement - The number of the content element. Content element numbering begins at 1.

Returns:
A String that specifies the MIME content type for the specified content element in this Annotation object.


getFilename

public java.lang.String getFilename()

Not Implemented in CS Java Connector v3.0.

Returns the file name (but no path information) for the first content element in this Annotation object. The first content element must be a content transfer element. This method throws an exception if you call it on an annotation that has no content or its first content element is a content reference element.

If an annotation has more than one content transfer element associated with it, use the getFilename(contentElement) form of this method. To determine whether a content element is a content transfer or a content reference element, call getContentElementObjectTypes().

Returns:
A String that specifies the file name for the first content element in this Annotation object.


getFilename

public java.lang.String getFilename(int contentElement)

Not Implemented in CS Java Connector v3.0.

Returns the file name (but no path information) for the specified content transfer element in this Annotation object. This method throws an exception if you call it on an annotation that does not have the specified content element or the specified content element is a content reference element.

To determine whether a content element is a content transfer or a content reference element, call getContentElementObjectTypes().

Parameters:
contentElement - The number of the content element. Content element numbering begins at 1.

Returns:
A String that specifies the file name for the specified content element in this Annotation object.


getContentElementObjectTypes

public int[] getContentElementObjectTypes()

Not Implemented in CS Java Connector v3.0.

Returns an array that contains the object types for the content elements associated with this Annotation object. The object types, which are either Content Services ContentReference or ContentTransfer objects, are represented in the array as BaseObject constants of type int (either TYPE_CONTENT_REFERENCE or TYPE_CONTENT_TRANSFER). You would typically use this method to determine if a specific content element is a content transfer (content stored in a Content Services object store) or content reference (content stored externally) element.

Returns:
An int array, where each element in the array is the object type of a content element associated with this Annotation object.

getUserAccess

public Permissions getUserAccess()

Not Implemented in CS Java Connector v3.0.

Retrieves the access rights (permissions) for the current user on this Annotation object. (The current user is identified in the Session object.) The elements in the returned collection are the access rights assigned to the current user and to any groups to which this user belongs. If the user does not have explicit rights, this method returns only the access rights of the groups to which the user belongs. To retrieve permissions for a specified user, call the getUserAccess(collectionType, userId) form of this method.

Note that the returned string represents basic object permissions (that is, an object's Permissions property).

Returns:
A Permissions collection containing the access rights for the current user on this Annotation object.

`

getUserAccess

public Permissions getUserAccess(java.lang.String collectionType)

Not Implemented in CS Java Connector v3.0.

Retrieves the access rights (permissions) of the specified type for the current user on this Annotation object. (The current user is identified in the Session object.) The elements in the returned collection are the access rights assigned to the current user and to any groups to which this user belongs. If the user does not have explicit rights, this method returns only the access rights of the groups to which the user belongs.

Specify the type of permissions to return in the collectionType parameter. Currently, the only valid value for collectionType is the Property.PERMISSIONS constant for basic object permissions (that is, an object's Permissions property). Calling this method is equivalent to calling getUserAccess().

To retrieve permissions for a specified user, call the getUserAccess(collectionType, userId) form of this method.

Parameters:
collectionType - A String that is the name of a property whose value is a collection of Content Services Permission objects. Currently, the only valid value is Property.PERMISSIONS (for basic object permissions). This method throws a RemoteServerException if you specify any other value.

Returns:
A Permissions collection of the specified type containing the access rights for the current user on this Annotation object.


getUserAccess

public Permissions getUserAccess(java.lang.String collectionType,
                                 java.lang.String userId)

Not Implemented in CS Java Connector v3.0.

Retrieves the access rights (permissions) of the specified type for the specified user on this Annotation object. The elements in the returned collection are the access rights assigned to the specified user and to any groups to which this user belongs. If the user does not have explicit rights, this method returns only the access rights of the groups to which the user belongs.

Specify the type of permissions to return in the collectionType parameter. Currently, the only valid value for collectionType is the Property.PERMISSIONS constant for basic object permissions (that is, an object's Permissions property).

To retrieve permissions for the current user, call either getUserAccess() or getUserAccess(collectionType). These two methods offer equivalent functionality.

Parameters:
collectionType - A String that is the name of a property whose value is a collection of Content Services Permission objects. Currently, the only valid value is Property.PERMISSIONS (for basic object permissions). This method throws a RemoteServerException if you specify any other value.

userId - A String (whose value is a User object's Name property) that identifies the user for whom permissions are to be retrieved.

Returns:
A Permissions collection of the specified type containing the access rights for the specified user on this Annotation object.


getAccessMask

public int getAccessMask()

Not Implemented in CS Java Connector v3.0.

Returns an integer representing a bit mask of access rights for this Annotation object. The returned value represents a collection of access rights granted on this Annotation object to the current user. You can use bitwise comparisons against the access right and level constants in the Permission interface to determine the user's specific access rights. If the Annotation object has any markings applied, the mask reflects any access rights denied by the marking constraint mask. Use the returned integer to determine if the user has the appropriate access rights to perform an operation on the object.

Note that if markings are not being used, or you need to specify a particular user, you can perform a similar function by calling getUserAccess().asMask(). However, the value returned by getAccessMask() always accurately reflects the access rights granted to the user, whereas asMask() can only reflect the access rights as they apply to the Permissions collection upon which you are acting. For example, the value returned by asMask() will not reflect access rights granted or denied by assigned markings.

Returns:
An integer representing a bit mask of the assigned access rights.


FileNet Content Services
Java Connector v3.0