org.apache.ws.security.message.token
Class Timestamp

java.lang.Object
  extended byorg.apache.ws.security.message.token.Timestamp

public class Timestamp
extends java.lang.Object

Timestamp according to SOAP Message Security 1.0, chapter 10 / appendix A.2

Author:
Christof Soehngen (christof.soehngen@syracom.de)

Field Summary
protected  java.util.Calendar created
           
protected  java.util.Vector customElements
           
protected  org.w3c.dom.Element element
           
protected  org.w3c.dom.Element elementCreated
           
protected  org.w3c.dom.Element elementExpires
           
protected  java.util.Calendar expires
           
 
Constructor Summary
Timestamp(WSSConfig wssConfig, org.w3c.dom.Document doc, int ttl)
          Constructs a Timestamp object according to the defined parameters.
Timestamp(WSSConfig wssConfig, org.w3c.dom.Element element)
          Constructs a Timestamp object and parses the wsu:Timestamp element to initialize it.
 
Method Summary
 void addCustomElement(org.w3c.dom.Document doc, org.w3c.dom.Element customElement)
          Creates and adds a custom element to this Timestamp
 java.util.Calendar getCreated()
          Get the time of creation.
 java.util.Vector getCustomElements()
          Get the the custom elements from this Timestamp
 org.w3c.dom.Element getElement()
          Returns the dom element of this Timestamp object.
 java.util.Calendar getExpires()
          Get the time of expiration.
 java.lang.String toString()
          Returns the string representation of the token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

element

protected org.w3c.dom.Element element

elementCreated

protected org.w3c.dom.Element elementCreated

elementExpires

protected org.w3c.dom.Element elementExpires

customElements

protected java.util.Vector customElements

created

protected java.util.Calendar created

expires

protected java.util.Calendar expires
Constructor Detail

Timestamp

public Timestamp(WSSConfig wssConfig,
                 org.w3c.dom.Element element)
          throws WSSecurityException
Constructs a Timestamp object and parses the wsu:Timestamp element to initialize it.


Timestamp

public Timestamp(WSSConfig wssConfig,
                 org.w3c.dom.Document doc,
                 int ttl)
Constructs a Timestamp object according to the defined parameters.

Parameters:
doc - the SOAP envelope as Document
ttl - the time to live (validity of the security semantics) in seconds
Method Detail

getElement

public org.w3c.dom.Element getElement()
Returns the dom element of this Timestamp object.

Returns:
the wsse:UsernameToken element

toString

public java.lang.String toString()
Returns the string representation of the token.

Returns:
a XML string representation

getCreated

public java.util.Calendar getCreated()
Get the time of creation.

Returns:

getExpires

public java.util.Calendar getExpires()
Get the time of expiration.

Returns:

addCustomElement

public void addCustomElement(org.w3c.dom.Document doc,
                             org.w3c.dom.Element customElement)
Creates and adds a custom element to this Timestamp


getCustomElements

public java.util.Vector getCustomElements()
Get the the custom elements from this Timestamp

Returns:
the vector containing the custom elements.