org.edg.security.authorization.repository
Interface AttributeRepository

All Known Implementing Classes:
And, AuthorizationManager.Policy, Map, Or, VOMS

public interface AttributeRepository

Interface for AttributeRepository implementation. A AttributeRepository answers to questions as to wheter a certain attribute (value) can be associated with a certain identity (key).
Insert 'the right' copyright

Version:
$Id: AttributeRepository.java,v 1.6 2003/04/10 12:21:09 gianluca Exp $
Author:
Olle Mulmo

Method Summary
 boolean evalAttributeBinding(java.lang.String identity, java.lang.String attribute)
          Method evalAttributeBinding.
 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.
 

Method Detail

findAllAttributesFor

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

Parameters:
identity - The subject in question.
Returns:
List of attributes.

findFirstAttributeFor

public java.lang.String findFirstAttributeFor(java.lang.String identity)
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.

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)
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)

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

terminate

public void terminate()
Terminate all Timer objects responsible for refreshing the content of the AttributeRepository.