issrg.pba.repository
Class EntryLocator

java.lang.Object
  extended by issrg.pba.repository.EntryLocator
All Implemented Interfaces:
TokenLocator
Direct Known Subclasses:
SimpleEntry

public class EntryLocator
extends java.lang.Object
implements TokenLocator

This class is the default implementation of the TokenLocator. The get* methods simply return the corresponding values passed to the constructor.


Field Summary
protected  TokenLocator a
           
protected  AttributeRepository ar
           
protected  Entry e
           
protected  java.security.Principal p
           
 
Constructor Summary
EntryLocator(Entry entry, java.security.Principal locator, AttributeRepository rep, TokenLocator alternative)
          This constructor builds a EntryLocator using the given Entry, Principal of the TokenLocator, the repository in which this token locator makes sense, and the alternative locator.
 
Method Summary
 TokenLocator getAlternativeLocator()
          This method returns the alternative repository-specific locator of the Authorisation Tokens.
 Entry getEntry()
          This method returns the name of the entry the object locates.
 java.security.Principal getLocator()
          This method returns the main repository-specific locator of the Authorisation Tokens.
 AttributeRepository getRepository()
          This method returns the repository in which the Locator makes sense.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e

protected Entry e

p

protected java.security.Principal p

a

protected TokenLocator a

ar

protected AttributeRepository ar
Constructor Detail

EntryLocator

public EntryLocator(Entry entry,
                    java.security.Principal locator,
                    AttributeRepository rep,
                    TokenLocator alternative)
This constructor builds a EntryLocator using the given Entry, Principal of the TokenLocator, the repository in which this token locator makes sense, and the alternative locator.

Parameters:
entry - - the Entry that this token locator refers to; used for Domain matching
locator - - the Principal that helps find the tokens in the provided repository
rep - - the AttributeRepository from which the Authorization Tokens can be retrieved; can be null to imply that the tokens are available from a default location
alternative - - the alternative TokenLocator, where additional Authorization Tokens can be found; can be null
Method Detail

getEntry

public Entry getEntry()
Description copied from interface: TokenLocator
This method returns the name of the entry the object locates.

Specified by:
getEntry in interface TokenLocator
Returns:
the Entry object representing the entry name

getLocator

public java.security.Principal getLocator()
Description copied from interface: TokenLocator
This method returns the main repository-specific locator of the Authorisation Tokens.

Specified by:
getLocator in interface TokenLocator
Returns:
a principal object representing the main locator of the authorisation tokens.

getRepository

public AttributeRepository getRepository()
Description copied from interface: TokenLocator
This method returns the repository in which the Locator makes sense. May be null, if the Locator is applicable on the global scale (for example, is applicable to all the default repositories).

Specified by:
getRepository in interface TokenLocator

getAlternativeLocator

public TokenLocator getAlternativeLocator()
Description copied from interface: TokenLocator
This method returns the alternative repository-specific locator of the Authorisation Tokens. This locator may have another alternative locator, which in its turn can recursively proceed until all locators are listed. The end of the list is denoted by returning null as the alternative locator.

Specified by:
getAlternativeLocator in interface TokenLocator
Returns:
a TokenLocator object representing the alternative locator of the authorisation tokens