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

java.lang.Object
  extended by org.apache.ws.security.message.token.SecurityContextToken

public class SecurityContextToken
extends Object

Version:
1.0
Author:
Ruchith Fernando

Field Summary
protected  Element element
          Security context token element
protected  Element elementIdentifier
          Identifier element
 
Constructor Summary
SecurityContextToken(Document doc)
          Constructor to create the SCT
SecurityContextToken(Document doc, String uuid)
          Constructor to create the SCT with a given uuid
SecurityContextToken(Element elem)
          This is used to create a SecurityContextToken using a DOM Element
SecurityContextToken(int version, Document doc)
          Constructor to create the SCT
SecurityContextToken(int version, Document doc, String uuid)
          Constructor to create the SCT with a given uuid
 
Method Summary
 void addWSUNamespace()
          Add the WSU Namespace to this SCT.
 boolean equals(Object object)
           
 Element getElement()
          Returns the dom element of this SecurityContextToken object.
 String getID()
          Gets the id.
 String getIdentifier()
          Get the identifier.
 String getTokenType()
          Get the WS-Trust tokenType String associated with this token
 int hashCode()
           
 void setElement(Element elem)
           
 void setID(String id)
          Set the id of this security context token.
 void setIdentifier(String uuid)
          Set the identifier.
 String toString()
          Returns the string representation of the token.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

element

protected Element element
Security context token element


elementIdentifier

protected Element elementIdentifier
Identifier element

Constructor Detail

SecurityContextToken

public SecurityContextToken(Document doc)
                     throws ConversationException
Constructor to create the SCT

Parameters:
doc -
Throws:
ConversationException

SecurityContextToken

public SecurityContextToken(Document doc,
                            String uuid)
                     throws ConversationException
Constructor to create the SCT with a given uuid

Parameters:
doc -
Throws:
ConversationException

SecurityContextToken

public SecurityContextToken(int version,
                            Document doc)
                     throws ConversationException
Constructor to create the SCT

Parameters:
doc -
Throws:
ConversationException

SecurityContextToken

public SecurityContextToken(int version,
                            Document doc,
                            String uuid)
                     throws ConversationException
Constructor to create the SCT with a given uuid

Parameters:
doc -
Throws:
ConversationException

SecurityContextToken

public SecurityContextToken(Element elem)
                     throws WSSecurityException
This is used to create a SecurityContextToken using a DOM Element

Parameters:
elem - The DOM element: The security context token
Throws:
WSSecurityException - If the element passed in in not a security context token
Method Detail

addWSUNamespace

public void addWSUNamespace()
Add the WSU Namespace to this SCT. The namespace is not added by default for efficiency purposes.


setIdentifier

public void setIdentifier(String uuid)
Set the identifier.


getIdentifier

public String getIdentifier()
Get the identifier.

Returns:
the data from the identifier element.

getTokenType

public String getTokenType()
Get the WS-Trust tokenType String associated with this token


setElement

public void setElement(Element elem)

getElement

public Element getElement()
Returns the dom element of this SecurityContextToken object.

Returns:
the wsse:SecurityContextToken element

toString

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

Overrides:
toString in class Object
Returns:
a XML string representation

getID

public String getID()
Gets the id.

Returns:
the value of the wsu:Id attribute of this SecurityContextToken

setID

public void setID(String id)
Set the id of this security context token.

Parameters:
id - the value for the wsu:Id attribute of this SecurityContextToken

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.