|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Not Implemented in CS Java Connector v3.0.
AnAnnotation
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:
getObject
method on an ObjectStore
object, which returns an annotation stored in
the object store.CustomObject
,
Document
, or Folder
object, which returns a
Values
collection that contains the
annotations associated with the object.
Field Summary |
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 |
public void delete()
Not Implemented in CS Java Connector v3.0.
Deletes thisAnnotation
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
.
public void changeClass(java.lang.String classId, Properties props, Permissions perms)
Not Implemented in CS Java Connector v3.0.
Changes the class with which thisAnnotation
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.
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 Classpublic TransportInputStream getContent()
Not Implemented in CS Java Connector v3.0.
Provides a stream retrieving the first content element of thisAnnotation
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.
TransportInputStream
object that contains the input
stream of this Annotation
object's first content element.
public TransportInputStream getContentElement(int contentElement)
Not Implemented in CS Java Connector v3.0.
Provides a stream retrieving the specified content transfer element of thisAnnotation
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)
.
contentElement
- The number of the content transfer element to be retrieved.
Content element numbering begins at 1.
TransportInputStream
object that contains the content for
the specified content element.
public void setContent(TransportInputStream content)
Not Implemented in CS Java Connector v3.0.
Sets the content for thisAnnotation
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.
content
- A TransportInputStream
object that specifies
the stream for the content as well as the content's
size, MIME type, and filename.
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 thisAnnotation
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.
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.
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 thisAnnotation
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()
.
Annotation
object.
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 thisAnnotation
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()
.
contentElement
- The number of the content element.
Content element numbering begins at 1.
Annotation
object.
public java.lang.String getContentReferenceMimeType()
Not Implemented in CS Java Connector v3.0.
Returns the MIME content type for the first content element in thisAnnotation
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()
.
Annotation
object.
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 thisAnnotation
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()
.
contentElement
- The number of the content element.
Content element numbering begins at 1.
Annotation
object.
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 thisAnnotation
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()
.
Annotation
object.
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 thisAnnotation
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()
.
contentElement
- The number of the content element.
Content element numbering begins at 1.
Annotation
object.
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 thisAnnotation
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.
int
array, where each element in the array is the object type
of a content element associated with this Annotation
object.public Permissions getUserAccess()
Not Implemented in CS Java Connector v3.0.
Retrieves the access rights (permissions) for the current user on thisAnnotation
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).
Permissions
collection containing the
access rights for the current user on this
Annotation
object.
`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 thisAnnotation
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()
.
getUserAccess(collectionType, userId)
form of this method.
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.
Permissions
collection of the specified type
containing the access rights for the current user on this
Annotation
object.
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 thisAnnotation
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).
getUserAccess()
or
getUserAccess(collectionType)
.
These two methods offer equivalent functionality.
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.
Permissions
collection of the specified type
containing the access rights for the specified user on this
Annotation
object.
public int getAccessMask()
Not Implemented in CS Java Connector v3.0.
Returns an integer representing a bit mask of access rights for thisAnnotation
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.
|
FileNet Content Services Java Connector v3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |