Package net.shibboleth.spring.metadata

# Class LocalDynamicMetadataProviderParser

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.LocalDynamicMetadataProviderParser

All Implemented Interfaces:
  `BeanDefinitionParser`

public class LocalDynamicMetadataProviderParser extends AbstractDynamicMetadataProviderParser
Parser for `LocalDynamicMetadataResolver`.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final QName`
`ELEMENT_NAME`
Element name.
`private org.slf4j.Logger`
`log`
Logger.

### 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
`LocalDynamicMetadataProviderParser()`

## Method Summary

Modifier and Type
Method
Description
`private BeanDefinition`
`buildFilesystemManagerDefinition(Element element, ParserContext parserContext, boolean isDefaultSourceKeyGenerator)`
Build bean definition for `FilesystemLoadSaveManager` source manager.
`private BeanDefinition`
`checkAndBuildPassthroughIntermediateDirectoryStrategy(Element element, ParserContext parserContext)`
Return bean definition for the default intermediate directory strategy with passthrough source strategy, if segmenting configuration params specified.
`private void`
`checkAndLogSourceDirectoryOverrides(Element element)`
Check and log the options related to 'sourceDirectory' which are being overridden by 'sourceManagerRef'.
`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.
`private void`
`processIntermediateDirectoryStrategy(Element element, ParserContext parserContext, BeanDefinitionBuilder sourceManagerBuilder, boolean isDefaultSourceKeyGenerator)`
Process options related to intermediate directory strategy and apply to the builder for the `FilesystemLoadSaveManager`.

### 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.

### log

@Nonnull private org.slf4j.Logger log
Logger.

## Constructor Details

### LocalDynamicMetadataProviderParser

public LocalDynamicMetadataProviderParser()

## 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 `AbstractDynamicMetadataProviderParser`
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)`

### checkAndLogSourceDirectoryOverrides

private void checkAndLogSourceDirectoryOverrides(@Nonnull Element element)
Check and log the options related to 'sourceDirectory' which are being overridden by 'sourceManagerRef'.

Parameters:
  `element` - the element being parsed

### buildFilesystemManagerDefinition

@Nonnull private BeanDefinition buildFilesystemManagerDefinition(@Nonnull Element element, @Nonnull ParserContext parserContext, boolean isDefaultSourceKeyGenerator)
Build bean definition for `FilesystemLoadSaveManager` source manager.

Parameters:
  `element` - the element being parsed
  `parserContext` - the current parser context
  `isDefaultSourceKeyGenerator` - whether the internal default source key manager is being used
Returns:
  the bean definition for the filesystem source manager

### processIntermediateDirectoryStrategy

private void processIntermediateDirectoryStrategy(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder sourceManagerBuilder, boolean isDefaultSourceKeyGenerator)
Process options related to intermediate directory strategy and apply to the builder for the `FilesystemLoadSaveManager`.

Parameters:
  `element` - the element being parsed
  `parserContext` - the current parser context
  `sourceManagerBuilder` - the source build manager for the FilesystemLoadSaveManager being built
  `isDefaultSourceKeyGenerator` - whether the internal default source key manager is being used

### checkAndBuildPassthroughIntermediateDirectoryStrategy

@Nullable private BeanDefinition checkAndBuildPassthroughIntermediateDirectoryStrategy(@Nonnull Element element, @Nonnull ParserContext parserContext)
Return bean definition for the default intermediate directory strategy with passthrough source strategy, if segmenting configuration params specified.

Parameters:
  `element` - the element being parsed
  `parserContext` - the current parser context
Returns:
  the strategy bean definition, or null if not configured