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

EncryptedParts

public class EncryptedParts extends com.sun.xml.ws.policy.PolicyAssertion implements com.sun.xml.ws.security.policy.SecurityAssertionValidator, com.sun.xml.ws.security.policy.EncryptedParts
author
K.Venugopal@sun.com Abhijit.Das@Sun.com

Fields Summary
private boolean
_body
private List
header
private boolean
populated
private AssertionFitness
fitness
Constructors Summary
public EncryptedParts()
Creates a new instance of EncryptedPartImpl

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

        super(name,nestedAssertions,nestedAlternative);
    
Methods Summary
public voidaddBody()

        this._body = true;
    
public voidaddTarget(javax.xml.namespace.QName targetName)

        throw new UnsupportedOperationException();
    
public java.util.IteratorgetTargets()

        populate();
        if(header == null){
            return Collections.emptyList().iterator();
        }
        return header.iterator();
    
public booleanhasBody()

        populate();
        return this._body;
    
private voidpopulate()

        populate(false);
    
private synchronized AssertionFitnesspopulate(boolean isServer)

        if(!populated){
            if ( this.hasNestedAssertions() ) {
                
                Iterator <PolicyAssertion> it = this.getNestedAssertionsIterator();
                while( it.hasNext() ) {
                    PolicyAssertion assertion = it.next();
                    if ( PolicyUtil.isBody(assertion)) {
                        this._body = true;
                    } else {
                        if(header == null){
                            header = new ArrayList<Header>();
                        }
                        if(PolicyUtil.isHeader(assertion)){
                            this.header.add((Header)assertion);
                        }else{
                            if(!assertion.isOptional()){
                                log_invalid_assertion(assertion, isServer,EncryptedParts);
                                fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
                            }
                        }
                    }
                }
            }
            populated = true;
        }
        return fitness;
    
public voidremoveBody()

        throw new UnsupportedOperationException();
    
public voidremoveTarget(javax.xml.namespace.QName targetName)

        throw new UnsupportedOperationException();
    
public AssertionFitnessvalidate(boolean isServer)

        return populate(isServer);