FileDocCategorySizeDatePackage
EncryptionTargetCreator.javaAPI DocExample4624Tue May 29 16:56:48 BST 2007com.sun.xml.ws.security.impl.policyconv

EncryptionTargetCreator

public class EncryptionTargetCreator extends Object
author
K.Venugopal@sun.com

Fields Summary
public com.sun.xml.ws.security.policy.AlgorithmSuite
algorithmSuite
public boolean
enforce
Constructors Summary
public EncryptionTargetCreator(com.sun.xml.ws.security.policy.AlgorithmSuite algorithmSuite, boolean enforce)
Creates a new instance of EncryptionTargetCreator

           
        
        this.algorithmSuite = algorithmSuite;
        this.enforce = enforce;
    
Methods Summary
public com.sun.xml.wss.impl.policy.mls.EncryptionTargetnewQNameEncryptionTarget(javax.xml.namespace.QName targetValue)

        EncryptionTarget target = new EncryptionTarget();
        target.setEnforce(enforce);
        target.setDataEncryptionAlgorithm(algorithmSuite.getEncryptionAlgorithm());
        target.setType(EncryptionTarget.TARGET_TYPE_VALUE_QNAME);
        target.setQName(targetValue);
        //target.setValue(EncryptionTarget.BODY);
        target.setValue("{"+targetValue.getNamespaceURI()+"}"+targetValue.getLocalPart());
        target.setContentOnly(false);
        if(logger.isLoggable(Level.FINE)){
            logger.log(Level.FINE,"QName Encryption Target with value "+target.getValue()+ " has been added");
        }
        return target;
    
public com.sun.xml.wss.impl.policy.mls.EncryptionTargetnewURIEncryptionTarget(java.lang.String uri)

        EncryptionTarget target = new EncryptionTarget();
        target.setEnforce(enforce);
        target.setDataEncryptionAlgorithm(algorithmSuite.getEncryptionAlgorithm());
        target.setType(EncryptionTarget.TARGET_TYPE_VALUE_URI);
        target.setValue(uri);
        target.setContentOnly(false);
        if(logger.isLoggable(Level.FINE)){
            logger.log(Level.FINE,"URI Encryption Target with value "+target.getValue()+ " has been added");
        }
        return target;
    
public com.sun.xml.wss.impl.policy.mls.EncryptionTargetnewXpathEncryptionTarget(java.lang.String xpathTarget)

        EncryptionTarget target = new EncryptionTarget();
        target.setType(EncryptionTarget.TARGET_TYPE_VALUE_XPATH);
        target.setValue(xpathTarget);
        target.setEnforce(enforce);
        target.setDataEncryptionAlgorithm(algorithmSuite.getEncryptionAlgorithm());
        target.setContentOnly(false);
        if(logger.isLoggable(Level.FINE)){
            logger.log(Level.FINE,"XPath Encryption Target with value "+target.getValue()+ " has been added");
        }
        return target;