FileDocCategorySizeDatePackage
GenericToken.javaAPI DocExample4314Tue May 29 16:56:54 BST 2007com.sun.xml.ws.security.trust

GenericToken

public class GenericToken extends Object implements com.sun.xml.ws.security.Token
author
Jiandong Guo

Fields Summary
private static final Logger
log
private Element
token
private String
tokenType
private com.sun.xml.ws.security.opt.api.SecurityHeaderElement
she
private String
id
Constructors Summary
public GenericToken(Element token)
Creates a new instance of GenericToken

    
           
       
        this.token = token;
        id = token.getAttributeNS(null,"AssertionID");
        if(id == null || id.length() ==0){
            id = token.getAttributeNS(null,"ID");
        }
        if(id == null || id.length() ==0){
            id = token.getAttributeNS(null,"Id");
        }
        if(id == null || id.length() == 0){
            id = UUID.randomUUID().toString();
        }
    
public GenericToken(Element token, String tokenType)

        this(token);
        
        this.tokenType = tokenType;
    
public GenericToken(com.sun.xml.ws.security.opt.api.SecurityHeaderElement headerElement)

        this.she = headerElement;
    
Methods Summary
public com.sun.xml.ws.security.opt.api.SecurityHeaderElementgetElement()

        return this.she;
    
public java.lang.StringgetId()

        return id;
    
public java.lang.ObjectgetTokenValue()

        return this.token;
    
public java.lang.StringgetType()

        if (tokenType != null) {
            if(log.isLoggable(Level.FINE)) {
                log.log(Level.FINE,
                       LogStringsMessages.WST_1001_TOKEN_TYPE(tokenType)); 
            }
            return tokenType;
        }
        return WSTrustConstants.OPAQUE_TYPE;
    
public voidsetId(java.lang.String id)

        this.id = id;