org.jasig.cas.validation
Class ImmutableAssertionImpl

java.lang.Object
  extended by org.jasig.cas.validation.ImmutableAssertionImpl
All Implemented Interfaces:
Serializable, Assertion

public final class ImmutableAssertionImpl
extends Object
implements Assertion

Default implementation of the Assertion interface which returns the minimum number of attributes required to conform to the CAS 2 protocol.

Since:
3.0
Version:
$Revision$ $Date$
Author:
Scott Battaglia
See Also:
Serialized Form

Constructor Summary
ImmutableAssertionImpl(List<Authentication> principals, Service service, boolean fromNewLogin)
          Constructs a new ImmutableAssertion out of the given parameters.
 
Method Summary
 boolean equals(Object o)
           
 List<Authentication> getChainedAuthentications()
          Get a List of Authentications which represent the owners of the GrantingTickets which granted the ticket that was validated.
 Service getService()
          Method to obtain the service for which we are asserting this ticket is valid for.
 int hashCode()
           
 boolean isFromNewLogin()
          True if the validated ticket was granted in the same transaction as that in which its grantor GrantingTicket was originally issued.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableAssertionImpl

public ImmutableAssertionImpl(List<Authentication> principals,
                              Service service,
                              boolean fromNewLogin)
Constructs a new ImmutableAssertion out of the given parameters.

Parameters:
principals - the chain of principals
service - The service we are asserting this ticket for.
fromNewLogin - was the service ticket from a new login.
Throws:
IllegalArgumentException - if there are no principals.
Method Detail

getChainedAuthentications

public List<Authentication> getChainedAuthentications()
Description copied from interface: Assertion
Get a List of Authentications which represent the owners of the GrantingTickets which granted the ticket that was validated. The first Authentication of this list is the Authentication which originally authenticated to CAS to obtain the first Granting Ticket. Subsequent Authentication are those associated with GrantingTickets that were granted from that original granting ticket. The last Authentication in this List is that associated with the GrantingTicket that was the immediate grantor of the ticket that was validated. The List returned by this method will contain at least one Authentication.

Specified by:
getChainedAuthentications in interface Assertion
Returns:
a List of Authentication

isFromNewLogin

public boolean isFromNewLogin()
Description copied from interface: Assertion
True if the validated ticket was granted in the same transaction as that in which its grantor GrantingTicket was originally issued.

Specified by:
isFromNewLogin in interface Assertion
Returns:
true if validated ticket was granted simultaneous with its grantor's issuance

getService

public Service getService()
Description copied from interface: Assertion
Method to obtain the service for which we are asserting this ticket is valid for.

Specified by:
getService in interface Assertion
Returns:
the service for which we are asserting this ticket is valid for.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2012 Jasig. All Rights Reserved.