issrg.pba
Class DefaultDelegatableToken

java.lang.Object
  extended by issrg.pba.DefaultParsedToken
      extended by issrg.pba.DefaultDelegatableToken
All Implemented Interfaces:
DelegatableToken, ParsedToken

public class DefaultDelegatableToken
extends DefaultParsedToken
implements DelegatableToken

This is the default Delegatable Parsed Token implementation. It contains the Holder, the Issuer and the Credentials of the Holder, and points to the Issuer location as well as specifies the depth of delegation that is allowed. The credentials of the Holder are split into two categories: assertable credentials and delegatable credentials


Constructor Summary
protected DefaultDelegatableToken()
           
  DefaultDelegatableToken(Entry holder, TokenLocator issuer, Credentials creds, Credentials delegateableCredentials, Subtree subjectDomain, int depth)
          This is the constructor that builds the Default Parsed Token given the Holder, the Issuer and the Credentials of the Holder issued to him by the Issuer.
  DefaultDelegatableToken(Entry holder, TokenLocator issuer, Credentials creds, Credentials delegateableCredentials, Subtree subjectDomain, int depth, boolean revocable)
           
 
Method Summary
 Credentials getDelegateableCredentials()
          This method extracts the delegatable Credentials from the object representing the Authorisation Token.
 int getDepth()
          This method returns the depth of delegation chain allowed for the holder of this token.
 Subtree getSubjectDomain()
          This method returns a domain of subjects to whom the holder of the token can delegate the Delegateable Credentials to.
 java.lang.String toString()
           
 
Methods inherited from class issrg.pba.DefaultParsedToken
getCredentials, getHolder, getIssuerTokenLocator, isRevocable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface issrg.pba.ParsedToken
getCredentials, getHolder, getIssuerTokenLocator, isRevocable
 

Constructor Detail

DefaultDelegatableToken

protected DefaultDelegatableToken()

DefaultDelegatableToken

public DefaultDelegatableToken(Entry holder,
                               TokenLocator issuer,
                               Credentials creds,
                               Credentials delegateableCredentials,
                               Subtree subjectDomain,
                               int depth)
This is the constructor that builds the Default Parsed Token given the Holder, the Issuer and the Credentials of the Holder issued to him by the Issuer.

Parameters:
holder - - the Holder entry
issuer - - the Issuer Token Locator
creds - - the Credentials of the Holder
delegateableCredentials - - the Credentials of the Holder
subjectDomain - - the domain of subjects to whom the holder can delegate the credentials
depth - - the depth of delegation chain that the delegateableCredentials can be delegated to

DefaultDelegatableToken

public DefaultDelegatableToken(Entry holder,
                               TokenLocator issuer,
                               Credentials creds,
                               Credentials delegateableCredentials,
                               Subtree subjectDomain,
                               int depth,
                               boolean revocable)
Method Detail

getDelegateableCredentials

public Credentials getDelegateableCredentials()
Description copied from interface: DelegatableToken
This method extracts the delegatable Credentials from the object representing the Authorisation Token.

The result is never null.

Specified by:
getDelegateableCredentials in interface DelegatableToken
Returns:
Credentials is the delegatable Credentials that the Authorisation Token contains

getSubjectDomain

public Subtree getSubjectDomain()
Description copied from interface: DelegatableToken
This method returns a domain of subjects to whom the holder of the token can delegate the Delegateable Credentials to.

Specified by:
getSubjectDomain in interface DelegatableToken

getDepth

public int getDepth()
Description copied from interface: DelegatableToken
This method returns the depth of delegation chain allowed for the holder of this token. "0" means one level down, "1" means two leves down... "-1" means infinity.

Specified by:
getDepth in interface DelegatableToken

toString

public java.lang.String toString()
Overrides:
toString in class DefaultParsedToken