Manages the Java code modules installed on the device.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CMM_OK_MODULE_OVERWRITTEN
public static final int CMM_OK_MODULE_OVERWRITTEN
The operation completed successfully; a module was overwritten in the process.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CMM_HASH_INVALID
public static final int CMM_HASH_INVALID
The operation failed due to an invalid hash.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CMM_SIGNATURE_INVALID
public static final int CMM_SIGNATURE_INVALID
The operation failed due to an invalid signature.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CMM_MODULE_INVALID
public static final int CMM_MODULE_INVALID
The operation failed because the module is invalid.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CMM_MODULE_INCOMPATIBLE
public static final int CMM_MODULE_INCOMPATIBLE
The operation failed because the module is incompatible with an existing module.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
MODULE_FLAG_DELETE
public static final int MODULE_FLAG_DELETE
The module is scheduled for deletion.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
MODULE_FLAG_OTA
public static final int MODULE_FLAG_OTA
The module is marked as having been loaded over-the-air.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail
getModuleHandles
public static int[] getModuleHandles()
Retrieves handles for all existing modules.
Returns:
Handles of all modules in the database.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleHandleForObject
public static int getModuleHandleForObject(Object obj)
Retrieves the handle of the module which defines an object's class.
Parameters:
obj - Object for which you want to find the containing module.
Returns:
Handle of the module which defines your object's class. If your
object is an array, this method treats it as an Object.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Retrives the handle for the module with the specified name.
Parameters:
name - Name of the module.
Returns:
Module handle, or 0 if no module with the specified name exists.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
deleteModule
public static boolean deleteModule(int moduleHandle,
boolean force)
Deletes a specific module.
If the module is currently in use, it will be deleted at the next
reset.
If 'force' is false and the device contains data associated with
the specified module, the module will not be deleted. If 'force' is
true, then the module and any data associated with that module will be
deleted.
Parameters:
moduleHandle - Handle of module to delete.
force - If true, delete the module and any data it owns; if false,
delete the module only if it has no associated data.
Returns:
True if the module was deleted immediately or was scheduled for
deletion; otherwise, false.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleFlags
public static int getModuleFlags(int moduleHandle)
Retrieves the flags for the specified module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
A combination of the MODULE_FLAG_ values.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleName
public static StringgetModuleName(int moduleHandle)
Retrieves the name of a module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Name of module.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleVersion
public static StringgetModuleVersion(int moduleHandle)
Retrieves the version of a module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Version information string, or null if the module has no
version string.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleHash
public static byte[] getModuleHash(int moduleHandle)
Retrieves the SHA hash of a module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
SHA hash of the module.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleVendor
public static StringgetModuleVendor(int moduleHandle)
Retrieves the vendor information for a module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Vendor information string, or null if the module has no vendor
string.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleDescription
public static StringgetModuleDescription(int moduleHandle)
Retrieves the description for a module.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Description string, or null if the module has no description
string.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleURL
public static StringgetModuleURL(int moduleHandle)
Retrieves the URL from which a module can be loaded.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
URL string, or null if the module has no URL string.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleTimestamp
public static long getModuleTimestamp(int moduleHandle)
Retrieves a module's creation time.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Time in milliseconds since the device's origin time (midnight,
Jan 1, 1970 UTC).
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
isLibrary
public static boolean isLibrary(int moduleHandle)
Determines if a module is a library.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
True if the specified module is a library; otherwise, false.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleCodeSize
public static int getModuleCodeSize(int moduleHandle)
Retrieves the size of a module's contained code.
Parameters:
moduleHandle - Handle to the module in question.
Returns:
Module's code size in bytes.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleName
public static StringgetModuleName(int moduleHandle,
int index)
Retrieves the name of a base module.
Parameters:
moduleHandle - Handle to the module in question.
index - Ordinal to the module name in question.
Returns:
Name of module, or null if the index is out of range.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getModuleVersion
public static StringgetModuleVersion(int moduleHandle,
int index)
Retrieves the version of a base module.
Parameters:
moduleHandle - Handle to the module in question.
index - Ordinal to the module name in question.
Returns:
Version information string, or null if the module has no
version string or the index is out of range.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
createNewModule
public static int createNewModule(int length)
Creates a new, empty module.
Parameters:
length - Length in bytes to set aside for module.
Returns:
Module handle, or 0 if the module could not be created.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
createNewModule
public static int createNewModule(int totalLength,
byte[] data,
int length)
Creates a new, partially populated module.
If the number of bytes you have to provide (the length parameter) is
less than the length of the module (the totalLength parameter), then you
should write the rest of the data with subsequent invocations of
writeNewModule.
Parameters:
totalLength - Length in bytes of the entire module.
data - Byte array of data to stuff into module.
length - Number of bytes from the byte array to stuff into the start of the module.
Returns:
Module handle, or 0 if the module could not be created.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
writeNewModule
public static boolean writeNewModule(int moduleHandle,
byte[] data,
int offset,
int length)
Writes data into a newly created module.
Parameters:
moduleHandle - Handle to the module in question.
data - Byte array of data to stuff into module.
offset - Byte offset into the module at which to being stuffing.
length - Number of bytes from the byte array to stuff into the module.
Returns:
True if successful; false otherwise.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
saveNewModule
public static int saveNewModule(int moduleHandle)
Saves a newly created module in the database.
Returns:
One of the CMM_ return codes.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Retrieves the application descriptors contained in the specified module.
Since:
JDE 3.6
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Copyright 1999-2002 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.