PicketLink Federation Core 2.1.6.Final-redhat-2

org.picketlink.identity.federation.core.wstrust.wrappers
Class Lifetime

java.lang.Object
  extended by org.picketlink.identity.federation.core.wstrust.wrappers.Lifetime

public class Lifetime
extends Object

This class represents a WS-Trust Lifetime. It wraps the JAXB LifetimeType and offer methods that allows for easy retrieval of the creation and expiration times as XMLGregorianCalendar and GregorianCalendar objects.

Author:
Stefan Guilhen

Constructor Summary
Lifetime(GregorianCalendar created, GregorianCalendar expires)
           Creates an instance of Lifetime with the specified parameters.
Lifetime(LifetimeType lifetime)
           Creates a Lifetime instance using the specified LifetimeType.
 
Method Summary
 XMLGregorianCalendar getCreated()
           Obtains the creation time as a XMLGregorianCalendar.
 GregorianCalendar getCreatedCalendar()
           Obtains the creation time as a GregorianCalendar.
 LifetimeType getDelegate()
           Obtains a reference to the LifetimeType delegate.
 XMLGregorianCalendar getExpires()
           Obtains the expiration time as a XMLGregorianCalendar.
 GregorianCalendar getExpiresCalendar()
           Obtains the expiration time as a GregorianCalendar.
 void setCreated(XMLGregorianCalendar created)
           Sets the creation time.
 void setCreatedCalendar(GregorianCalendar created)
           Sets the creation time.
 void setExpires(XMLGregorianCalendar expires)
           Sets the expiration time.
 void setExpiresCalendar(GregorianCalendar expires)
           Sets the expiration time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lifetime

public Lifetime(GregorianCalendar created,
                GregorianCalendar expires)

Creates an instance of Lifetime with the specified parameters.

Parameters:
created - a GregorianCalendar representing the token creation time.
expires - a GregorianCalendar representing the token expiration time.

Lifetime

public Lifetime(LifetimeType lifetime)

Creates a Lifetime instance using the specified LifetimeType.

Parameters:
lifetime - a reference to the LifetimeType instance that contains the information used in the Lifetime construction.
Method Detail

getCreated

public XMLGregorianCalendar getCreated()

Obtains the creation time as a XMLGregorianCalendar.

Returns:
a reference to the XMLGregorianCalendar that represents the creation time.

setCreated

public void setCreated(XMLGregorianCalendar created)

Sets the creation time.

Parameters:
created - a reference to the XMLGregorianCalendar that represents the creation time to be set.

getCreatedCalendar

public GregorianCalendar getCreatedCalendar()

Obtains the creation time as a GregorianCalendar.

Returns:
a reference to the GregorianCalendar that represents the creation time.

setCreatedCalendar

public void setCreatedCalendar(GregorianCalendar created)

Sets the creation time.

Parameters:
created - a reference to the GregorianCalendar that represents the creation time to be set.

getExpires

public XMLGregorianCalendar getExpires()

Obtains the expiration time as a XMLGregorianCalendar.

Returns:
a reference to the XMLGregorianCalendar that represents the expiration time.

setExpires

public void setExpires(XMLGregorianCalendar expires)

Sets the expiration time.

Parameters:
expires - a reference to the XMLGregorianCalendar that represents the expiration time.

getExpiresCalendar

public GregorianCalendar getExpiresCalendar()

Obtains the expiration time as a GregorianCalendar.

Returns:
a reference to the GregorianCalendar that represents the expiration time.

setExpiresCalendar

public void setExpiresCalendar(GregorianCalendar expires)

Sets the expiration time.

Parameters:
expires - a reference to the GregorianCalendar that represents the expiration time.

getDelegate

public LifetimeType getDelegate()

Obtains a reference to the LifetimeType delegate.

Returns:
a reference to the delegate instance.

PicketLink Federation Core 2.1.6.Final-redhat-2

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.