Class Timestamp
- java.lang.Object
-
- org.apache.ws.security.message.token.Timestamp
-
public class Timestamp extends java.lang.ObjectTimestamp according to SOAP Message Security 1.0, chapter 10 / appendix A.2- Author:
- Christof Soehngen (christof.soehngen@syracom.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Calendarcreatedprotected java.util.VectorcustomElementsprotected org.w3c.dom.Elementelementprotected java.util.Calendarexpires
-
Constructor Summary
Constructors Constructor Description Timestamp(boolean milliseconds, org.w3c.dom.Document doc, int ttl)Constructs aTimestampobject according to the defined parameters.Timestamp(org.w3c.dom.Element element)Constructs aTimestampobject and parses thewsu:Timestampelement to initialize it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCustomElement(org.w3c.dom.Document doc, org.w3c.dom.Element customElement)Creates and adds a custom element to this Timestampjava.util.CalendargetCreated()Get the time of creation.protected java.util.CalendargetCurrentTime()Get the current timejava.util.VectorgetCustomElements()Get the the custom elements from this Timestamporg.w3c.dom.ElementgetElement()Returns the dom element of thisTimestampobject.java.util.CalendargetExpires()Get the time of expiration.java.lang.StringgetID()Returns the value of the wsu:Id attributevoidsetID(java.lang.String id)Set wsu:Id attribute of this timestampjava.lang.StringtoString()Returns the string representation of the token.
-
-
-
Constructor Detail
-
Timestamp
public Timestamp(org.w3c.dom.Element element) throws WSSecurityExceptionConstructs aTimestampobject and parses thewsu:Timestampelement to initialize it.- Parameters:
element- thewsu:Timestampelement that contains the timestamp data- Throws:
WSSecurityException
-
Timestamp
public Timestamp(boolean milliseconds, org.w3c.dom.Document doc, int ttl)Constructs aTimestampobject according to the defined parameters.- Parameters:
doc- the SOAP envelope asDocumentttl- the time to live (validity of the security semantics) in seconds
-
-
Method Detail
-
getCurrentTime
protected java.util.Calendar getCurrentTime()
Get the current time- Returns:
- calendar the current time
-
getElement
public org.w3c.dom.Element getElement()
Returns the dom element of thisTimestampobject.- Returns:
- the
wsse:UsernameTokenelement
-
toString
public java.lang.String toString()
Returns the string representation of the token.- Overrides:
toStringin classjava.lang.Object- Returns:
- a XML string representation
-
getCreated
public java.util.Calendar getCreated()
Get the time of creation.- Returns:
- the "created" time
-
getExpires
public java.util.Calendar getExpires()
Get the time of expiration.- Returns:
- the "expires" time
-
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.
-
setID
public void setID(java.lang.String id)
Set wsu:Id attribute of this timestamp- Parameters:
id-
-
getID
public java.lang.String getID()
Returns the value of the wsu:Id attribute- Returns:
- TODO
-
-