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


Field Summary
protected  RequestType requestTypeElement
           
static 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(String requestType)
           
 
Method Summary
 void addAttribute(String attribute, 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
 String getAttributeValue(QName attribute)
          This is to be used to retrieve the value of the custom attrbutes added to the wst:RequestSecyrityToken
 String getContextAttrValue()
           
 OMElement getRequestElement()
           
 String getRequestType()
          Returns the request type if it is set
protected  QName getToken()
           
 OMElement getToken(QName tokenQName)
          Returns the requested token if available
 String getTokenType()
          Returns the token type is set
protected abstract  void handleSpecificChildren(OMElement element)
           
 void setContextAttr(String contextAttrValue)
          /wst:RequestSecurityToken/@Context This URI specifies an identifier/context for this request.
 void setRequestType(String requestType)
          Sets the wst:RequestType value of this wst:RequestSecurityToken
 void setTokenType(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 QName TOKEN
Constructor Detail

RequestSecurityToken

public RequestSecurityToken(String requestType)

RequestSecurityToken

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

getToken

protected QName getToken()
Specified by:
getToken in class AbstractToken

setRequestType

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

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

getRequestType

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

Returns:
Returns String.

setTokenType

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

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

getTokenType

public String getTokenType()
Returns the token type is set

Returns:
Returns String.

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(QName tokenQName)
Returns the requested token if available

Parameters:
tokenQName -
Returns:
Returns OMElement.

setContextAttr

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

Parameters:
contextAttrValue -

getContextAttrValue

public String getContextAttrValue()

addAttribute

public void addAttribute(String attribute,
                         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 String getAttributeValue(QName attribute)
This is to be used to retrieve the value of the custom attrbutes added to the wst:RequestSecyrityToken

Parameters:
attribute -
Returns:
Returns String.

getRequestElement

public OMElement getRequestElement()

handleSpecificChildren

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