|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.system.CodeModuleGroupManager
public class CodeModuleGroupManager
Code module group management functionality
Code module groups provide a way for the device to store meta-information associated with groups of modules (for example, all the modules that make up a single application). The device stores code module group data in serialized form in a persisted store in the file system. Access to this store is moderated by the code module group manager system singleton.
Users of the code module group manager can identify modules in two ways: by name (string value), and by handle (integer value).
Writing code module group data into the store. To save a code
module group's raw data into the store, use
CodeModuleGroupManager.createGroup(byte[]). Note that the manager does no parsing of the
group data block: it merely writes the block directly into the group data
store.
Typically, though, you will want to instantiate a CodeModuleGroup
first, set it's properties as appropriate, and then invoke
CodeModuleGroup.store() to serialize and store it (the method calls
back to this manager to do the storage, and writes the module group handle
into the group instance).
Getting code module group data out of the store. You can retrieve
the code module group's data of the store in two general ways. To retrieve
the raw data block, use
getGroupData(moduleGroupHandle).
To retrieve the group data as a re-constituted, new
CodeModuleGroup instance, you have a number of options.
You can retrieve the code module group by name with
load(moduleGroupName).
You can retrieve an array of all known code module groups with
CodeModuleGroupManager.loadAll().
| Method Summary | ||
|---|---|---|
|
static int |
getNumberOfGroups()
Retrieves the current number of code module groups. |
|
static CodeModuleGroup |
load(String groupName)
Loads code module group by name. |
|
static CodeModuleGroup[] |
loadAll()
Retrieves all known code module group data blocks into an array of CodeModuleGroup instances. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CodeModuleGroup load(String groupName)
Invoke this method to load the data for a named code module group into a CodeModuleGroup instance and then retrieve the object.
groupName - Name of group to load; must not be null or longer than
256 characters.
IllegalArgumentException - If you provide a group name that's too long.
NullPointerException - If you provide a null group name.public static CodeModuleGroup[] loadAll()
public static int getNumberOfGroups()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal