net.rim.blackberry.api.profiles
Class Profile

java.lang.Object
  extended by net.rim.blackberry.api.profiles.Profile
Direct Known Subclasses:
ContactProfile

public class Profile
extends Object

Contains settings of a device profile.

The Profile class is a container of notification rules. A notification rule combines an event and its response (for example, an incoming phone call on line 1 and ring tone "Ringer_BB_4"). The event response may contain a number of alerts through various outputs, such as vibration, LED, speaker, and so on.

The Profile named "Normal" is considered the default device profile. The default device profile settings are inherited by all other profiles unless overridden. For example, a ring tone assigned in the Normal profile will be copied to a profile called "Loud" if the user hasnít updated the Loud profile ring tone.

The active device profile is the device profile that is currently selected in the Profiles application.

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 7.1.0

Constructor Summary
Category: Signed Profile(String name)
          Constructs a new Profile instance with the specified profile name.
 
Method Summary
Category: Signed  int getId()
          Returns the profile ID.
Category: Signed  String getName()
          Returns the name of the profile.
Category: Signed  NotificationRule[] getRules()
          Returns all notification rules for all event categories.
Category: Signed  NotificationRule[] getRules(int category)
          Returns notification rules based on the specified category.
Category: Signed  boolean isActive()
          Indicates whether this profile is the active device profile.
Category: Signed  boolean isDefault()
          Indicates whether this profile is the default device profile.
Category: Signed  void setActive()
          Sets this profile as the active device profile.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

Profile

public Profile(String name)
Constructs a new Profile instance with the specified profile name.

Parameters:
name - The name of the profile.
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 7.1.0


Method Detail

getName

public String getName()
Returns the name of the profile.

Returns:
The name of the profile.
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 7.1.0

getId

public int getId()
Returns the profile ID.

Returns:
The profile ID.
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 7.1.0

getRules

public NotificationRule[] getRules()
Returns all notification rules for all event categories.

Returns:
An array of notification rules for all event categories.
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 7.1.0

getRules

public NotificationRule[] getRules(int category)
Returns notification rules based on the specified category.

Parameters:
category - The category to return notification rules for. This parameter must be one of the CATEGORY_XXX constants in the Profiles class.
Returns:
An array of notification rules based on the specified category.
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 7.1.0

isDefault

public boolean isDefault()
Indicates whether this profile is the default device profile.

Default profile notification rules are inherited by other profiles unless overridden.

Returns:
true if this profile is the default device profile, false otherwise.
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 7.1.0

isActive

public boolean isActive()
Indicates whether this profile is the active device profile.

The active device profile is the device profile that is currently selected in the Profiles application.

Returns:
true if this profile is the active device profile, false otherwise.
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 7.1.0

setActive

public void setActive()
Sets this profile as the active device profile.

Throws:
SecurityException - if the ability to change profiles is disabled by an IT policy on the device.
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 7.1.0





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