/** {@inheritDoc} */ @Override protected void doNativeParse(@Nonnull final Element element, @Nonnull final ParserContext parserContext, @Nonnull final BeanDefinitionBuilder builder) { if (element.hasAttributeNS(null, MATCH_IF_METADATA_SILENT_ATTR_NAME)) { final String matchIfSilent = StringSupport.trimOrNull(element.getAttributeNS(null, MATCH_IF_METADATA_SILENT_ATTR_NAME)); log.debug("Registration Authority Filter: Match if Metadata silent = {}", matchIfSilent); builder.addPropertyValue("matchIfMetadataSilent", matchIfSilent); } final Attr attr = element.getAttributeNodeNS(null, REGISTRARS_ATTR_NAME); if (attr != null) { final ManagedList<String> issuers = SpringSupport.getAttributeValueAsManagedList(attr); log.debug("Registration Authority Filter: Issuers = {}", issuers); builder.addPropertyValue("issuers", issuers); } } }
SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); SpringSupport.parseCustomElements(children, context); return null;
/** * Parse list of elements into bean definitions. * * @param elements list of elements to parse * @param parserContext current parsing context * * @return list of bean definitions */ // TODO better javadoc, annotations @Nullable public static ManagedList<BeanDefinition> parseCustomElements( @Nullable @NonnullElements final Collection<Element> elements, @Nonnull final ParserContext parserContext) { if (elements == null) { return null; } final ManagedList<BeanDefinition> definitions = new ManagedList<>(elements.size()); for (final Element e : elements) { if (e != null) { definitions.add(parseCustomElement(e, parserContext)); } } return definitions; }
/** * Get the definition for the {@link org.opensaml.security.x509.PKIXValidationInformationResolver}. This is * constructed from the Trusted names and the Validation Info. * * @param element what to parse * @param parserContext the context to parse inside * @return the definition */ protected BeanDefinition getPKIXValidationInformationResolver(@Nonnull final Element element, @Nonnull final ParserContext parserContext) { final List<Element> validationInfoElements = ElementSupport.getChildElements(element, VALIDATION_INFO); final List<Element> trustedNameElements = ElementSupport.getChildElements(element, TRUSTED_NAMES); final BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(StaticPKIXValidationInformationResolver.class); builder.addConstructorArgValue(SpringSupport.parseCustomElements(validationInfoElements, parserContext)); builder.addConstructorArgValue(SpringSupport.getElementTextContentAsManagedList(trustedNameElements)); return builder.getBeanDefinition(); }
rpBuilder.setFactoryMethod("fromCandidates"); rpBuilder.addConstructorArgValue( SpringSupport.getAttributeValueAsList(config.getAttributeNodeNS(null, "relyingParties"))); builder.addPropertyValue("activationCondition", rpBuilder.getBeanDefinition()); builder.addPropertyValue("dependencies", SpringSupport.parseCustomElements(dependencyElements, parserContext));
/** * Parses the key names from the credential configuration. * * @param keyNameElems the elements to parse * @param builder credential build */ protected void parseKeyNames(final List<Element> keyNameElems, final BeanDefinitionBuilder builder) { if (keyNameElems == null || keyNameElems.isEmpty()) { return; } builder.addPropertyValue("keyNames", SpringSupport.getElementTextContentAsManagedList(keyNameElems)); } }
+ ": attributeNames and child elements are mutually exclusive"); builder.addPropertyValue("attributeNames", SpringSupport.getAttributeValueAsList(attributes)); } else if (allAttributes != null) { if (!attributeElements.isEmpty()) {
parseNativeElement(springBeans, ctx); ctx.refresh(); return ctx.getBeanFactory();
try { appContext = SpringSupport.newContext(getId(), getServiceConfigurations(), factoryPostProcessors, postProcessors, Collections.<ApplicationContextInitializer> emptyList(), getParentContext()); } catch (final FatalBeanException e) {
/** * Parse the <CRL> elements. * * @param childElements the elements containing the CRLs, Must have at least one element. * @param builder the builder */ private void parseCRLs(@Nullable final List<Element> childElements, @Nonnull final BeanDefinitionBuilder builder) { if (null == childElements || childElements.isEmpty()) { return; } builder.addPropertyValue("CRLs", SpringSupport.getElementTextContentAsManagedList(childElements)); } }
rpBuilder.setFactoryMethod("fromCandidates"); rpBuilder .addConstructorArgValue( SpringSupport.getAttributeValueAsList(config.getAttributeNodeNS(null, "relyingParties"))); builder.addPropertyValue("activationCondition", rpBuilder.getBeanDefinition()); } else {
/** {@inheritDoc} */ @Override protected void doParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); final List<Element> credentials = ElementSupport.getChildElements(element, AbstractCredentialParser.CREDENTIAL_ELEMENT_NAME); final BeanDefinitionBuilder resolver = BeanDefinitionBuilder.genericBeanDefinition(StaticCredentialResolver.class); resolver.addConstructorArgValue(SpringSupport.parseCustomElements(credentials, parserContext)); builder.addConstructorArgValue(resolver.getBeanDefinition()); } }
builder.addPropertyValue("nameIDFormatPrecedence", SpringSupport.getAttributeValueAsManagedList(parent .getAttributeNodeNS(null, "nameIDFormatPrecedence")));
/** * Get the list of audiences from the <Audience> sub-elements. * * @param element the element under discussion * @return the list of elements (which are subject to property replacement) */ protected List<String> getAudiences(final Element element) { final List<Element> audienceElems = ElementSupport.getChildElementsByTagNameNS(element, RelyingPartySAMLNamespaceHandler.NAMESPACE, "Audience"); return SpringSupport.getElementTextContentAsManagedList(audienceElems); }
return null; builder.addPropertyValue("tLSTrustEngine", SpringSupport.parseCustomElement(trustEngine, parserContext)); } else if (tlsTrustEngineRef == null) { LOG.error("Internal error: tlsTrustEngineRef or TlsTrustEngine required");
/** * Get the definition for the {@link org.opensaml.security.x509.PKIXTrustEvaluator}. This is purely a * {@link CertPathPKIXTrustEvaluator} constructed with whatever ValidationOptions we provide. * * @param element what to parse * @param parserContext the context to parse inside * @return the definition */ protected BeanDefinition getPKIXTrustEvaluator(@Nonnull final Element element, @Nonnull final ParserContext parserContext) { final BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(CertPathPKIXTrustEvaluator.class); final List<Element> validationOptionsElements = ElementSupport.getChildElements(element, PKIXValidationOptionsParser.ELEMENT_NAME); if (null != validationOptionsElements && !validationOptionsElements.isEmpty()) { builder.addConstructorArgValue(SpringSupport.parseCustomElements(validationOptionsElements, parserContext)); } return builder.getBeanDefinition(); }
SpringSupport.getAttributeValueAsManagedList( configElement.getAttributeNodeNS(null, "acceptStatuses"))); SpringSupport.getAttributeValueAsManagedList( configElement.getAttributeNodeNS(null, "acceptTypes")));
/** * Get the list of proxy audiences from the <ProxyAudience> sub-elements. * * @param element the element under discussion * @return the list of elements (which are subject to property replacement) */ protected List<String> getProxyAudiences(final Element element) { final List<Element> audienceElems = ElementSupport.getChildElementsByTagNameNS(element, RelyingPartySAMLNamespaceHandler.NAMESPACE, "ProxyAudience"); return SpringSupport.getElementTextContentAsManagedList(audienceElems); }
/** {@inheritDoc} */ @Override protected void doNativeParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doNativeParse(element, parserContext, builder); final List<Element> childProviders = ElementSupport.getChildElements(element, MetadataNamespaceHandler.METADATA_ELEMENT_NAME); builder.addPropertyValue("resolvers", SpringSupport.parseCustomElements(childProviders, parserContext)); } }
SpringSupport.getAttributeValueAsManagedList(config.getAttributeNodeNS(null, "retryableErrors")));