/** * {@inheritDoc} */ protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject) throws UnmarshallingException { Extensions extensions = (Extensions) parentXMLObject; extensions.getUnknownXMLObjects().add(childXMLObject); }
/** * Get the RP {@link UIInfo}, caching the value and consulting if needed. * * @return the value or null if there is none. */ @Nullable protected UIInfo getRPUInfo() { final Extensions exts = spSSODescriptor.getExtensions(); if (exts != null) { for (final XMLObject object : exts.getOrderedChildren()) { if (object instanceof UIInfo) { return (UIInfo) object; } } } return null; }
extensions.getNamespaceManager().registerAttributeName(DigestMethod.TYPE_NAME); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method); extensions.getUnknownXMLObjects().add(method);
extensions.getNamespaceManager().registerAttributeName(RequestInitiator.DEFAULT_ELEMENT_NAME); requestInitiator.setBinding(RequestInitiator.DEFAULT_ELEMENT_NAME.getNamespaceURI()); extensions.getUnknownXMLObjects().add(requestInitiator); spDescriptor.setExtensions(extensions);
/** * Get the list of KeyAuthority's from an EntitiesDescriptor's Extensions. * * @param entitiesDescriptor the entities descriptor to process. * @return list of XMLObjects */ @Nonnull protected List<XMLObject> getKeyAuthorities(@Nonnull final EntitiesDescriptor entitiesDescriptor) { final Extensions extensions = entitiesDescriptor.getExtensions(); if (extensions == null) { return Collections.emptyList(); } final List<XMLObject> keyAuthorities = extensions.getUnknownXMLObjects(KeyAuthority.DEFAULT_ELEMENT_NAME); if (keyAuthorities == null) { return Collections.emptyList(); } else { return keyAuthorities; } }
/** * Retrieves validation information from the resolver extension element. * * @param extensions the extension element from which to resolve information * @param accumulator accumulator of PKIX validation information to return * @throws ResolverException thrown if the key, certificate, or CRL information is represented in an unsupported * format */ protected void resolvePKIXInfo(final Collection<PKIXValidationInformation> accumulator, final Extensions extensions) throws ResolverException { if (extensions == null) { return; } final List<XMLObject> authorities = extensions.getUnknownXMLObjects(KeyAuthority.DEFAULT_ELEMENT_NAME); if (authorities == null || authorities.isEmpty()) { return; } for (final XMLObject xmlObj : authorities) { extractPKIXInfo(accumulator, (KeyAuthority) xmlObj); } } //CheckStyle: ReturnCount ON
Extensions extensions = roleDescriptor.getExtensions(); if (extensions != null) { result = extensions.getUnknownXMLObjects(extensionName); if (!result.isEmpty()) { log.trace("Resolved extensions from RoleDescriptor: {}", extensionName); extensions = ((EntityDescriptor)roleDescriptor.getParent()).getExtensions(); if (extensions != null) { result = extensions.getUnknownXMLObjects(extensionName); if (!result.isEmpty()) { log.trace("Resolved extensions from parent EntityDescriptor: {}", extensionName);
return mdui; val spExtensions = extensions.getUnknownXMLObjects(UIInfo.DEFAULT_ELEMENT_NAME); if (spExtensions.isEmpty()) { LOGGER.trace("No extensions in the SP SSO descriptor are located for [{}]", UIInfo.DEFAULT_ELEMENT_NAME.getNamespaceURI());
for (final XMLObject object : extensions.getUnknownXMLObjects(RegistrationInfo.DEFAULT_ELEMENT_NAME)) { if (object instanceof RegistrationInfo) { return (RegistrationInfo) object; extensions = group.getExtensions(); if (null != extensions) { for (final XMLObject object : extensions.getUnknownXMLObjects(RegistrationInfo.DEFAULT_ELEMENT_NAME)) { if (object instanceof RegistrationInfo) { return (RegistrationInfo) object;
extensions.getUnknownXMLObjects(EntityAttributes.DEFAULT_ELEMENT_NAME); if (entityAttributesCollection.isEmpty()) { entityAttributesCollection.add(entityAttributesBuilder.buildObject());
final List<XMLObject> children = exts.getUnknownXMLObjects(EntityAttributes.DEFAULT_ELEMENT_NAME); if (!children.isEmpty() && children.get(0) instanceof EntityAttributes) { if (entityAttributes == null) { exts = group.getExtensions(); if (exts != null) { final List<XMLObject> children = exts.getUnknownXMLObjects(EntityAttributes.DEFAULT_ELEMENT_NAME); if (!children.isEmpty() && children.get(0) instanceof EntityAttributes) { if (entityAttributes == null) {
extensions.getUnknownXMLObjects(EntityAttributes.DEFAULT_ELEMENT_NAME); if (null == entityAttributesList || entityAttributesList.isEmpty()) { return;
Extensions extensions = roleDescriptor.getExtensions(); if (extensions != null) { List<XMLObject> children = extensions.getUnknownXMLObjects(SourceID.DEFAULT_ELEMENT_NAME); if (children != null && !children.isEmpty()) { QName role = descriptor.getSchemaType() != null ? roleDescriptor.getSchemaType()
init.setLocation(requestInitiation.getLocation()); init.setResponseLocation(requestInitiation.getResponseLocation()); roleDescriptor.getExtensions().getUnknownXMLObjects().add(init); response.setIsDefault(discovery.isDefault()); response.setIndex(discovery.getIndex()); roleDescriptor.getExtensions().getUnknownXMLObjects().add(response);
protected Endpoint getRequestInitiation(RoleDescriptor desc) { if (desc.getExtensions() == null) { return null; } Endpoint result = null; for (XMLObject obj : desc.getExtensions().getUnknownXMLObjects()) { if (obj instanceof RequestInitiator) { RequestInitiator req = (RequestInitiator) obj; result = new Endpoint() .setIndex(0) .setDefault(false) .setBinding(Binding.fromUrn(req.getBinding())) .setLocation(req.getLocation()) .setResponseLocation(req.getResponseLocation()); } } return result; }
protected Endpoint getDiscovery(RoleDescriptor desc) { if (desc.getExtensions() == null) { return null; } Endpoint result = null; for (XMLObject obj : desc.getExtensions().getUnknownXMLObjects()) { if (obj instanceof DiscoveryResponse) { DiscoveryResponse resp = (DiscoveryResponse) obj; result = new Endpoint() .setDefault(resp.isDefault()) .setIndex(resp.getIndex()) .setBinding(Binding.fromUrn(resp.getBinding())) .setLocation(resp.getLocation()) .setResponseLocation(resp.getResponseLocation()); } } return result; }