org.n52.security.common.subject
Class AttributePrincipal

java.lang.Object
  extended by org.n52.security.common.subject.NamePrincipal
      extended by org.n52.security.common.subject.AttributePrincipal
All Implemented Interfaces:
Serializable, Principal, Scope

public class AttributePrincipal
extends NamePrincipal

Container for simple parameter/value principals.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.n52.security.common.subject.Scope
GLOBAL
 
Constructor Summary
AttributePrincipal(Attribute attribute)
           
AttributePrincipal(Attribute attribute, Scope scope)
           
AttributePrincipal(String key, String value)
           
AttributePrincipal(String key, String value, Scope scope)
           
 
Method Summary
 boolean equals(Object o)
           
 Attribute getAttribute()
           
 AttributeValue getAttributeValue()
          Short-cut for getAttribute().getValue()
 String getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class org.n52.security.common.subject.NamePrincipal
getName, getScope
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributePrincipal

public AttributePrincipal(Attribute attribute)
                   throws IllegalArgumentException
Throws:
IllegalArgumentException

AttributePrincipal

public AttributePrincipal(Attribute attribute,
                          Scope scope)
                   throws IllegalArgumentException
Throws:
IllegalArgumentException

AttributePrincipal

public AttributePrincipal(String key,
                          String value)
                   throws IllegalArgumentException
Throws:
IllegalArgumentException

AttributePrincipal

public AttributePrincipal(String key,
                          String value,
                          Scope scope)
                   throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

getAttribute

public Attribute getAttribute()

getAttributeValue

public AttributeValue getAttributeValue()
Short-cut for getAttribute().getValue()

Returns:
AttributeValue.

getValue

public String getValue()
Returns:
the string value of this attribute

equals

public boolean equals(Object o)
Specified by:
equals in interface Principal
Overrides:
equals in class NamePrincipal

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class NamePrincipal

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class NamePrincipal


Copyright © 2004–2014 52north.org. All rights reserved.