public interface CustomObject extends RepositoryObject, Containable, CmHoldable, Replicable, Subscribable, IndependentlyPersistableObject
CustomObject
object 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 interface provides a minimal set of properties (such as Creator, DateCreated,
and Name). Unlike most Content Engine objects, the CustomObject
base interface does not have a specific
property defined as the name property in order that subclassed objects can define it in an appropriate way.
Because a CustomObject
object does not have a defined name property, the value of its Name
property reverts to the default value, which is same as its ID
property.
Modifier and Type | Method and Description |
---|---|
void |
applySecurityTemplate(Id applyStateId)
Applies a security policy template to the given object.
|
void |
changeClass(java.lang.String className)
Changes the class of a Content Engine object.
|
java.lang.Integer |
get_CmIndexingFailureCode()
Returns the value of the CmIndexingFailureCode property.
|
java.lang.Boolean |
get_CmIsMarkedForDeletion()
Returns the value of the CmIsMarkedForDeletion property.
|
java.util.Date |
get_CmRetentionDate()
Returns the value of the CmRetentionDate property.
|
Id |
get_IndexationId()
Returns the value of the IndexationId property.
|
Folder |
get_SecurityFolder()
Returns the value of the SecurityFolder property.
|
ReferentialContainmentRelationship |
get_SecurityParent()
Deprecated.
|
InstanceWorkflowSubscriptionSet |
get_WorkflowSubscriptions()
Returns the value of the WorkflowSubscriptions property.
|
java.lang.Boolean |
isLocked()
Queries this object's lock state.
|
void |
lock(int timeout,
java.lang.String owner)
Sets a new lock or updates an existing lock on the object.
|
CmRecoveryItem |
markForDeletion(CmRecoveryBin bin,
java.lang.String recoveryItemClass)
Marks the object for deletion and associates it with the specified recovery bin.
|
void |
set_CmRetentionDate(java.util.Date value)
Sets the value of the CmRetentionDate property.
|
void |
set_SecurityFolder(Folder value)
Sets the value of the SecurityFolder property.
|
void |
set_SecurityParent(ReferentialContainmentRelationship value)
Deprecated.
|
void |
unlock()
Explicitly removes the lock from this object.
|
void |
updateLock(long timeout)
Adjusts the timeout period of the lock on this object.
|
getObjectStore
get_ActiveMarkings, get_Annotations, get_AuditedEvents, get_Containers, get_CoordinatedTasks, get_Creator, get_DateCreated, get_DateLastModified, get_Id, get_LastModifier, get_LockOwner, get_LockTimeout, get_LockToken, get_Name, get_Owner, get_Permissions, get_SecurityPolicy, set_Creator, set_DateCreated, set_DateLastModified, set_LastModifier, set_Owner, set_Permissions, set_SecurityPolicy
get_CmHoldRelationships
get_ExternalReplicaIdentities, get_ReplicationGroup, set_ExternalReplicaIdentities, set_ReplicationGroup
raiseEvent
addPendingAction, clearPendingActions, delete, getAccessAllowed, getPendingActions, getUpdateSequenceNumber, isCurrent, save, save, setUpdateSequenceNumber
fetchProperties, fetchProperties, fetchProperty, fetchProperty, getObjectReference, refresh, refresh, refresh
get_ClassDescription, getClassName, getConnection, getProperties, getSuperClasses
Folder get_SecurityFolder()
void set_SecurityFolder(Folder value)
InstanceWorkflowSubscriptionSet get_WorkflowSubscriptions()
Id get_IndexationId()
java.lang.Integer get_CmIndexingFailureCode()
java.util.Date get_CmRetentionDate()
void set_CmRetentionDate(java.util.Date value)
java.lang.Boolean get_CmIsMarkedForDeletion()
void lock(int timeout, java.lang.String owner)
To successfully execute this method, the current user must have permission to modify this object's
properties. For example, locking a Document
object requires the following combination of access rights:
AccessRight.CHANGE_STATE | AccessRight.CREATE_INSTANCE | AccessRight.LINK | AccessRight.UNLINK |
AccessRight.VIEW_CONTENT | AccessRight.WRITE | AccessRight.READ_ACL | AccessLevel.READ
.
If the call succeeds:
owner
parameter. (New lock only.)timeout
is applied to the object's LockTimeout property.To update an existing lock, the objects needs to be in the locked state and the current user
needs to match the user of the lock. Note that the user is the logged in user, not the owner
string.
If the call succeeds, then only the LockTimeout
property is updated with the timeout value. The owner
parameter in this case is ignored. (See the updateLock()
method instead.)
timeout
- An integer that represents the number of seconds after which the lock will expire.
The range of values is 0 to 2147483647 (Integer.MAX_VALUE
) seconds.owner
- A String
representing the user name to be assigned as the owner of the
lock on this object. Defaults to the short principal name of the requesting user. The value is strictly advisory and
is not validated against user or group names known to the Content Engine. The value can be used by client applications to identify the user who has locked the object.E_OBJECT_LOCKED
- If the object is already locked and the current user does not match the user of the lock.E_OBJECT_NOT_LOCKED
- If the user tries to update an existing lock but the object is not locked (absence of a LockToken).CmRecoveryItem markForDeletion(CmRecoveryBin bin, java.lang.String recoveryItemClass)
bin
- The CmRecoveryBin
object to contain the object marked for deletion.recoveryItemClass
- The CmRecoveryItem
class or subclass from which
to create the instance that is returned.CmRecoveryItem
object.java.lang.Boolean isLocked()
lock
method
and handle any exception thrown if the method fails.
Note that this method returns an approximation of the locked state
at the time of the call. Once this method executes and returns the value, the object's lock state could be
immediately changed by another application's call to the lock
method or the lock could expire.
Before calling this method, make sure that the object's LockToken, LockTimeout, and DateLastModified properties have relatively fresh values. If any of those properties is missing, they are silently fetched from the server and added to the object's property cache.
The isLocked
method returns false
if the LockTimeout property is not set
or if the lock has expired. The lock is determined to be expired if the DateLastModified property
value plus the number of seconds specified by the LockTimeout property is less than the current system
time. (All millisecond components are dropped from the calculation.) If the DateLastModified
property is not set, this method returns false
because the check against the lock timeout value
or the lock token will yield null
, meaning that the object is not locked. As soon as some action locks the object, the
DateLastModified property will be updated and can then used for the expiration
calculation.
Note To successfully run isLocked
and other cooperative locking methods, system clocks on the
IBM FileNet P8 platform engine machines must be synchronized. The calculation performed by the isLocked()
method is done on the client system. If the client and server machine clocks are not synchronized, the result of this
calculation might be incorrect.
true
if this object is locked; otherwise, returns false
.void updateLock(long timeout)
This method updates the object's DateLastModified property to the current time and its LockTimeout property to the timeout value. The net effect of this may extend or shorten the original lock's expiration time. Only the user who locked the object can successfully call this method; for any other user, an exception is thrown. There is no limit to the number of times you can call this method.
timeout
- The changed timeout value, in seconds, for this object's lock. The range of values is
0 to 2147483647 (Integer.MAX_VALUE
) seconds.void applySecurityTemplate(Id applyStateId)
applyStateId
parameter
must match the value of the ApplyStateID property of one of the templates in the security policy
for the object. For a versioning security template, the apply state ID can be one of the following:
- VersionStatusId.IN_PROCESS
- VersionStatusId.RELEASED
- VersionStatusId.RESERVATION
- VersionStatusId.SUPERSEDED
For an application security template, the apply state ID is defined by your application.applyStateId
- An Id
object representing the unique identifier of the security template
to apply.void unlock()
AccessRight.WRITE_ACL
permission on the object. An exception is thrown
if the above conditions are not met.
Upon successful execution of this method, the values for the object's LockOwner, LockToken, and LockTimeout properties
are removed (set to null
). If you do not call unlock
to explicitly remove the lock, the lock is implicitly removed
when the lock's timeout value expires.E_OBJECT_NOT_LOCKED
- If the object is not locked.void changeClass(java.lang.String className)
changeClass
method does not modify the security for an object, even if the object's current security
is derived from the default security for its source class. For the object's user-defined properties,
the following rules apply:
null
if there is no default defined).null
) as the default value defined in the original class will be set
to the default value defined by the new class. However, any user-defined property that has had its value
modified from the default value will retain that modified value in the new class.When the class of a document object is changed, the default document lifecycle policy of the new class will only be applied to the document object's DocumentLifecyclePolicy property if both of the following scenarios occur:
Changing the document class of a document object has no effect on the storage location of the document’s content. For more information, see the Document Storage topic in the "Document Concepts" section of the Content Engine Java and .NET API Developer’s Guide.
className
- A String
specifying the symbolic name, ClassNames
constant, ID, or GUIDConstants
constant of the class to which this object is to be changed.E_NULL_OR_INVALID_PARAM_VALUE
- if className
is null
or has a length of zero.void set_SecurityParent(ReferentialContainmentRelationship value)
SecurityParent
property to the
specified value.value
- The ReferentialContainmentRelationship
object that is to be the
security parent of this object.ReferentialContainmentRelationship get_SecurityParent()
SecurityParent
property has no value), this method
returns null
.ReferentialContainmentRelationship
object for this object,
or null
if the object has no security parent.© Copyright IBM Corporation 2006, 2015. All rights reserved.