CMSSessionCreateEvent Module
The CMSSessionCreateEvent module has the following event types:
CMSSessionCreateNewObject
This event occurs before a new repository object is created. This event is similar to the create ACL callback associated with the sess_add_callback function. Modifying the name or folderLogicalId arguments is functionally equivalent to the ACL object naming and object location hooks specified in burst configuration files.
This event type is cancelable. If an event listener calls the preventDefault method, the object will not be created. The event handler can perform a customized creation itself and then cancel the default creation by calling preventDefault and setting result to the result of the construction.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
The following module properties provide the context information for this event:
name
Represents the name of the object being created.
type
Represents an adapter-specific object type string.
folderLogicalId
Represents the parent folder for the new object.
flags
Same as the flags parameter of the CMSSession.createNewObject method.
start
Along with end, represents the content of the new object.
end
Along with start, represents the content of the new object.
version
Represents an adapter-specific version for the new object.
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: name, type, folderLogicalId, flags, start, end, version
CMSSessionPostCreateNewObject
This event occurs after an object has been created. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module property provides the context information for this event:
result
Represents the CMSObject which has been constructed.
◦ Bubbles: Yes
◦ Cancelable: No
◦ Context Info: result