FileDocCategorySizeDatePackage
UseKeyImpl.javaAPI DocExample5293Tue May 29 16:57:00 BST 2007com.sun.xml.ws.security.trust.impl.elements

UseKeyImpl

public class UseKeyImpl extends com.sun.xml.ws.security.trust.impl.bindings.UseKeyType implements com.sun.xml.ws.security.trust.elements.UseKey
author
Manveen Kaur

Fields Summary
private static final Logger
log
private String
targetType
private com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference
str
private com.sun.xml.ws.security.Token
token
Constructors Summary
public UseKeyImpl(com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference str)

    
       
        setSecurityTokenReference(str);
        setTargetType(WSTrustConstants.STR_TYPE);
    
public UseKeyImpl(com.sun.xml.ws.security.trust.impl.bindings.UseKeyType ukType)

        final JAXBElement obj = (JAXBElement)ukType.getAny();
        final String local = obj.getName().getLocalPart();
        if ("SecurityTokenReference".equals(local)) {
            final SecurityTokenReference str = 
                        new SecurityTokenReferenceImpl((SecurityTokenReferenceType)obj.getValue());
            setSecurityTokenReference(str);
            setTargetType(WSTrustConstants.STR_TYPE);
        } else {
            //ToDo
        } 
    
Methods Summary
public com.sun.xml.ws.security.trust.elements.str.SecurityTokenReferencegetSecurityTokenReference()

        return str;
    
public java.net.URIgetSignatureID()

        return URI.create(getSig());
    
public java.lang.StringgetTargetType()

        return targetType;
    
public com.sun.xml.ws.security.TokengetToken()

        return token;
    
public final voidsetSecurityTokenReference(com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference ref)

        if (ref != null) {
            str = ref;
            final JAXBElement<SecurityTokenReferenceType> strElement=
                    (new com.sun.xml.ws.security.secext10.ObjectFactory()).createSecurityTokenReference((SecurityTokenReferenceType)ref);
            setAny(strElement);
        }
        setTargetType(WSTrustConstants.STR_TYPE);
        token = null;
    
public voidsetSignatureID(java.net.URI sigID)

        setSig(sigID.toString());
    
public final voidsetTargetType(java.lang.String ttype)

        targetType = ttype;
    
public voidsetToken(com.sun.xml.ws.security.Token token)

        if (token != null) {
            this.token = token;
            setAny(token);
        }
        setTargetType(WSTrustConstants.TOKEN_TYPE);
        str = null;