org.apache.ws.sandbox.security.trust.message.token
Class Lifetime

java.lang.Object
  extended byorg.apache.ws.sandbox.security.trust.message.token.AbstractToken
      extended byorg.apache.ws.sandbox.security.trust.message.token.CompositeElement
          extended byorg.apache.ws.sandbox.security.trust.message.token.Lifetime

public class Lifetime
extends CompositeElement

Author:
Malinda Kaushalye, Ruchith Fernando Lifetime token

Field Summary
static javax.xml.namespace.QName TOKEN
           
 
Fields inherited from class org.apache.ws.sandbox.security.trust.message.token.AbstractToken
document, element
 
Constructor Summary
Lifetime(org.w3c.dom.Document doc, int duration)
          Constructor for Lifetime
Lifetime(org.w3c.dom.Document doc, java.lang.String created, java.lang.String expires)
          Constructor for Lifetime
Lifetime(org.w3c.dom.Element elem)
          Constructor for Lifetime Check for created and epires elements
 
Method Summary
protected  void deserializeChildElement(org.w3c.dom.Element elem)
          This is called for each of the immediate child elements of type Node.ELEMENT_NODE of this token
 java.lang.String getCreated()
          Retuns the value of the wsu:Created child element
 java.lang.String getExpires()
          Returns the value of the wsu:Expires element
protected  javax.xml.namespace.QName getToken()
          Returns the QName of this type
 void setCreated(java.lang.String value)
          Sets the value of the wsu:Createdelement
 void setExpires(java.lang.String value)
          Sets the value of the wsu:Expires element
 
Methods inherited from class org.apache.ws.sandbox.security.trust.message.token.CompositeElement
setElementTextValue
 
Methods inherited from class org.apache.ws.sandbox.security.trust.message.token.AbstractToken
addChild, getElement, parse, removeChild, setElement, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TOKEN

public static final javax.xml.namespace.QName TOKEN
Constructor Detail

Lifetime

public Lifetime(org.w3c.dom.Document doc,
                java.lang.String created,
                java.lang.String expires)
Constructor for Lifetime

Parameters:
doc -
created -
expires -

Lifetime

public Lifetime(org.w3c.dom.Element elem)
         throws WSTrustException
Constructor for Lifetime Check for created and epires elements

Parameters:
elem -
Throws:
WSSecurityException
WSTrustException

Lifetime

public Lifetime(org.w3c.dom.Document doc,
                int duration)
Constructor for Lifetime

Parameters:
doc -
duration - in minutes
Method Detail

getCreated

public java.lang.String getCreated()
Retuns the value of the wsu:Created child element

Returns:

getExpires

public java.lang.String getExpires()
Returns the value of the wsu:Expires element

Returns:

setCreated

public void setCreated(java.lang.String value)
Sets the value of the wsu:Createdelement

Parameters:
value -

setExpires

public void setExpires(java.lang.String value)
Sets the value of the wsu:Expires element

Parameters:
value -

getToken

protected javax.xml.namespace.QName getToken()
Returns the QName of this type

Specified by:
getToken in class AbstractToken
Returns:
See Also:
AbstractToken.getToken()

deserializeChildElement

protected void deserializeChildElement(org.w3c.dom.Element elem)
                                throws WSTrustException
Description copied from class: AbstractToken
This is called for each of the immediate child elements of type Node.ELEMENT_NODE of this token

Specified by:
deserializeChildElement in class AbstractToken
Parameters:
elem - The child element
Throws:
WSTrustException


Copyright © 2004-2008 Apache Web Services. All Rights Reserved.