|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.cas.ticket.AbstractTicket
@MappedSuperclass public abstract class AbstractTicket
Abstract implementation of a ticket that handles all ticket state for policies. Also incorporates properties common among all tickets. As this is an abstract class, it cannnot be instanciated. It is recommended that implementations of the Ticket interface extend the AbstractTicket as it handles common functionality amongst different ticket types (such as state updating).
| Constructor Summary | |
|---|---|
protected |
AbstractTicket()
|
|
AbstractTicket(java.lang.String id,
TicketGrantingTicketImpl ticket,
ExpirationPolicy expirationPolicy)
Constructs a new Ticket with a unique id, a possible parent Ticket (can be null) and a specified Expiration Policy. |
| Method Summary | |
|---|---|
int |
getCountOfUses()
Returns the number of times this ticket was used. |
long |
getCreationTime()
Method to return the time the Ticket was created. |
TicketGrantingTicket |
getGrantingTicket()
Method to retrive the TicketGrantingTicket that granted this ticket. |
java.lang.String |
getId()
Method to retrieve the id. |
long |
getLastTimeUsed()
Returns the last time the ticket was used. |
long |
getPreviousTimeUsed()
Get the second to last time used. |
int |
hashCode()
|
boolean |
isExpired()
Determines if the ticket is expired. |
protected boolean |
isExpiredInternal()
|
java.lang.String |
toString()
|
protected void |
updateState()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jasig.cas.ticket.TicketState |
|---|
getAuthentication |
| Constructor Detail |
|---|
protected AbstractTicket()
public AbstractTicket(java.lang.String id,
TicketGrantingTicketImpl ticket,
ExpirationPolicy expirationPolicy)
id - the unique identifier for the ticketticket - the parent TicketGrantingTicketexpirationPolicy - the expiration policy for the ticket.
java.lang.IllegalArgumentException - if the id or expiration policy is null.| Method Detail |
|---|
public final java.lang.String getId()
Ticket
getId in interface Ticketprotected final void updateState()
public final int getCountOfUses()
Ticket
getCountOfUses in interface TicketgetCountOfUses in interface TicketStatepublic final long getCreationTime()
Ticket
getCreationTime in interface TicketgetCreationTime in interface TicketStatepublic final TicketGrantingTicket getGrantingTicket()
Ticket
getGrantingTicket in interface Ticketpublic final long getLastTimeUsed()
TicketState
getLastTimeUsed in interface TicketStatepublic final long getPreviousTimeUsed()
TicketState
getPreviousTimeUsed in interface TicketStatepublic final boolean isExpired()
Ticket
isExpired in interface TicketExpirationPolicyprotected boolean isExpiredInternal()
public final int hashCode()
hashCode in class java.lang.Objectpublic final java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||