Public Methods

  Name Description
Public method ApplySecurityTemplate Applies a security policy template to the given object. The specified value for the 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.
Public method ChangeClass Changes the class of a Content Engine object. The new class must already exist and both it and the original class must be subclasses of the same base class. The 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:
  • Any user-defined properties that exist in the new class but not in the original class are set to the default value defined by the new class (or to null if there is no default defined).
  • Any user-defined properties that exist in both the original and the new class that are writable and have the same value (including 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.
  • Any user-defined properties whose definitions exist in the original class but not in the new class will no longer exist on the object when its class is changed.

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:

  • The document has no current lifecycle policy.
  • The document is either a reservation object, or is the current version object and is not reserved.

Public method CreateSubFolder Creates a directly-contained subfolder of this folder.
Public method File Files an instance of a Containable subclass to this folder. Depending on the Containable subclass filed, a ReferentialContainmentRelationship object (for CustomObject and Folder objects) or a DynamicReferentialContainmentRelationship (for Document objects) is created to reference this folder and the containee (instance filed).
Public method IsLocked Queries this object's lock state. This helper method examines the object's lock-related properties and determines the object's lock state. An alternative approach is to call the LockObject 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 LockObject 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 reflect that the object is not locked. As soon as some action locks the object, the DateLastModified property will be updated and can then be used for the expiration calculation.

Note: 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.

Public method LockObject Sets a new lock or updates an existing lock on the object. Calling this method has no effect in preventing others from updating a locked object (with the exception that others cannot re-lock the locked object). This lock mechanism is used for custom purposes only and has no bearing on the actual ability to update an object.

To successfully execute this method, the current user must have permission to modify this object's properties. For example, locking a Document object requires AccessLevel.WRITE_DOCUMENT.

If the call succeeds:

  • The object's LockOwner property is populated with the user name specified in the owner parameter. (New lock only.)
  • The value specified by timeoutis applied to the object's LockTimeout property.
  • A LockToken (GUID) is internally created by the server. (New lock only.)

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.)

Public method Move Moves this folder and all of its subfolders and contents from its current parent folder to the target parent folder specified.

Note: You cannot move the root folder for the object store.

Public method Unfile Overloaded. Removes the specified containee from this folder. This does not delete the containee object from the object store.

You then need to call the Save method on the returned ReferentialContainmentRelationship object. This method is equivalent to getting the ReferentialContainmentRelationship object (returned) and deleting it.

Public method Unlock Explicitly removes the lock from this object. Only the user who locked the object may remove the lock. If the current user is not the user of the lock, the current user can still remove the lock provided that user has 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. If the object is not locked (absence of a LockToken).
Public method UpdateLock Adjusts the timeout period of the lock on this object.

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.

Top

See Also