SHOW Signed
 

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:
JDE 4.0.2

Field Summary
 Category: Signed static int FLAG_DEPENDENCY
          The group is a child of another group.
 Category: Signed static int FLAG_HIDDEN
          The group should be hidden from view.
 Category: Signed static int FLAG_LIBRARY
          The group is a library.
 Category: Signed static int FLAG_REQUIRED
          The group is required, and should not be deleted.
 
Constructor Summary
 Category: Signed CodeModuleGroup(String groupName)
          Creates a new CodeModuleGroup with provided name.
 
Method Summary
 Category: Signed  void addDependency(String groupName)
          Adds named dependency to this code module group.
 Category: Signed  void addModule(String moduleName)
          Adds named module to this code module group.
 Category: Signed  boolean containsDependency(String groupName)
          Determines if this code module group depends on named group.
 Category: Signed  boolean containsModule(String moduleName)
          Determines if this code module group contains named code module.
 Category: Signed  void delete()
          Deletes this code module group.
 Category: Signed  boolean equals(Object o)
          Indicates whether the given object is equal to this CodeModuleGroup.
 Category: Signed  String getCopyright()
          Retrieves this code module group's copyright.
 Category: Signed  Enumeration getDependencies()
          Retrieves list of dependencies for this code module group.
 Category: Signed  String getDescription()
          Retrieves this code module group's description.
 Category: Signed  int getFlags()
          Retrieves this code module group's flag mask.
 Category: Signed  String getFriendlyName()
          Retrieves this code module group's friendly name.
 Category: Signed  int getHandle()
          Retrieves the handle for this CodeModuleGroup.
 Category: Signed  Enumeration getModules()
          Retrieves the list of this code module group's modules.
 Category: Signed  String getName()
          Retrieves this code module group's name.
 Category: Signed  String getProperty(String name)
          Retrieves value for this code module group's named property.
 Category: Signed  Enumeration getPropertyNames()
          Retrieves the list of this code module group's property names.
 Category: Signed  String getVendor()
          Retrieves this code module group's vendor.
 Category: Signed  String getVersion()
          Retrieves this code module group's version.
 Category: Signed static CodeModuleGroup load(String groupName)
          Deprecated. Use net.rim.device.api.system.CodeModuleGroupManager.load( String groupName )
 Category: Signed static CodeModuleGroup[] loadAll()
          Deprecated. Use net.rim.device.api.system.CodeModuleGroupManager.loadAll()
 Category: Signed  void setCopyright(String copyright)
          Sets this code module group's copyright.
 Category: Signed  void setDescription(String description)
          Sets this code module group's description.
 Category: Signed  void setFlag(int flag, boolean value)
          Sets (or clears) named flag in this code module group's flag mask.
 Category: Signed  void setFriendlyName(String friendlyName)
          Sets this code module group's friendly name.
 Category: Signed  void setProperty(String name, String value)
          Sets property value for this code module group.
 Category: Signed  void setVendor(String vendor)
          Sets this code module group's vendor.
 Category: Signed  void setVersion(String version)
          Sets this code module group's version.
 Category: Signed  boolean store()
          Stores this code module group.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FLAG_DEPENDENCY

public static final int FLAG_DEPENDENCY
The group is a child of another group.
Since:
JDE 4.0.2
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.

FLAG_HIDDEN

public static final int FLAG_HIDDEN
The group should be hidden from view.
Since:
JDE 4.0.2
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.

FLAG_LIBRARY

public static final int FLAG_LIBRARY
The group is a library.
Since:
JDE 4.1.0
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.

FLAG_REQUIRED

public static final int FLAG_REQUIRED
The group is required, and should not be deleted.
Since:
JDE 4.0.2
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.
Constructor Detail

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
Since:
JDE 4.0.2
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.
Method Detail

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.
Since:
JDE 4.0.2
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.

addModule

public void addModule(String moduleName)
Adds named module to this code module group.
Parameters:
moduleName - Name of module to add to this gorup.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
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.

delete

public void delete()
Deletes this code module group.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
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.

getCopyright

public String getCopyright()
Retrieves this code module group's copyright.
Returns:
Copyright string for this group.
Since:
JDE 4.0.2
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.

getDependencies

public Enumeration getDependencies()
Retrieves list of dependencies for this code module group.
Returns:
Enumeration of all dependencies for this group.
Since:
JDE 4.0.2
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.

getDescription

public String getDescription()
Retrieves this code module group's description.
Returns:
Description for this group.
Since:
JDE 4.0.2
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.

getFlags

public int getFlags()
Retrieves this code module group's flag mask.
Returns:
Combine set of flags for this group.
Since:
JDE 4.0.2
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.

getFriendlyName

public String getFriendlyName()
Retrieves this code module group's friendly name.
Returns:
Friendly name for this group.
Since:
JDE 4.0.2
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.

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 store().

Returns:
Handle for this CodeModuleGroup, or 0 if no handle has been assigned.
Since:
JDE 4.0.2
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.

getModules

public Enumeration getModules()
Retrieves the list of this code module group's modules.
Returns:
Enumeration of all the modules in this group.
Since:
JDE 4.0.2
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.

getName

public String getName()
Retrieves this code module group's name.
Returns:
Name for this group.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
See Also:
getPropertyNames(), 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.

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.
Since:
JDE 4.2.0
See Also:
getProperty(String name), 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.

getVendor

public String getVendor()
Retrieves this code module group's vendor.
Returns:
Vendor string for this group.
Since:
JDE 4.0.2
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.

getVersion

public String getVersion()
Retrieves this code module group's version.
Returns:
Version string for this group.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
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.

setCopyright

public void setCopyright(String copyright)
Sets this code module group's copyright.
Parameters:
copyright - Copyright string for this group.
Since:
JDE 4.0.2
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.

setDescription

public void setDescription(String description)
Sets this code module group's description.
Parameters:
description - Description for this group.
Since:
JDE 4.0.2
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.

setFlag

public void setFlag(int flag,
                    boolean value)
Sets (or clears) named flag in this code module group's flag mask.
Parameters:
flag - Flag to set or clear.
value - True to set flag; false to clear flag.
Since:
JDE 4.0.2
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.

setFriendlyName

public void setFriendlyName(String friendlyName)
Sets this code module group's friendly name.
Parameters:
friendlyName - Friendly name for this group.
Since:
JDE 4.0.2
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.

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.
Since:
JDE 4.0.2
See Also:
getPropertyNames(), 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.

setVendor

public void setVendor(String vendor)
Sets this code module group's vendor.
Parameters:
vendor - Vendor string for this group.
Since:
JDE 4.0.2
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.

setVersion

public void setVersion(String version)
Sets this code module group's version.
Parameters:
version - Version string for this group.
Since:
JDE 4.0.2
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.

store

public boolean store()
Stores this code module group.
Returns:
True if this group successfully stored itself; otherwise, false.
Since:
JDE 4.0.2
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.



Copyright 1999-2009 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.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.