org.edg.security.authorization
Class AuthorizationManager.Policy

java.lang.Object
  |
  +--org.edg.security.authorization.AuthorizationManager.Policy
All Implemented Interfaces:
AttributeRepository
Enclosing class:
AuthorizationManager

protected class AuthorizationManager.Policy
extends java.lang.Object
implements AttributeRepository

Internal class extending the AttributeRepository with a possible extra transformation.


Field Summary
protected  AttributeRepository myRepository
           
protected  AttributeMap myTranslationMap
           
 
Constructor Summary
protected AuthorizationManager.Policy(AttributeRepository rep, AttributeMap map)
           
 
Method Summary
 boolean evalAttributeBinding(java.lang.String identity, java.lang.String attribute)
          Method evalAttributeBinding.
 java.lang.String fiddle(java.lang.String identity)
          fiddles with the subject to remove proxy and get it in RFC2253 format
 java.util.List findAllAttributesFor(java.lang.String identity)
          Method findAllAttributesFor.
 java.lang.String findFirstAttributeFor(java.lang.String identity)
          Method findFirstAttributeFor.
 void terminate()
          Terminate all Timer objects responsible for refreshing the content of the AttributeRepository.
 java.lang.String translateAttribute(java.lang.String attribute)
           
 java.util.List translateAttributes(java.util.List attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myRepository

protected AttributeRepository myRepository

myTranslationMap

protected AttributeMap myTranslationMap
Constructor Detail

AuthorizationManager.Policy

protected AuthorizationManager.Policy(AttributeRepository rep,
                                      AttributeMap map)
Method Detail

fiddle

public java.lang.String fiddle(java.lang.String identity)
fiddles with the subject to remove proxy and get it in RFC2253 format


findAllAttributesFor

public java.util.List findAllAttributesFor(java.lang.String identity)
Description copied from interface: AttributeRepository
Method findAllAttributesFor. Returns all attributes associated with the given identity. If no attributes can be associated, an empty list is returned.

Specified by:
findAllAttributesFor in interface AttributeRepository
Parameters:
identity - The subject in question.
Returns:
List of attributes.

findFirstAttributeFor

public java.lang.String findFirstAttributeFor(java.lang.String identity)
Description copied from interface: AttributeRepository
Method findFirstAttributeFor. Returns the first attribute associated with the given identity. This is equivalent to
List l = findAllAttributesFor(identity); return l.isEmpty() ? null : (String) l.get(0); but can be implemented in a more efficient manner.

Specified by:
findFirstAttributeFor in interface AttributeRepository
Parameters:
identity - The subject in question.
Returns:
String The first attribute found associated with the user, or null

evalAttributeBinding

public boolean evalAttributeBinding(java.lang.String identity,
                                    java.lang.String attribute)
Description copied from interface: AttributeRepository
Method evalAttributeBinding. Evalutates if the attribute can be associated with the given identity. The result of this method is equivalent to
findAllAttributesFor(identity).contains(attribute)

Specified by:
evalAttributeBinding in interface AttributeRepository
Parameters:
identity - The subject in question.
attribute - The attribute asked for
Returns:
boolean If the subject can be associated with the attribute or not

translateAttribute

public java.lang.String translateAttribute(java.lang.String attribute)

translateAttributes

public java.util.List translateAttributes(java.util.List attributes)

terminate

public void terminate()
Description copied from interface: AttributeRepository
Terminate all Timer objects responsible for refreshing the content of the AttributeRepository.

Specified by:
terminate in interface AttributeRepository