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

Layout

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

Fields Summary
com.sun.xml.ws.security.policy.MessageLayout
ml
private AssertionFitness
fitness
private boolean
populated
Constructors Summary
public Layout()
Creates a new instance of Layout

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

        super(name,nestedAssertions,nestedAlternative);
    
Methods Summary
public com.sun.xml.ws.security.policy.MessageLayoutgetMessageLayout()

        populate();
        return ml;
    
private voidpopulate()

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

        if(!populated){
            NestedPolicy policy = this.getNestedPolicy();
            AssertionSet assertionSet = policy.getAssertionSet();
            for(PolicyAssertion assertion : assertionSet){
                if(PolicyUtil.isLax(assertion)){
                    ml =  MessageLayout.Lax;
                }else if(PolicyUtil.isLaxTsFirst(assertion)){
                    ml = MessageLayout.LaxTsFirst;
                }else if(PolicyUtil.isLaxTsLast(assertion)){
                    ml = MessageLayout.LaxTsLast;
                }else if(PolicyUtil.isStrict(assertion)){
                    ml= MessageLayout.Strict;
                } else{
                    if(!assertion.isOptional()){
                        log_invalid_assertion(assertion, isServer,Layout);
                        fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
                    }
                }
            }
            populated = true;
        }
        return fitness;
    
public AssertionFitnessvalidate(boolean isServer)

        return populate(isServer);