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

Trust10

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

Fields Summary
Set
requiredProps
String
version
private boolean
populated
private AssertionFitness
fitness
Constructors Summary
public Trust10()
Creates a new instance of Trust10

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

        super(name,nestedAssertions,nestedAlternative);
    
Methods Summary
public voidaddRequiredProperty(java.lang.String requirement)

        if(requiredProps == null){
            requiredProps = new HashSet<String>();
        }
        requiredProps.add(requirement);
    
public java.util.SetgetRequiredProperties()

        populate();
        return requiredProps;
    
public java.lang.StringgetType()

        return version;
    
private voidpopulate()

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

        if(!populated){
            NestedPolicy policy = this.getNestedPolicy();
            if(policy == null){
                if(logger.getLevel() == Level.FINE){
                    logger.log(Level.FINE,"NestedPolicy is null");
                }
                populated = true;
                return fitness;
            }
            AssertionSet as = policy.getAssertionSet();
            for(PolicyAssertion assertion:as){
                if(PolicyUtil.isSupportClientChallenge(assertion)){
                    addRequiredProperty(Constants.MUST_SUPPORT_CLIENT_CHALLENGE);
                }else if(PolicyUtil.isSupportServerChallenge(assertion)){
                    addRequiredProperty(Constants.MUST_SUPPORT_SERVER_CHALLENGE);
                }else if(PolicyUtil.isRequireClientEntropy(assertion)){
                    addRequiredProperty(Constants.REQUIRE_CLIENT_ENTROPY);
                }else if(PolicyUtil.isRequireServerEntropy(assertion)){
                    addRequiredProperty(Constants.REQUIRE_SERVER_ENTROPY);
                }else if(PolicyUtil.isSupportIssuedTokens(assertion)){
                    addRequiredProperty(Constants.MUST_SUPPORT_ISSUED_TOKENS);
                }else{
                    if(!assertion.isOptional()){
                        log_invalid_assertion(assertion, isServer,"Trust10");
                        fitness = AssertionFitness.HAS_UNKNOWN_ASSERTION;
                    }
                }
            }
            
            populated = true;
        }
        return fitness;
    
public AssertionFitnessvalidate(boolean isServer)

        return populate(isServer);