To create an
object, call the
method on the
property. Each content element must have the correct MimeType property value. 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 file, 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 an
ICodeModule
object must be of type IContentTransfer
, not IContentReference
. If you attempt to save an ICodeModule
object with an 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 an
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 an
object, call the
or
method on the
class.
As an alternative to representing a Java event handler as an
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 the
See also the Javadocs for the following interfaces:
,
,
The following tables list the members exposed by ICodeModule.
Public Properties
Name | Description | |
---|---|---|
![]() | ReferencingActions | A collection of IAction-based objects referencing this object. |