Java Code Examples for com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness#SUPPORTED

The following examples show how to use com.sun.xml.internal.ws.policy.spi.PolicyAssertionValidator.Fitness#SUPPORTED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultPolicyResolver.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks if the PolicyMap has only single alternative in the scope.
 *
 * @param policyMap
 *      PolicyMap that needs to be validated.
 */
private void validateServerPolicyMap(PolicyMap policyMap) {
    try {
        final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();

        for (Policy policy : policyMap) {

            // TODO:  here is a good place to check if the actual policy has only one alternative...

            for (AssertionSet assertionSet : policy) {
                for (PolicyAssertion assertion : assertionSet) {
                    Fitness validationResult = validationProcessor.validateServerSide(assertion);
                    if (validationResult != Fitness.SUPPORTED) {
                        throw new PolicyException(PolicyMessages.WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
                                assertion.getName(),
                                validationResult));
                    }
                }
            }
        }
    } catch (PolicyException e) {
        throw new WebServiceException(e);
    }
}
 
Example 2
Source File: DefaultPolicyResolver.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks if the PolicyMap has only single alternative in the scope.
 *
 * @param policyMap
 *      PolicyMap that needs to be validated.
 */
private void validateServerPolicyMap(PolicyMap policyMap) {
    try {
        final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();

        for (Policy policy : policyMap) {

            // TODO:  here is a good place to check if the actual policy has only one alternative...

            for (AssertionSet assertionSet : policy) {
                for (PolicyAssertion assertion : assertionSet) {
                    Fitness validationResult = validationProcessor.validateServerSide(assertion);
                    if (validationResult != Fitness.SUPPORTED) {
                        throw new PolicyException(PolicyMessages.WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
                                assertion.getName(),
                                validationResult));
                    }
                }
            }
        }
    } catch (PolicyException e) {
        throw new WebServiceException(e);
    }
}
 
Example 3
Source File: DefaultPolicyResolver.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks if the PolicyMap has only single alternative in the scope.
 *
 * @param policyMap
 *      PolicyMap that needs to be validated.
 */
private void validateServerPolicyMap(PolicyMap policyMap) {
    try {
        final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();

        for (Policy policy : policyMap) {

            // TODO:  here is a good place to check if the actual policy has only one alternative...

            for (AssertionSet assertionSet : policy) {
                for (PolicyAssertion assertion : assertionSet) {
                    Fitness validationResult = validationProcessor.validateServerSide(assertion);
                    if (validationResult != Fitness.SUPPORTED) {
                        throw new PolicyException(PolicyMessages.WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
                                assertion.getName(),
                                validationResult));
                    }
                }
            }
        }
    } catch (PolicyException e) {
        throw new WebServiceException(e);
    }
}
 
Example 4
Source File: DefaultPolicyResolver.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Checks if the PolicyMap has only single alternative in the scope.
 *
 * @param policyMap
 *      PolicyMap that needs to be validated.
 */
private void validateServerPolicyMap(PolicyMap policyMap) {
    try {
        final ValidationProcessor validationProcessor = ValidationProcessor.getInstance();

        for (Policy policy : policyMap) {

            // TODO:  here is a good place to check if the actual policy has only one alternative...

            for (AssertionSet assertionSet : policy) {
                for (PolicyAssertion assertion : assertionSet) {
                    Fitness validationResult = validationProcessor.validateServerSide(assertion);
                    if (validationResult != Fitness.SUPPORTED) {
                        throw new PolicyException(PolicyMessages.WSP_1015_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
                                assertion.getName(),
                                validationResult));
                    }
                }
            }
        }
    } catch (PolicyException e) {
        throw new WebServiceException(e);
    }
}
 
Example 5
Source File: EncodingPolicyValidator.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(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;
    }
}
 
Example 6
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 7
Source File: ManagementPolicyValidator.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 8
Source File: ManagementPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 9
Source File: EncodingPolicyValidator.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(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;
    }
}
 
Example 10
Source File: ManagementPolicyValidator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 11
Source File: ManagementPolicyValidator.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 12
Source File: ManagementPolicyValidator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 13
Source File: EncodingPolicyValidator.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(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;
    }
}
 
Example 14
Source File: ManagementPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 15
Source File: ManagementPolicyValidator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 16
Source File: ManagementPolicyValidator.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    final QName assertionName = assertion.getName();
    if (ManagedClientAssertion.MANAGED_CLIENT_QNAME.equals(assertionName)) {
        return Fitness.SUPPORTED;
    }
    else if (ManagedServiceAssertion.MANAGED_SERVICE_QNAME.equals(assertionName)) {
        return Fitness.UNSUPPORTED;
    }
    else {
        return Fitness.UNKNOWN;
    }
}
 
Example 17
Source File: EncodingPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Fitness validateServerSide(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;
    }
}
 
Example 18
Source File: EncodingPolicyValidator.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    return clientSideSupportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
}
 
Example 19
Source File: EncodingPolicyValidator.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    return clientSideSupportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
}
 
Example 20
Source File: EncodingPolicyValidator.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Fitness validateClientSide(PolicyAssertion assertion) {
    return clientSideSupportedAssertions.contains(assertion.getName()) ? Fitness.SUPPORTED : Fitness.UNKNOWN;
}