Represents a user-implemented Java event handler that's executed when a IAction-based object's events are raised. The event handler can be a Java class or JAR file, and must reside on the Content Engine.

To create a ICodeModule object, call the CreateInstance method on the Factory.CodeModule class, and then set the content elements of the Java module with the ContentElements property. Each content element must have the correct mime type property. For content elements containing a Java class, acceptable mime types are "application/java", "application/java-byte-code", and "application/x-java-class". For content elements containing a JAR, acceptable mime types are "application/java-archive", "application/x-compressed", "application/x-zip-compressed", "application/zip", and "multipart/x-zip".

Note:

      The content elements that you set on a ICodeModule object must be of type IContentTransfer, not IContentReference. If you attempt to save a ICodeModule object with a IContentReference type in the content element list, the object will throw an EVENT_CM_CONTENTREFERENCE_NOT_ALLOWED exception.
      If you create a new version of a ICodeModule, such as by updating the event handler content, then you must set the new version to the CodeModule property of any IAction-based object for which the new ICodeModule version is intended.

To instantiate a ICodeModule object, call the GetInstance or FetchInstance method on the Factory.CodeModule class.

As an alternative to representing a Java event handler as a ICodeModule object, you could specify the Java event handler in the classpath of your application server. However, in an enterprise environment, we recommend that you check in an event handler and any supporting libraries as a code module. Code modules are automatically available when deploying the Content Engine to multiple application server instances, or moving your content metadata from one system to another. If you reference event handlers in the classpath of an application server, you must manually distribute them to new systems.

For cache configuration considerations, see the applicable code module-related properties in IServerCacheConfiguration interface.

See also the Javadocs for the following interfaces: DocumentClassifier, DocumentLifecycleActionHandler, EventActionHandler


The following tables list the members exposed by ICodeModule.

Public Properties

 NameDescription
Public propertyReferencingActionsA collection of IAction-based objects referencing this object.
Top

See Also