org.apache.axis2.security.trust
Class Token

java.lang.Object
  extended byorg.apache.axis2.security.trust.Token

public class Token
extends Object

This represents a security token which can have either one of 4 states.

Also this holds the OMElements representing the token in its present state and the previous state. These tokens are stired using the storage mechanism provided via the TokenStorage interface.

See Also:
TokenStorage

Field Summary
static int CANCELLED
           
static int EXPIRED
           
static int ISSUED
           
static int RENEWED
           
 
Constructor Summary
Token(String id)
          Create a new token
Token(String id, org.apache.axiom.om.OMElement tokenElem)
           
 
Method Summary
 org.apache.axiom.om.OMElement getAttachedReference()
           
 String getId()
           
 org.apache.axiom.om.OMElement getPresivousToken()
           
 HashMap getProperties()
           
 byte[] getSecret()
           
 int getState()
           
 org.apache.axiom.om.OMElement getToken()
           
 org.apache.axiom.om.OMElement getUnattachedReference()
           
 boolean isChnaged()
           
 void setAttachedReference(org.apache.axiom.om.OMElement attachedReference)
           
 void setChnaged(boolean chnaged)
           
 void setPresivousToken(org.apache.axiom.om.OMElement presivousToken)
           
 void setProperties(HashMap properties)
           
 void setSecret(byte[] secret)
           
 void setState(int state)
           
 void setToken(org.apache.axiom.om.OMElement token)
           
 void setUnattachedReference(org.apache.axiom.om.OMElement unattachedReference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ISSUED

public static final int ISSUED
See Also:
Constant Field Values

EXPIRED

public static final int EXPIRED
See Also:
Constant Field Values

CANCELLED

public static final int CANCELLED
See Also:
Constant Field Values

RENEWED

public static final int RENEWED
See Also:
Constant Field Values
Constructor Detail

Token

public Token(String id)
Create a new token

Parameters:
id -

Token

public Token(String id,
             org.apache.axiom.om.OMElement tokenElem)
Method Detail

isChnaged

public boolean isChnaged()
Returns:
Returns the chnaged.

setChnaged

public void setChnaged(boolean chnaged)
Parameters:
chnaged - The chnaged to set.

getProperties

public HashMap getProperties()
Returns:
Returns the properties.

setProperties

public void setProperties(HashMap properties)
Parameters:
properties - The properties to set.

getState

public int getState()
Returns:
Returns the state.

setState

public void setState(int state)
Parameters:
state - The state to set.

getToken

public org.apache.axiom.om.OMElement getToken()
Returns:
Returns the token.

setToken

public void setToken(org.apache.axiom.om.OMElement token)
Parameters:
token - The token to set.

getId

public String getId()
Returns:
Returns the id.

getPresivousToken

public org.apache.axiom.om.OMElement getPresivousToken()
Returns:
Returns the presivousToken.

setPresivousToken

public void setPresivousToken(org.apache.axiom.om.OMElement presivousToken)
Parameters:
presivousToken - The presivousToken to set.

getSecret

public byte[] getSecret()
Returns:
Returns the secret.

setSecret

public void setSecret(byte[] secret)
Parameters:
secret - The secret to set.

getAttachedReference

public org.apache.axiom.om.OMElement getAttachedReference()
Returns:
Returns the attachedReference.

setAttachedReference

public void setAttachedReference(org.apache.axiom.om.OMElement attachedReference)
Parameters:
attachedReference - The attachedReference to set.

getUnattachedReference

public org.apache.axiom.om.OMElement getUnattachedReference()
Returns:
Returns the unattachedReference.

setUnattachedReference

public void setUnattachedReference(org.apache.axiom.om.OMElement unattachedReference)
Parameters:
unattachedReference - The unattachedReference to set.