|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.rim.pushsdk.subscription.auth.SubscriberPrincipal
public class SubscriberPrincipal
This class implements the Principal interface and represents a subscriber returned from authentication with a name
(unique identification) and a set of properties (e.g. private encryption key, etc.).
name if they wish to have case
insensitive unique ids.
| Constructor Summary | |
|---|---|
SubscriberPrincipal(String name)
Constructs a subscriber principal with the given name (unique id). |
|
| Method Summary | |
|---|---|
void |
addProperty(String key,
String value)
Adds a new key-value pair to a subscriber principal's properties. |
boolean |
equals(Object obj)
Returns true if two subscriber principals are found to be equal and false otherwise. |
String |
getName()
Returns the name of this principal. |
Map<String,String> |
getProperties()
Gets a set of key-value pairs that relate to a subscriber principal. |
int |
hashCode()
Returns a hashcode for this subscriber principal. |
String |
removeProperty(String key)
Removes a key-value pair from a subscriber principal's properties. |
void |
setName(String name)
Sets the unique name/id of a subscriber. |
void |
setProperties(Map<String,String> properties)
Sets the key-value pairs that relate to a subscriber principal. |
String |
toString()
Constructs a String with all attributes in name = value format. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SubscriberPrincipal(String name)
name - an id uniquely identifying a subscriber (a primary key)| Method Detail |
|---|
public String getName()
getName in interface Principalpublic void setName(String name)
name - an id uniquely identifying a subscriber (a primary key)public Map<String,String> getProperties()
public void setProperties(Map<String,String> properties)
properties - a set of key-value pairs
public void addProperty(String key,
String value)
key - the property's keyvalue - the property's valuepublic String removeProperty(String key)
key - the property's key
public int hashCode()
hashCode in interface PrincipalhashCode in class Objectpublic boolean equals(Object obj)
equals in interface Principalequals in class Objectpublic String toString()
String with all attributes in name = value format.
toString in interface PrincipaltoString in class ObjectString representation of this object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||