/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { AttributeConsumingService service = (AttributeConsumingService) parentSAMLObject; if (childSAMLObject instanceof ServiceName) { service.getNames().add((ServiceName) childSAMLObject); } else if (childSAMLObject instanceof ServiceDescription) { service.getDescriptions().add((ServiceDescription) childSAMLObject); } else if (childSAMLObject instanceof RequestedAttribute) { service.getRequestAttributes().add((RequestedAttribute) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
/** * look for an <AttributeConsumeService> and if its there look for an appropriate description. * * @param lang - which language to look up * @return null or an appropriate description */ @Nullable protected String getDescriptionFromAttributeConsumingService(final String lang) { if (getRPAttributeConsumingService() == null) { log.trace("No ACS found"); return null; } for (final ServiceDescription desc : getRPAttributeConsumingService().getDescriptions()) { log.trace("Found name in AttributeConsumingService, language=" + desc.getXMLLang()); if (desc.getXMLLang() != null && desc.getXMLLang().equals(lang)) { log.debug("Returning name from AttributeConsumingService " + desc.getValue()); return desc.getValue(); } } log.trace("No description in AttributeConsumingService"); return null; }