|
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.
ACustomObject
is a general object that can be subclassed.
It has no inherent semantics, but is independently securable and can be
persisted to an object store. A CustomObject does not carry content, is not
versionable, and does not support lifecycle functionality.
The CustomObject
base class provides a minimal set of properties
(such as Creator, DateCreated, and Name). Almost all Content Services objects have
a specific property indicated as the Name property. The CustomObject base class
does not. This is specifically
so that subclasses can define the Name property in an appropriate way.
The Name property for a CustomObject
base class object
falls back to returning the ID (GUID) for the object. The same is true for a
subclass of CustomObject
, unless it has a different Name
property designated via the IsNameProperty property.
You can instantiate a CustomObject
by calling
getContainees()
on a Folder
object or by calling the
createObject
or createAndFileObject
method on an ObjectStore
object.
(Note that
createAndFileObject
creates the object and files it in a folder
in a single roundtrip to the Content Services server.) The following
code fragment illustrates the use of createObject
:
To obtain a reference to a persisted CustomObject objCustomObject = (CustomObject)objStore.createObject(ClassDescription.CUSTOM_OBJECT,
props, acls);
CustomObject
object, call
the ObjectStore.getObject
method:
CustomObject objCustomObject =
(CustomObject)objObjectStore.getObject(BaseObject.TYPE_CUSTOMOBJECT,
CustomObjectGUIDorPath);
Field Summary |
Fields inherited from interface com.filenet.wcm.api.ContainableObject |
INVALID_CONTAINMENT_NAME_CHARACTERS |
Method Summary | |
void |
applySecurityTemplate(java.lang.String applyStateId)
Not Implemented in CS Java Connector v3.0. |
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. |
Links |
getHeadLinks(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0. |
java.lang.String |
getHeadLinksXML(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0. |
java.lang.String |
getPermissionsXML()
Not Implemented in CS Java Connector v3.0. |
Subscriptions |
getSubscriptions(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0. |
Links |
getTailLinks(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0. |
java.lang.String |
getTailLinksXML(java.lang.String[] propNames)
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,
java.lang.String domain)
Not Implemented in CS Java Connector v3.0. |
java.lang.String |
getUserAccessXML()
Not Implemented in CS Java Connector v3.0. |
Event |
raiseEvent(java.lang.String classId,
Properties props)
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.ContainableObject |
file, file, getContainers, getContainersXML, getContainmentNames, getContainmentPaths, getSecurityParent, setContainmentName, setContainmentName, setSecurityParent, unfile, unfile |
Methods inherited from interface com.filenet.wcm.api.WorkflowTarget |
getWorkflowSubscriptions, getWorkflowSubscriptionsXML, getWorkflowSubscriptionsXML |
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 |
Methods inherited from interface com.filenet.wcm.api.LockableObject |
extendLock, extendLock, isLocked, lock, unlock, unlock |
Method Detail |
public void delete()
Not Implemented in CS Java Connector v3.0.
Deletes thisCustomObject
from the object store. This method
also unfiles the object from the folder or folders in which it is filed.
To execute this method, the user must have Delete permission
(Permission.RIGHT_DELETE
or Permission.LEVEL_FULL_CONTROL_CUSTOM
)
on this CustomObject
object. After a successful call to
delete()
, all properties are considered stale and are removed
from cache for this CustomObject
.
public Permissions getUserAccess()
Not Implemented in CS Java Connector v3.0.
Retrieves the access rights (permissions) for the current user on thisCustomObject
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.
Note that the returned Permissions
collection represents
basic object permissions
(that is, an object's Permissions property).
To specify the type of permissions (basic object or audit) to retrieve
for the current user, use getUserAccess(collectionType)
.
To retrieve permissions for a specified user, use
getUserAccess(collectionType, userId, domain)
.
Permissions
collection containing the access
rights for the current user on this CustomObject 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 thisCustomObject
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.
In the collectionType
parameter, specify the type of permissions
(basic object or audit)
to return.
If the user is not an Administrator and does not have specific
privileges to access audit permissions, this method throws an
InsufficientPermissionException if the specified collection type is
Property.AUDIT_PERMISSIONS
. This exception occurs even if the user
has been granted full control access rights (Permission.LEVEL_FULL_CONTROL
)
to the object. To set audit permissions privileges for the user, refer to the
Enable security auditing
topic.
To retrieve permissions for a specified user, use the
getUserAccess(collectionType, userId, domain)
form of this method.
collectionType
- A String
that is the name of a property whose value is a
collection of Content Services Permission
objects.
Use Property.PERMISSIONS
for basic object
permissions or Property.AUDIT_PERMISSIONS
for audit permissions.
Permissions
collection of the specified type containing the
access rights for the current user on this
CustomObject
object.public Permissions getUserAccess(java.lang.String collectionType, java.lang.String userId, java.lang.String domain)
Not Implemented in CS Java Connector v3.0.
Retrieves the access rights (permissions) of the specified type for a specified user on thisCustomObject
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.
In the collectionType
parameter, specify the type of permissions
(basic object or audit)
to return.
If the user is not an Administrator and does not have specific
privileges to access audit permissions, this method throws an
InsufficientPermissionException if the specified collection type is
Property.AUDIT_PERMISSIONS
. This exception occurs even if the user
has been granted full control access rights (Permission.LEVEL_FULL_CONTROL
)
to the object. To set audit permissions privileges for the user, refer to the
Enable security auditing
topic.
To retrieve the access rights for the current user, call either
getUserAccess()
(to retrieve basic object permissions) or
getUserAccess(collectionType)
(to specify the type of permissions to retrieve).
collectionType
- A String
that is the name of a property whose value is a
collection of Content Services Permission
objects.
Use Property.PERMISSIONS
for basic object
permissions or Property.AUDIT_PERMISSIONS
for audit permissions.
userId
- A String
(whose value is the User
object's Name property) that
identifies the user for whom permissions are to be retrieved.
domain
- A String
(whose value is a Domain
object's Name property) that
identifies the name of the user's domain. If null
, defaults
to the domain of the machine on which the Java Connector Listener is
running.
Permissions
collection of the specified type containing the
access rights for the specified user on this
CustomObject
object.public java.lang.String getUserAccessXML()
Not Implemented in CS Java Connector v3.0.
Retrieves aString
in XML that represents the access rights
(permissions) for the current user
on this CustomObject
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.
Note that the returned String
represents
basic object permissions
(that is, an object's Permissions property).
String
containing an XML representation of the current user's
access rights for this CustomObject
object. For documentation
that describes the XML schema used to generate the string, refer to
Schemas
in the FileNet P8 Developer's Roadmap.
public java.lang.String getPermissionsXML()
Not Implemented in CS Java Connector v3.0.
Retrieves aString
in XML that represents the permissions for this
CustomObject
object. The user must have Read permissions on
the object's security (either Permission.LEVEL_VIEW
or
Permission.RIGHT_READ_ACL
) to retrieve the object's
permissions. Note that the returned String
represents
basic object permissions
(that is, an object's Permissions property).
String
in XML that represents the basic object permissions
for this object. For documentation
that describes the XML schema used to generate the string, refer to
Schemas
in the FileNet P8 Developer's Roadmap.
public void changeClass(java.lang.String classId, Properties props, Permissions perms)
Not Implemented in CS Java Connector v3.0.
Changes the class with which thisCustomObject
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 a custom object 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 CustomObject
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.
public Links getHeadLinks(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns a collection ofLink
objects for which this
CustomObject
object is the logical head of a link relationship.
Refer to the Link
interface for information about
link relationships.
propNames
- A String
array whose elements specify the
symbolic names of the properties to retrieve. If
null
or an empty array, returns the
Id, Name, Head, and Tail properties.
Links
collection containing any Link
objects for which this CustomObject
object is the
logical head of a link relationship.public Links getTailLinks(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns a collection ofLink
objects for which this
CustomObject
object is the logical tail of a link relationship.
Refer to the Link
interface for information
about link relationships.
propNames
- A String
array whose elements specify the
symbolic names of the properties to retrieve. If
null
or an empty array, returns the
Id, Name, Head, and Tail properties.
Links
collection containing any Link
objects for which this CustomObject
object is the
logical tail of a link relationship.public void applySecurityTemplate(java.lang.String applyStateId)
Not Implemented in CS Java Connector v3.0.
Applies the specifiedsecurity template
to this CustomObject
object. To successfully execute this
method, the user must have permission to modify this CustomObject
object's security (see the RIGHT_WRITE_ACL
constant in the
Permission
interface).
The parameter to this method is a user-defined GUID that is managed
by your application. The GUID is used to identify and to locate
a corresponding security template from those available in the
SecurityPolicy
container
object assigned to this CustomObject
object.
This method is useful for propagating a security policy change to
objects that are currently using that security policy. Use a
query approach of your choice to retrieve a list of objects that are using the
SecurityPolicy
object, then iterate over the returned list,
calling this method on each item to explicitly apply the change.
applyStateId
- A String
containing a GUID that identifies the
security template you want to apply from those available in the security policy.
Cannot be null
.public Subscriptions getSubscriptions(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns a collection ofSubscription
objects for which
this CustomObject
object is the subscription's target object.
An object is a target object if a Subscription
object's
SubscriptionTarget property points to either the object or to the
ClassDescription
of the object (or to some superclass of
the ClassDescription
if it is a class subscription whose
IncludeSubclassesRequested property value is true
).
If propNames
is null
or an empty array, this
method retrieves an initial set of hard-coded properties. However, because
this set can vary from release to release, we recommend you specify the
properties your application requires in the propNames
array.
propNames
- A String
array whose elements specify the
symbolic names of the properties to retrieve.
Subscriptions
collection that contains the
Subscription
objects associated with this
CustomObject
object.public Event raiseEvent(java.lang.String classId, Properties props)
Not Implemented in CS Java Connector v3.0.
Raises a custom audit event for thisCustomObject
object and returns
an Event
object. The returned object represents the audit event
that is recorded for this CustomObject
object. The user must have
Read permission (Permission.RIGHT_READ
) on this CustomObject
object.
You must specify the ID (or the symbolic name) for the custom event in the classId
parameter. To retrieve the ID for a custom event, call the
getAuditDefinitions(incInherited)
method on this CustomObject
object's ClassDescription
;
then call the
getEventClassId
method on the AuditDefinition
that defines the custom event.
You must include the EventStatus
property in the collection you pass in for the props
parameter.
Set the property's value to whatever is meaningful for your application.
(For system audit events, the Content Services sets the property's value to
0 indicating a successful operation, or to an error code for failure. For
a custom audit event, it is up to the client application to define and
interpret the value of this property.) Properties that are not specified
that have default values in the Content
Engine object store take the defaults. 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 (e.g., it is Read-only).
Note that if auditing is disabled for the object store, this method will
not throw an exception. However, the audit event will not be recorded and
method calls on the returned Event
object will throw a
BadReferenceException
.
classId
- A String
that represents the ID or the symbolic
name of the custom event class. If null
or
if this custom event is not defined for this CustomObject
object's class, this method throws an exception.
props
- A Properties
collection that specifies the
properties to set for the event. The collection must include
the EventStatus property, which is a required property when
you create an Event
object.
Event
object that represents the audit event that
is recorded for this CustomObject
object.public java.lang.String getHeadLinksXML(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns a string in XML that represents a collection ofLink
objects for which this
CustomObject
object is the logical head of a link relationship.
If the propNames
parameter is
null
or an empty array, this method returns all readily-available
properties for the Link
objects.
If the array includes properties that do not exist for the
Link
objects, those properties are ignored (no exception is thrown).
Note that this method never returns binary-valued properties.
This method always makes a roundtrip to the Content Services server and
never uses cached properties.
propNames
- A String
array whose elements specify the
symbolic names of the properties to retrieve. If
null
or an empty array, returns all
readily-available properties for the Link
objects.
String
containing an XML representation of the Link
objects for which this CustomObject
object is the
logical head of a link relationship.
For documentation that describes the XML schema used to generate
the string, refer to
Schemas
in the FileNet P8 Developer's Roadmap.public java.lang.String getTailLinksXML(java.lang.String[] propNames)
Not Implemented in CS Java Connector v3.0.
Returns a string in XML that represents a collection ofLink
objects for which this
CustomObject
object is the logical tail of a link relationship.
If the propNames
parameter is
null
or an empty array, this method returns all readily-available
properties for the Link
objects.
If the array includes properties that do not exist for the
Link
objects, those properties are ignored (no exception is thrown).
Note that this method never returns binary-valued properties.
This method always makes a roundtrip to the Content Services server and
never uses cached properties.
propNames
- A String
array whose elements specify the
symbolic names of the properties to retrieve. If
null
or an empty array, returns all
readily-available properties for the Link
objects.
String
containing an XML representation of the Link
objects for which this CustomObject
object is the
logical tail of a link relationship.
For documentation that describes the XML schema used to generate
the string, refer to
Schemas
in the FileNet P8 Developer's Roadmap.public int getAccessMask()
Not Implemented in CS Java Connector v3.0.
Returns an integer representing a bit mask of access rights for thisCustomObject
object.
The returned value represents a collection of access rights
granted on this CustomObject
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 CustomObject
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 |