|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.security.api.AuthorizationRealm
public class AuthorizationRealm
This class contains the realm and sub realm for an AuthorizationPermission
.
It may be composed of two divisions - a super realm and a sub realm. The super
realm is required and is a major grouping for AuthorizationPermission
s.
The sub realm is an optional and arbitrary tag that subdivides the super realm.
This object will not change during the life of an AuthorizationPermission
.
Field Summary | |
---|---|
static int |
MAX_DESCRIPTION_LEN
Largest allowable description. |
Constructor Summary | |
---|---|
AuthorizationRealm(java.lang.String realmName)
ctor Meant to be used only by JDBCAuthorizationTransaction to
populate AuthorizationPermission s with their realm when retrieving
them from the database. |
|
AuthorizationRealm(java.lang.String superRealmName,
java.lang.String subRealmName)
ctor Must have at least a superRealmName and may have a subRealmName. |
|
AuthorizationRealm(java.lang.String superRealmName,
java.lang.String subRealmName,
java.lang.String description)
ctor Must have at least a superRealmName and may have a subRealmName. |
Method Summary | |
---|---|
static int |
compare(AuthorizationRealm obj1,
AuthorizationRealm obj2)
Utility method to compare two AuthorizationRealm instances. |
int |
compareTo(java.lang.Object o)
Compares this AuthorizationRealm to another Object. |
boolean |
equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this instance. |
java.lang.String |
getDescription()
Get the realm description. |
java.lang.String |
getRealmName()
Get the full realm name. |
java.lang.String |
getSubRealmName()
Get the sub realm name. |
java.lang.String |
getSuperRealmName()
Get the super realm name. |
int |
hashCode()
Overrides Object hashCode method. |
void |
setDescription(java.lang.String description)
Set the realm description. |
java.lang.String |
toString()
Override Object method. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MAX_DESCRIPTION_LEN
Constructor Detail |
---|
public AuthorizationRealm(java.lang.String realmName)
JDBCAuthorizationTransaction
to
populate AuthorizationPermission
s with their realm when retrieving
them from the database.
realmName
- The name of the realm to which an AuthorizationPermission
belongs - May not be null. May be the combined super and sub realm names,
in which case it will be parsed correctly. Must contain no more than 2
realm components.
java.lang.IllegalArgumentException
- if realmName
contains too many
components.public AuthorizationRealm(java.lang.String superRealmName, java.lang.String subRealmName)
superRealmName
- The name of the realm to which an AuthorizationPermission
belongs - May not be null.subRealmName
- An arbitrary subdivision of the given realm - May be null.
java.lang.IllegalArgumentException
- if realmName
contains too many
components.public AuthorizationRealm(java.lang.String superRealmName, java.lang.String subRealmName, java.lang.String description)
superRealmName
- The name of the realm to which an AuthorizationPermission
belongs - May not be null.subRealmName
- An arbitrary subdivision of the given realm - May be null.description
- May be null.
java.lang.IllegalArgumentException
- if superRelamName
is null or empty
or if either superRealmName or subRealmName contain a realm delimeter char '.'.Method Detail |
---|
public java.lang.String getRealmName()
public java.lang.String getSuperRealmName()
public java.lang.String getSubRealmName()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The realm description.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
,
Object.equals(Object)
public boolean equals(java.lang.Object obj)
compareTo()
.
equals
in class java.lang.Object
obj
- the object that this instance is to be compared to.
public int compareTo(java.lang.Object o) throws java.lang.ClassCastException
equals()
.
compareTo
in interface java.lang.Comparable
o
- the object that this instance is to be compared to.
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this AuthorizationRealm.public static final int compare(AuthorizationRealm obj1, AuthorizationRealm obj2)
Subclasses may not override this method because it is designed to enforce a
constraint placed on AuthorizationRealm
s.
This method assumes that all type-checking has already been performed.
obj1
- the first policyID to be comparedobj2
- the second policyID to be compared
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |