FileDocCategorySizeDatePackage
SignedElements.javaAPI DocExample5374Tue May 29 16:56:48 BST 2007com.sun.xml.ws.security.impl.policy

SignedElements

public class SignedElements extends com.sun.xml.ws.policy.PolicyAssertion implements com.sun.xml.ws.security.policy.SecurityAssertionValidator, com.sun.xml.ws.security.policy.SignedElements
author
K.Venugopal@sun.com

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

           
      
    
public SignedElements(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()

        populate();
        return xpathVersion;
    
private synchronized AssertionFitnesspopulate(boolean isServer)

        if ( !populated ) {
            this.xpathVersion = this.getAttributeValue(XPathVersion);
            
            if ( this.hasNestedAssertions() ) {
                
                Iterator <PolicyAssertion> it = this.getNestedAssertionsIterator();
                while( it.hasNext() ) {
                    PolicyAssertion assertion = (PolicyAssertion) it.next();
                    if ( PolicyUtil.isXPath(assertion )) {
                        addTarget(assertion.getValue());
                    }else{
                        if(!assertion.isOptional()){
                            log_invalid_assertion(assertion, isServer,SignedElements);
                            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);