net.rim.device.api.system
Class CodeModuleGroup
java.lang.Object
net.rim.device.api.system.CodeModuleGroup
public final class CodeModuleGroup
- extends Object
Code module group.
Let a BlackBerry device application retrieve name-value pair information from a .jad file
1. Load a code module group into a CodeModuleGroup object using the name of
the required module group as a parameter, and store a reference to the
CodeModuleGroup object. In this example, group_name refers to the name of the
code module group.
CodeModuleGroup cmg = CodeModuleGroupManager.load(group_name);
2. Retrieve properties from the CodeModuleGroup by invoking the
CodeModuleGroup.getProperty(name) method. The following example iterates through
all the properties of a code module group.
CodeModuleGroup cmg = CodeModuleGroupManager.load(group_name);
for( Enumeration e = cmg.getPropertyNames(); e.hasMoreElements(); )
{
String name = (String)e.nextElement();
System.out.println( "Name: " + name );
System.out.println( "Value: " + cmg.getProperty(name) );
}
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
Field Summary |
|
static int |
FLAG_DEPENDENCY
The group is a child of another group. |
|
static int |
FLAG_HIDDEN
The group should be hidden from view. |
|
static int |
FLAG_LIBRARY
The group is a library. |
|
static int |
FLAG_REQUIRED
The group is required, and should not be deleted. |
FLAG_REQUIRED
public static final int FLAG_REQUIRED
- The group is required, and should not be deleted.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
FLAG_HIDDEN
public static final int FLAG_HIDDEN
- The group should be hidden from view.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
FLAG_DEPENDENCY
public static final int FLAG_DEPENDENCY
- The group is a child of another group.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
FLAG_LIBRARY
public static final int FLAG_LIBRARY
- The group is a library.
- See Also:
- Constant Field Values
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.1.0
CodeModuleGroup
public CodeModuleGroup(String groupName)
- Creates a new CodeModuleGroup with provided name.
- Parameters:
groupName
- Name for this group.
- Throws:
NullPointerException
- if groupName is null
IllegalArgumentException
- if groupName length exceeds maximum
IllegalArgumentException
- if groupName contains illegal characters- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getName
public String getName()
- Retrieves this code module group's name.
- Returns:
- Name for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getModules
public Enumeration getModules()
- Retrieves the list of this code module group's modules.
- Returns:
- Enumeration of all the modules in this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getHandle
public int getHandle()
- Retrieves the handle for this CodeModuleGroup. Note that a CodeModuleGroup does
not get assigned a handle until after a successful invocation of
CodeModuleGroup.store()
.
- Returns:
- Handle for this CodeModuleGroup, or 0 if no handle has been assigned.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
containsModule
public boolean containsModule(String moduleName)
- Determines if this code module group contains named code module.
- Parameters:
moduleName
- Name of module to look for.
- Returns:
- True if named module appears in this group; otherwise, false.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
addModule
public void addModule(String moduleName)
- Adds named module to this code module group.
- Parameters:
moduleName
- Name of module to add to this gorup.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getDependencies
public Enumeration getDependencies()
- Retrieves list of dependencies for this code module group.
- Returns:
- Enumeration of all dependencies for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
addDependency
public void addDependency(String groupName)
- Adds named dependency to this code module group.
- Parameters:
groupName
- Name of group upon which this group should depend.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
containsDependency
public boolean containsDependency(String groupName)
- Determines if this code module group depends on named group.
- Parameters:
groupName
- Name of group to test for dependency.
- Returns:
- True if this group depends on named group; otherwise, false.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getFlags
public int getFlags()
- Retrieves this code module group's flag mask.
- Returns:
- Combine set of flags for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setFlag
public void setFlag(int flag,
boolean value)
- Sets (or clears) named flag in this code module group's flag mask.
Note: In order to modify the REQUIRED or HIDDEN flags, the calling module
must be signed by the RRI key.
- Parameters:
flag
- Flag to set or clear.value
- True to set flag; false to clear flag.
- Throws:
ControlledAccessException
- if an attempt is made to modify the REQUIRED or HIDDEN
flags and the calling module has not been signed by RRI.key.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getFriendlyName
public String getFriendlyName()
- Retrieves this code module group's friendly name.
- Returns:
- Friendly name for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setFriendlyName
public void setFriendlyName(String friendlyName)
- Sets this code module group's friendly name.
- Parameters:
friendlyName
- Friendly name for this group.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getDescription
public String getDescription()
- Retrieves this code module group's description.
- Returns:
- Description for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setDescription
public void setDescription(String description)
- Sets this code module group's description.
- Parameters:
description
- Description for this group.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getVersion
public String getVersion()
- Retrieves this code module group's version.
- Returns:
- Version string for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setVersion
public void setVersion(String version)
- Sets this code module group's version.
- Parameters:
version
- Version string for this group.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getVendor
public String getVendor()
- Retrieves this code module group's vendor.
- Returns:
- Vendor string for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setVendor
public void setVendor(String vendor)
- Sets this code module group's vendor.
- Parameters:
vendor
- Vendor string for this group.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getCopyright
public String getCopyright()
- Retrieves this code module group's copyright.
- Returns:
- Copyright string for this group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setCopyright
public void setCopyright(String copyright)
- Sets this code module group's copyright.
- Parameters:
copyright
- Copyright string for this group.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
getPropertyNames
public Enumeration getPropertyNames()
- Retrieves the list of this code module group's property names.
- Returns:
- Enumeration of all the property names in this group. Each object of the
returned enumeration is a String object.
- See Also:
CodeModuleGroup.getProperty(String name)
,
CodeModuleGroup.setProperty(String name, String value)
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.2.0
getProperty
public String getProperty(String name)
- Retrieves value for this code module group's named property.
- Parameters:
name
- Name of property to examine.
- Returns:
- Value of named property, or null if no such property.
- See Also:
CodeModuleGroup.getPropertyNames()
,
CodeModuleGroup.setProperty(String name, String value)
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
setProperty
public void setProperty(String name,
String value)
- Sets property value for this code module group.
- Parameters:
name
- Name of property to set.value
- Value for named property.
- Throws:
NullPointerException
- If either name or value is null.- See Also:
CodeModuleGroup.getPropertyNames()
,
CodeModuleGroup.getProperty(String name)
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
store
public boolean store()
- Stores this code module group.
- Returns:
- True if this group successfully stored itself; otherwise, false.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
delete
public void delete()
- Deletes this code module group.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
equals
public boolean equals(Object o)
- Indicates whether the given object is equal to this CodeModuleGroup.
- Overrides:
equals
in class Object
- Parameters:
o
- The object to compare to for equality.
- Returns:
- True if the given object is a CodeModuleGroup with the same name as this CodeModuleGroup; false otherwise.
- See Also:
Boolean.hashCode()
,
Hashtable
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
hashCode
public int hashCode()
- Returns the hashCode for this object.
- Overrides:
hashCode
in class Object
- Returns:
- The hashCode for this object
- See Also:
Object.equals(java.lang.Object)
,
Hashtable
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 5.0.0
load
public static CodeModuleGroup load(String groupName)
- Deprecated. Use net.rim.device.api.system.CodeModuleGroupManager.load( String groupName )
- Loads code module group by name.
Use this method to load a named code module group into a
CodeModuleGroup object and then retrieve the object.
- Parameters:
groupName
- Name of group to load.
- Returns:
- Named group; or, null if no such named group, or named group is
not loadable.
- Throws:
IllegalArgumentException
- if groupName length exceeds maximum.
NullPointerException
- if groupName is null.- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
loadAll
public static CodeModuleGroup[] loadAll()
- Deprecated. Use net.rim.device.api.system.CodeModuleGroupManager.loadAll()
- Loads all known code module groups.
Use this method to retrieve an array of all known, loadable code
module groups loaded into CodeModuleGroup objects.
- Returns:
- Array of all known groups; or, null if no list of groups
available, or list of available groups has no members.
- Category:
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
- Since:
- BlackBerry API 4.0.2
Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.