FileDocCategorySizeDatePackage
EncryptedElements.javaAPI DocExample5380Tue May 29 16:56:46 BST 2007com.sun.xml.ws.security.impl.policy

EncryptedElements

public class EncryptedElements extends com.sun.xml.ws.policy.PolicyAssertion implements com.sun.xml.ws.security.policy.EncryptedElements, com.sun.xml.ws.security.policy.SecurityAssertionValidator
author
Abhijit Das

Fields Summary
private String
xpathVersion
private ArrayList
targetList
private static List
emptyList
private boolean
populated
private static QName
XPathVersion
private AssertionFitness
fitness
Constructors Summary
public EncryptedElements()
Creates a new instance of EncryptedElements

               
      
    
public EncryptedElements(com.sun.xml.ws.policy.sourcemodel.AssertionData name, Collection nestedAssertions, com.sun.xml.ws.policy.AssertionSet nestedAlternative)

        super(name,nestedAssertions,nestedAlternative);
    
Methods Summary
public voidaddTarget(java.lang.String target)

        if ( targetList == null ) {
            targetList = new ArrayList<String>();
        }
        targetList.add(target);
    
public java.util.IteratorgetTargets()

        populate();
        if ( targetList != null ) {
            return targetList.iterator();
        }
        return emptyList.iterator();
    
public java.lang.StringgetXPathVersion()

        return xpathVersion;
    
private synchronized AssertionFitnesspopulate(boolean isServer)

        if(!populated){
            this.xpathVersion = (String)this.getAttributeValue(XPathVersion);
            if ( this.hasNestedAssertions() ) {
                Iterator <PolicyAssertion> it = this.getNestedAssertionsIterator();
                if ( it.hasNext() ) {
                    PolicyAssertion assertion = it.next();
                    if ( PolicyUtil.isXPath(assertion)) {
                        addTarget(assertion.getValue());
                    } else{
                        if(!assertion.isOptional()){
                            log_invalid_assertion(assertion, isServer,EncryptedElements);
                            fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
                        }
                    }
                }
            }
            populated = true;
        }
        return fitness;
    
private voidpopulate()

        populate(false);
    
public voidremoveTarget(java.lang.String target)

        if ( targetList != null ) {
            targetList.remove(target);
        }
    
public voidsetXPathVersion(java.lang.String version)

        this.xpathVersion = version;
    
public AssertionFitnessvalidate(boolean isServer)

        return populate(isServer);