/** * Checks that an AffiliationDescriptor OR one or more RoleDescriptors are present. * * @param entityDescriptor * @throws ValidationException */ protected void validateDescriptors(EntityDescriptor entityDescriptor) throws ValidationException { if ((entityDescriptor.getRoleDescriptors() == null || entityDescriptor.getRoleDescriptors().size() < 1) && entityDescriptor.getAffiliationDescriptor() == null) { throw new ValidationException("Must have an AffiliationDescriptor or one or more RoleDescriptors."); } if (entityDescriptor.getAffiliationDescriptor() != null && entityDescriptor.getRoleDescriptors() != null && entityDescriptor.getRoleDescriptors().size() > 0) { throw new ValidationException("Cannot have an AffiliationDescriptor AND RoleDescriptors"); } } }
if (entityDescriptor.getAffiliationDescriptor() != null) { AffiliationDescriptor affiliationDescriptor = entityDescriptor.getAffiliationDescriptor(); if (!affiliationDescriptor.isSigned()) { log.trace("AffiliationDescriptor member was not signed, skipping signature processing...");