FileDocCategorySizeDatePackage
EncodingPolicyValidator.javaAPI DocExample4038Tue May 29 16:56:32 BST 2007com.sun.xml.ws.encoding.policy

EncodingPolicyValidator

public class EncodingPolicyValidator extends Object implements com.sun.xml.ws.policy.spi.PolicyAssertionValidator
author
Jakub Podlesak (jakub.podlesak at sun.com)

Fields Summary
private static final ArrayList
serverSideSupportedAssertions
private static final ArrayList
clientSideSupportedAssertions
Constructors Summary
public EncodingPolicyValidator()
Creates a new instance of EncodingPolicyValidator

    
     
        serverSideSupportedAssertions.add(OPTIMIZED_MIME_SERIALIZATION_ASSERTION);
        serverSideSupportedAssertions.add(UTF816FFFE_CHARACTER_ENCODING_ASSERTION);
        serverSideSupportedAssertions.add(OPTIMIZED_FI_SERIALIZATION_ASSERTION);
        
        clientSideSupportedAssertions.add(SELECT_OPTIMAL_ENCODING_ASSERTION);
        clientSideSupportedAssertions.addAll(serverSideSupportedAssertions);
    
    
Methods Summary
public java.lang.String[]declareSupportedDomains()

        return new String[] {OPTIMIZED_MIME_NS, ENCODING_NS, SUN_ENCODING_CLIENT_NS, SUN_FI_SERVICE_NS};
    
public com.sun.xml.ws.policy.spi.PolicyAssertionValidator.FitnessvalidateClientSide(com.sun.xml.ws.policy.PolicyAssertion assertion)

        return clientSideSupportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
    
public com.sun.xml.ws.policy.spi.PolicyAssertionValidator.FitnessvalidateServerSide(com.sun.xml.ws.policy.PolicyAssertion assertion)

        QName assertionName = assertion.getName();
        if (serverSideSupportedAssertions.contains(assertionName)) {
            return Fitness.SUPPORTED;
        } else if (clientSideSupportedAssertions.contains(assertionName)) {
            return Fitness.UNSUPPORTED;
        } else {
            return Fitness.UNKNOWN;
        }