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

EncryptionImpl

public class EncryptionImpl extends com.sun.xml.ws.security.trust.impl.bindings.EncryptionType implements com.sun.xml.ws.security.trust.elements.Encryption
author
Manveen Kaur

Fields Summary
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 EncryptionImpl(com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference str)

    
       
        setSecurityTokenReference(str);
        setTargetType(WSTrustConstants.STR_TYPE);
    
public EncryptionImpl(com.sun.xml.ws.security.Token token)

        setToken(token);
        setTargetType(WSTrustConstants.TOKEN_TYPE);
    
public EncryptionImpl(com.sun.xml.ws.security.trust.impl.bindings.EncryptionType encType)

        final JAXBElement obj = (JAXBElement)encType.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.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 final voidsetTargetType(java.lang.String ttype)

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

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