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

CancelTargetImpl

public class CancelTargetImpl extends com.sun.xml.ws.security.trust.impl.bindings.CancelTargetType implements com.sun.xml.ws.security.trust.elements.CancelTarget
Defines Binding for requesting security tokens to be cancelled.
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 CancelTargetImpl(com.sun.xml.ws.security.trust.elements.str.SecurityTokenReference str)

        
       
        setSecurityTokenReference(str);
        setTargetType(CancelTarget.STR_TARGET_TYPE);
    
public CancelTargetImpl(com.sun.xml.ws.security.Token token)

        setToken(token);
        setTargetType(CancelTarget.CUSTOM_TARGET_TYPE);
    
public CancelTargetImpl(com.sun.xml.ws.security.trust.impl.bindings.CancelTargetType ctType)

        final JAXBElement obj = (JAXBElement)ctType.getAny();
        final String local = obj.getName().getLocalPart();
        if ("SecurityTokenReference".equals(local)) {
            final SecurityTokenReference str = 
                        new SecurityTokenReferenceImpl((SecurityTokenReferenceType)obj.getValue());
            setSecurityTokenReference(str);
            setTargetType(CancelTarget.STR_TARGET_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(CancelTarget.STR_TARGET_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(CancelTarget.CUSTOM_TARGET_TYPE);                
        str = null;