* @param policyMap
* PolicyMap that needs to be validated.
*/
private static 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(LocalizationMessages.WSP_5017_SERVER_SIDE_ASSERTION_VALIDATION_FAILED(
assertion.getName(),
validationResult));
}