To create a
object, call the
method on the
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
object, call the
or
method on the
class.
As an alternative to representing a Java event handler as a
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
See also the Javadocs for the following interfaces:
,
,
Namespace: FileNet.Api.Admin
Assembly: FileNet.Api (in filenet.api.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Interface ICodeModule Implements IDocument, IRepositoryObject, IVersionable, IContainable, IReplicable, ISubscribable, IIndependentlyPersistableObject, IIndependentObject, IEngineObject, ICloneable |
C# |
---|
public interface ICodeModule : IDocument, IRepositoryObject, IVersionable, IContainable, IReplicable, ISubscribable, IIndependentlyPersistableObject, IIndependentObject, IEngineObject, ICloneable |
C++ |
---|
interface class ICodeModule : IDocument, IRepositoryObject, IVersionable, IContainable, IReplicable, ISubscribable, IIndependentlyPersistableObject, IIndependentObject, IEngineObject, ICloneable |
J# |
---|
public interface ICodeModule implements IDocument, IRepositoryObject, IVersionable, IContainable, IReplicable, ISubscribable, IIndependentlyPersistableObject, IIndependentObject, IEngineObject, ICloneable |
JScript |
---|
public interface ICodeModule extends IDocument, IRepositoryObject, IVersionable, IContainable, IReplicable, ISubscribable, IIndependentlyPersistableObject, IIndependentObject, IEngineObject, ICloneable |
Remarks
Metadata
Auditable: undefined
AllowsInstances: true
AllowsSubClasses: true
ClassDefinitionName: DocumentClassDefinition
IsDependent: false
IsHidden: true
Searchable: true
StorageType: ObjectStore
SuperclassName: Document