| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.iona.security.common.Realm
The object which represents a realm which is or will be persisted.
 This may or may not also represent any associations between realms and
 roles.  In the lightweight usage, it does not refer to those roles, it
 is just a container for administration which only looks at the realm
 itself.  In the heavyweight usage it refers to the associated roles and
 is used indirectly when populating an AuthenticatedPrincipal.
 Associations with other objects are not directly represented in this object.
 
 Note:  this class is not multi-thread safe.  You must add synchronization
 around it if you wish to share an instance among multiple threads.
| Constructor Summary | |
Realm(java.lang.String description)
Special constructor used for the global realm.  | 
|
Realm(java.lang.String name,
      java.lang.String description)
Constructor used for newly-created (not-yet-persisted) realms.  | 
|
| Method Summary | |
 void | 
addRole(Role r)
add a role  | 
 void | 
copyFromOptionalID(Realm realm)
Copies data from a Realm object where the ID is optional in the source object; this method should only be used in azmgr classes.  | 
 void | 
createDefaultRoles()
Creates the default roles in this realm object.  | 
 boolean | 
equals(java.lang.Object obj)
Standard equality comparison.  | 
 java.lang.String | 
getDescription()
Returns the realm description.  | 
 java.lang.String | 
getID()
Returns the realm ID; this method should only be used in azmgr classes.  | 
 java.lang.String | 
getName()
Returns the realm name.  | 
 java.util.HashMap | 
getRoles()
Returns the map of roles.  | 
 int | 
hashCode()
Standard hash code generation.  | 
 boolean | 
isGlobalRealm()
Determines whether this realm is the global realm.  | 
 void | 
setDescription(java.lang.String description)
Sets the realm description.  | 
 void | 
setID(java.lang.String id)
Sets the realm ID; this method should only be used in azmgr classes.  | 
 void | 
setName(java.lang.String name)
Sets the realm name.  | 
 void | 
setReadOnly()
Sets the object into a non-modifiable mode.  | 
 void | 
setRoles(java.util.HashMap roles)
Sets the map of roles.  | 
 java.lang.String | 
toString()
Returns the string representation of this object.  | 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public Realm(java.lang.String name,
             java.lang.String description)
      throws java.lang.IllegalArgumentException
name - the name of the realmdescription - the description of the realmjava.lang.IllegalArgumentException - if the name is invalid
public Realm(java.lang.String description)
      throws java.lang.IllegalArgumentException
description - the description of the realmjava.lang.IllegalArgumentException - if the name is invalid| Method Detail | 
public void copyFromOptionalID(Realm realm)
                        throws java.lang.IllegalArgumentException
realm - the realm to copy fromjava.lang.IllegalArgumentException - if the role is null or the IDs do
         not match (if the source ID is not null) or this ID is nullpublic java.lang.String getName()
public void setName(java.lang.String name)
             throws java.lang.IllegalArgumentException
name - the new realm namejava.lang.IllegalArgumentException - if the name is invalidpublic java.lang.String getID()
public void setID(java.lang.String id)
           throws java.lang.IllegalArgumentException
id - the new realm ID.java.lang.IllegalArgumentException - if the ID is invalid or the realm
         already has an IDpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
                    throws java.lang.IllegalArgumentException
description - the new realm descriptionpublic java.util.HashMap getRoles()
public void setRoles(java.util.HashMap roles)
              throws java.lang.IllegalArgumentException
roles - the map of rolesjava.lang.IllegalArgumentException - if the map is nullpublic void addRole(Role r)
public void createDefaultRoles()
public void setReadOnly()
public boolean isGlobalRealm()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare topublic int hashCode()
hashCode in class java.lang.Object
  | 
Documentation built [Sat Dec 11 21:11:34 2004]. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||