Class AbstractMetadataProviderParser
java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.ext.spring.util.AbstractCustomBeanDefinitionParser
net.shibboleth.idp.profile.spring.relyingparty.metadata.AbstractMetadataProviderParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
AbstractDynamicMetadataProviderParser
,AbstractReloadingMetadataProviderParser
,ChainingMetadataProviderParser
,InlineMetadataProviderParser
Parser for the MetadataProviderType in the
urn:mace:shibboleth:2.0:metadata
namespace.
If we are the top most element then we need to summon up a
MetadataProviderContainer
and inject what we would usually create into that.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QName
ChainingMetadataProviderElement name.private final org.slf4j.Logger
Logger.static final QName
MetadataFilter Element name.static final String
Namespace for Metadata.static final String
Namespace for Security.static final QName
RelyingPartyGroup Element name.Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doNativeParse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the element into the provider builder.protected final void
doParse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) protected final Class<?>
getBeanClass
(Element element) protected abstract Class<? extends MetadataResolver>
getNativeBeanClass
(Element element) Return the real class implement by this type.private boolean
isChaining
(Element element) Is this a chaining resolver?private boolean
isPresentNotChaining
(Element element, String attribute) Handle attributes which are inappropriate for specific implementations.private boolean
Is this the element at the top of the file? Yes, if it has no parent.private void
processPredicateOptions
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Process predicate-related options.Methods inherited from class net.shibboleth.ext.spring.util.AbstractCustomBeanDefinitionParser
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
-
Field Details
-
SECURITY_NAMESPACE
Namespace for Security.- See Also:
-
METADATA_NAMESPACE
Namespace for Metadata.- See Also:
-
METADATA_FILTER_ELEMENT_NAME
MetadataFilter Element name. -
CHAINING_PROVIDER_ELEMENT_NAME
ChainingMetadataProviderElement name. -
TRUST_ENGINE_ELEMENT_NAME
RelyingPartyGroup Element name. -
log
@Nonnull private final org.slf4j.Logger logLogger.
-
-
Constructor Details
-
AbstractMetadataProviderParser
public AbstractMetadataProviderParser()
-
-
Method Details
-
isPresentNotChaining
Handle attributes which are inappropriate for specific implementations. The chaining metadata provider cannot have "requireValidMetadata" or "failFastInitialization" set, even though they are present in the schema.This method detects whether these elements are present and if the element is not a chaining provider returns true, otherwise it returns false and emits a warning.
- Parameters:
element
- the elementattribute
- the attribute- Returns:
- true iff this is not a chaining resolver and the attribute is present
-
isChaining
Is this a chaining resolver?- Parameters:
element
- root element of resolver- Returns:
- whether the type is Chaining
-
isTopMost
Is this the element at the top of the file? Yes, if it has no parent. In this situation we need to wrap the element in aMetadataProviderContainer
.- Parameters:
element
- the element.- Returns:
- whether it is the outmost element.
-
getNativeBeanClass
Return the real class implement by this type. This has the same function as the more usualAbstractSingleBeanDefinitionParser.getBeanClass(Element)
but it may need to be shimmed inAbstractMetadataProviderParser
which may need to insert an extra bean.- Parameters:
element
- theElement
that is being parsed- Returns:
- the
Class
of the bean that is being defined via parsing the suppliedElement
, ornull
if none - See Also:
-
getBeanClass
- Overrides:
getBeanClass
in classAbstractSingleBeanDefinitionParser
-
doParse
protected final void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) - Overrides:
doParse
in classAbstractSingleBeanDefinitionParser
-
doNativeParse
protected void doNativeParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the element into the provider builder. This has the same function as the more usualAbstractSingleBeanDefinitionParser.doParse(Element, ParserContext, BeanDefinitionBuilder)
but it may need to be shimmed in this class which may need to insert an extra bean.- Parameters:
element
- the XML element being parsedparserContext
- the object encapsulating the current state of the parsing processbuilder
- used to define theBeanDefinition
- See Also:
-
processPredicateOptions
private void processPredicateOptions(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Process predicate-related options.- Parameters:
element
- the current element being processedparserContext
- the current parser contextbuilder
- the current bean definition builder
-