org.apache.axis2.security.trust.token
Class RequestSecurityToken

java.lang.Object
  extended byorg.apache.axis2.security.trust.token.AbstractToken
      extended byorg.apache.axis2.security.trust.token.CompositeToken
          extended byorg.apache.axis2.security.trust.token.RequestSecurityToken
Direct Known Subclasses:
CancelRequestSecurityToken, IssueRequestSecurityToken

public abstract class RequestSecurityToken
extends CompositeToken

Author:
Ruchith Fernando (ruchith.fernando@gmail.com)

Field Summary
protected  RequestType requestTypeElement
           
static javax.xml.namespace.QName TOKEN
           
protected  TokenType tokenTypeElement
           
 
Fields inherited from class org.apache.axis2.security.trust.token.AbstractToken
factory, tokenElement, wstNamespace
 
Constructor Summary
RequestSecurityToken(OMElement elem)
           
RequestSecurityToken(java.lang.String requestType)
           
 
Method Summary
 void addAttribute(java.lang.String attribute, java.lang.String value, OMNamespace namespace)
          This is provided as an extensibility mechnism to ass any attrbute to the wst:RequestSecyrityToken element
 void addToken(OMElement childToken)
          This is provided as an extensibility mechanism to add any child element to the wst:RequestSecyrityToken element
protected  void deserializeChildElement(OMElement element)
          This is called for each of the immediate child elements of type OMNode.ELEMENT_NODE of this token
 java.lang.String getAttributeValue(javax.xml.namespace.QName attribute)
          This is to be used to retrieve the value of the custom attrbutes added to the wst:RequestSecyrityToken
 java.lang.String getContextAttrValue()
           
 OMElement getRequestElement()
           
 java.lang.String getRequestType()
          Returns the request type if it is set
protected  javax.xml.namespace.QName getToken()
           
 OMElement getToken(javax.xml.namespace.QName tokenQName)
          Returns the requested token if available
 java.lang.String getTokenType()
          Returns the token type is set
protected abstract  void handleSpecificChildren(OMElement element)
           
 void setContextAttr(java.lang.String contextAttrValue)
          /wst:RequestSecurityToken/@Context This URI specifies an identifier/context for this request.
 void setRequestType(java.lang.String requestType)
          Sets the wst:RequestType value of this wst:RequestSecurityToken
 void setTokenType(java.lang.String tokenType)
          Sets the wst:TokenType value of this wst:RequestSecurityToken
 
Methods inherited from class org.apache.axis2.security.trust.token.CompositeToken
setElementTextValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenTypeElement

protected TokenType tokenTypeElement

requestTypeElement

protected RequestType requestTypeElement

TOKEN

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

RequestSecurityToken

public RequestSecurityToken(java.lang.String requestType)

RequestSecurityToken

public RequestSecurityToken(OMElement elem)
                     throws TrustException
Parameters:
elem -
Throws:
TrustException
Method Detail

getToken

protected javax.xml.namespace.QName getToken()
Specified by:
getToken in class AbstractToken

setRequestType

public void setRequestType(java.lang.String requestType)
Sets the wst:RequestType value of this wst:RequestSecurityToken

Parameters:
requestType - The wst:RequestType uri as a String

getRequestType

public java.lang.String getRequestType()
Returns the request type if it is set

Returns:

setTokenType

public void setTokenType(java.lang.String tokenType)
Sets the wst:TokenType value of this wst:RequestSecurityToken

Parameters:
tokenType - The wst:TokenType uri as a String

getTokenType

public java.lang.String getTokenType()
Returns the token type is set

Returns:

deserializeChildElement

protected void deserializeChildElement(OMElement element)
                                throws TrustException
Description copied from class: AbstractToken
This is called for each of the immediate child elements of type OMNode.ELEMENT_NODE of this token

Specified by:
deserializeChildElement in class AbstractToken
Parameters:
element -
Throws:
TrustException

addToken

public void addToken(OMElement childToken)
This is provided as an extensibility mechanism to add any child element to the wst:RequestSecyrityToken element

Parameters:
childToken -

getToken

public OMElement getToken(javax.xml.namespace.QName tokenQName)
Returns the requested token if available

Returns:

setContextAttr

public void setContextAttr(java.lang.String contextAttrValue)
/wst:RequestSecurityToken/@Context This URI specifies an identifier/context for this request.

Parameters:
contextAttrValue -

getContextAttrValue

public java.lang.String getContextAttrValue()

addAttribute

public void addAttribute(java.lang.String attribute,
                         java.lang.String value,
                         OMNamespace namespace)
This is provided as an extensibility mechnism to ass any attrbute to the wst:RequestSecyrityToken element

Parameters:
attribute - Name of the attr
value - Attr value
namespace - Attr namespace

getAttributeValue

public java.lang.String getAttributeValue(javax.xml.namespace.QName attribute)
This is to be used to retrieve the value of the custom attrbutes added to the wst:RequestSecyrityToken

Parameters:
attribute -
Returns:

getRequestElement

public OMElement getRequestElement()

handleSpecificChildren

protected abstract void handleSpecificChildren(OMElement element)
                                        throws TrustException
Parameters:
element - Specific child element
Throws:
TrustException