Package net.shibboleth.spring.metadata

# Class DynamicHTTPMetadataProviderParser

java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
net.shibboleth.spring.metadata.AbstractMetadataProviderParser
net.shibboleth.spring.metadata.AbstractDynamicMetadataProviderParser
net.shibboleth.spring.metadata.AbstractDynamicHTTPMetadataProviderParser
net.shibboleth.spring.metadata.DynamicHTTPMetadataProviderParser

All Implemented Interfaces:
  `BeanDefinitionParser`

public class DynamicHTTPMetadataProviderParser extends AbstractDynamicHTTPMetadataProviderParser
Parser for concrete dynamic HTTP metadata resolvers, based on `FunctionDrivenDynamicHTTPMetadataResolver`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private static final String`
`DEFAULT_VELOCITY_ENGINE_REF`
Name of default VelocityEngine bean to use.
`static final QName`
`ELEMENT_NAME`
Element name.
`private static final QName`
`METADATA_QUERY_PROTOCOL`
MetadataQueryProtocol child element name.
`private static final QName`
`REGEX`
Regex child element name.
`private static final QName`
`TEMPLATE`
Template child element name.

### Fields inherited from class net.shibboleth.spring.metadata.AbstractMetadataProviderParser

`CHAINING_PROVIDER_ELEMENT_NAME, METADATA_FILTER_ELEMENT_NAME, METADATA_NAMESPACE, SECURITY_NAMESPACE, TRUST_ENGINE_ELEMENT_NAME`

### Fields inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`CUSTOM_PARSER_PROPERTIES_LOCATION`

### Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`ID_ATTRIBUTE, NAME_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`DynamicHTTPMetadataProviderParser()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doNativeParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)`
Parse the element into the provider builder.
`protected Class<? extends MetadataResolver>`
`getNativeBeanClass(Element element)`
Return the real class implement by this type.
`protected BeanDefinition`
`getRequestURLBuilder(Element element, BeanDefinitionBuilder parentBuilder)`
Build and return an instance of the `Function` used as the request URL builder.
`private String`
`parseTemplateEncodingStyle(Element template)`
Parse the 'encodingStyle' attributes for Template element types.

### Methods inherited from class net.shibboleth.spring.metadata.AbstractDynamicMetadataProviderParser

`getParserPoolRef, getTaskTimerRef, processPersistentCachingProperties, processTimingProperties`

### Methods inherited from class net.shibboleth.spring.metadata.AbstractMetadataProviderParser

`doParse, getBeanClass`

### Methods inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser

`getCustomProperty, registerBeanDefinition`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

`doParse, getBeanClassName, getParentName, parseInternal`

### Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser

`parse, postProcessComponentDefinition, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ELEMENT_NAME

@Nonnull public static final QName ELEMENT_NAME
Element name.

### TEMPLATE

@Nonnull private static final QName TEMPLATE
Template child element name.

### REGEX

@Nonnull private static final QName REGEX
Regex child element name.

### METADATA_QUERY_PROTOCOL

@Nonnull private static final QName METADATA_QUERY_PROTOCOL
MetadataQueryProtocol child element name.

### DEFAULT_VELOCITY_ENGINE_REF

@Nonnull @NotEmpty private static final String DEFAULT_VELOCITY_ENGINE_REF
Name of default VelocityEngine bean to use.

See Also:
  - Constant Field Values

## Constructor Details

### DynamicHTTPMetadataProviderParser

public DynamicHTTPMetadataProviderParser()

## Method Details

### getNativeBeanClass

@Nonnull protected Class<? extends MetadataResolver> getNativeBeanClass(@Nonnull Element element)
Return the real class implement by this type. This has the same function as the more usual `AbstractSingleBeanDefinitionParser.getBeanClass(Element)` but it may need to be shimmed in `AbstractMetadataProviderParser` which may need to insert an extra bean.

Specified by:
  `getNativeBeanClass` in class `AbstractMetadataProviderParser`
Parameters:
  `element` - the `Element` that is being parsed
Returns:
  the `Class` of the bean that is being defined via parsing the supplied `Element`, or `null` if none
See Also:
  - `AbstractSingleBeanDefinitionParser.getBeanClassName(org.w3c.dom.Element)`

### doNativeParse

protected void doNativeParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)
Parse the element into the provider builder. This has the same function as the more usual `AbstractSingleBeanDefinitionParser.doParse(Element, ParserContext, BeanDefinitionBuilder)` but it may need to be shimmed in this class which may need to insert an extra bean. We assume that we will be summoning up a class which extends an `AbstractDynamicMetadataResolver`.

Overrides:
  `doNativeParse` in class `AbstractDynamicHTTPMetadataProviderParser`
Parameters:
  `element` - the XML element being parsed
  `parserContext` - the object encapsulating the current state of the parsing process
  `builder` - used to define the `BeanDefinition`
See Also:
  - `AbstractSingleBeanDefinitionParser.doParse(Element, BeanDefinitionBuilder)`

### getRequestURLBuilder

@Nonnull protected BeanDefinition getRequestURLBuilder(@Nonnull Element element, @Nonnull BeanDefinitionBuilder parentBuilder)
Build and return an instance of the `Function` used as the request URL builder.

Parameters:
  `element` - the parent metadata provider element
  `parentBuilder` - metadata provider element's bean builder
Returns:
  the function

### parseTemplateEncodingStyle

@Nonnull private String parseTemplateEncodingStyle(@Nonnull Element template)
Parse the 'encodingStyle' attributes for Template element types.

Parameters:
  `template` - the Template element
Returns:
  the encoding style as a string