no.feide.mellon.jaas.principals
Class MoriaPrincipal

java.lang.Object
  extended by no.feide.mellon.jaas.principals.MoriaPrincipal
All Implemented Interfaces:
java.security.Principal
Direct Known Subclasses:
EntitlementPrincipal, ScopedAffiliationPrincipal

public class MoriaPrincipal
extends java.lang.Object
implements java.security.Principal

This is the general Principal class.

Author:
Rikke Amilde Løvlid

Field Summary
protected  java.lang.String attributeName
           
protected  java.lang.String attributeValue
           
 
Constructor Summary
MoriaPrincipal(java.lang.String name)
           
MoriaPrincipal(java.lang.String attributeName, java.lang.String attributeValue)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.String getAttributeName()
           
 java.lang.String getAttributeValue()
           
 java.lang.String getName()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

attributeName

protected java.lang.String attributeName

attributeValue

protected java.lang.String attributeValue
Constructor Detail

MoriaPrincipal

public MoriaPrincipal(java.lang.String name)
Parameters:
name - the principal name that are used in the policy file, has to have the format attributeName:attributeValue, ex: eduPersonAffiliation:student

MoriaPrincipal

public MoriaPrincipal(java.lang.String attributeName,
                      java.lang.String attributeValue)
Parameters:
attributeName - the FEIDE attribute name
attributeValue - the FEIDE attribute value
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface java.security.Principal
Returns:
attributeName:attributeValue

getAttributeName

public java.lang.String getAttributeName()

getAttributeValue

public java.lang.String getAttributeValue()

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object
Returns:
MoriaPrincipal: attributeName:attributeValue

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Parameters:
o - the object we want to compare to this
Returns:
true if this is the same object as o or this and o have the same attributeName and attributeValue.

hashCode

public int hashCode()
Specified by:
hashCode in interface java.security.Principal
Overrides:
hashCode in class java.lang.Object


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