/** {@inheritDoc} */ public void marshallAttributes(XMLObject samlObject, Element domElement) { IndexedEndpoint iEndpoint = (IndexedEndpoint) samlObject; if (iEndpoint.getIndex() != null) { domElement.setAttributeNS(null, IndexedEndpoint.INDEX_ATTRIB_NAME, iEndpoint.getIndex().toString()); } if (iEndpoint.isDefaultXSBoolean() != null) { domElement.setAttributeNS(null, IndexedEndpoint.IS_DEFAULT_ATTRIB_NAME, iEndpoint.isDefaultXSBoolean() .toString()); } super.marshallAttributes(samlObject, domElement); } }
&& ((IndexedEndpoint) comparisonEndpoint).getIndex() != null) { if (!(endpoint instanceof IndexedEndpoint)) { log.debug("{} Candidate endpoint was not indexed, so did not match", getLogPrefix()); return false; } else if (!Objects.equals(((IndexedEndpoint) comparisonEndpoint).getIndex(), ((IndexedEndpoint) endpoint).getIndex())) { log.debug("{} Candidate endpoint index {} did not match {}", getLogPrefix(), ((IndexedEndpoint) endpoint).getIndex(), ((IndexedEndpoint) comparisonEndpoint).getIndex()); return false;
protected List<Endpoint> getEndpoints( List<? extends org.opensaml.saml.saml2.metadata.Endpoint> services ) { List<Endpoint> result = new LinkedList<>(); if (services != null) { services .stream() .forEach(s -> { Endpoint endpoint = new Endpoint() .setBinding(Binding.fromUrn(s.getBinding())) .setLocation(s.getLocation()) .setResponseLocation(s.getResponseLocation()); result.add(endpoint); if (s instanceof IndexedEndpoint) { IndexedEndpoint idxEndpoint = (IndexedEndpoint) s; endpoint .setIndex(idxEndpoint.getIndex()) .setDefault(idxEndpoint.isDefault()); } } ); } return result; }