/** * Checks that Response Location of Artifact Resolution Services is omitted. * * @param ssoDescriptor * @throws ValidationException */ protected void validateResponseLocation(SSODescriptor ssoDescriptor) throws ValidationException { if (ssoDescriptor.getArtifactResolutionServices() != null && ssoDescriptor.getArtifactResolutionServices().size() > 0) { for (int i = 0; i < ssoDescriptor.getArtifactResolutionServices().size(); i++) { if (!DatatypeHelper.isEmpty(ssoDescriptor.getArtifactResolutionServices().get(i).getResponseLocation())) { throw new ValidationException("ResponseLocation of all ArtificatResolutionServices must be null"); } } } } }
/** {@inheritDoc} */ protected void processChildElement(XMLObject parentElement, XMLObject childElement) throws UnmarshallingException { SSODescriptor descriptor = (SSODescriptor) parentElement; if (childElement instanceof ArtifactResolutionService) { descriptor.getArtifactResolutionServices().add((ArtifactResolutionService) childElement); } else if (childElement instanceof SingleLogoutService) { descriptor.getSingleLogoutServices().add((SingleLogoutService) childElement); } else if (childElement instanceof ManageNameIDService) { descriptor.getManageNameIDServices().add((ManageNameIDService) childElement); } else if (childElement instanceof NameIDFormat) { descriptor.getNameIDFormats().add((NameIDFormat) childElement); } else { super.processChildElement(parentElement, childElement); } } }