no.feide.moria.authorization
Class AuthorizationAttribute

java.lang.Object
  extended by no.feide.moria.authorization.AuthorizationAttribute

final class AuthorizationAttribute
extends java.lang.Object

This class represents an LDAP attribute and is used for authorization of a web service. Both AuthorizationManager and AuthorizationClient have lists of attributes.

Version:
$Revision: 1.18 $
Author:
Lars Preben S. Arnesen <lars.preben.arnesen@conduct.no>

Field Summary
private  boolean allowSSO
          Is this attribute allowed in use with SSO?
private  int hashCode
          Cached hash code.
private  java.lang.String name
          Name of attribute.
private  int secLevel
          Security level.
 
Constructor Summary
AuthorizationAttribute(java.lang.String name, boolean allowSSO, int secLevel)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if the supplied object is identical to this one.
 boolean getAllowSSO()
          Returns true if the attribute is allowed in use with SSO.
 java.lang.String getName()
          Gets the name of attribute.
 int getSecLevel()
          Gets the security level of this attribute.
 int hashCode()
          Generates a hashCode from the object's attributes.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hashCode

private volatile int hashCode
Cached hash code.


name

private java.lang.String name
Name of attribute.


allowSSO

private boolean allowSSO
Is this attribute allowed in use with SSO?


secLevel

private int secLevel
Security level.

Constructor Detail

AuthorizationAttribute

AuthorizationAttribute(java.lang.String name,
                       boolean allowSSO,
                       int secLevel)
Constructor. Name of attribute must be a non-empty string. Security level must be >= 0.

Parameters:
name - Name of attribute.
allowSSO - Allow use of SSO with this attribute.
secLevel - The attribute's security level.
Throws:
java.lang.IllegalArgumentException - If name is null or an empty string, or secLevel is not between 0 and 2, inclusive.
Method Detail

equals

public boolean equals(java.lang.Object object)
Returns true if the supplied object is identical to this one.

Overrides:
equals in class java.lang.Object
Parameters:
object - The object to compare with.
Returns:
false if any of the attributes are different from the supplied object.

hashCode

public int hashCode()
Generates a hashCode from the object's attributes. 'name', 'secLevel' and 'allowSSO' are used for the computation.

Overrides:
hashCode in class java.lang.Object
Returns:
The hashcode for this object.

getSecLevel

public int getSecLevel()
Gets the security level of this attribute.

Returns:
Security level.

getName

public java.lang.String getName()
Gets the name of attribute.

Returns:
Name of the attribute.

getAllowSSO

public boolean getAllowSSO()
Returns true if the attribute is allowed in use with SSO.

Returns:
True if the attribute can be used with SSO, else false.

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this object.


Copyright © 2001-2006 UNINETT FAS. All Rights Reserved.