Package net.shibboleth.spring.metadata.filter

# Class PredicateFilterParser

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.filter.AbstractMetadataFilterParser
net.shibboleth.spring.metadata.filter.PredicateFilterParser

All Implemented Interfaces:
  `BeanDefinitionParser`

public class PredicateFilterParser extends AbstractMetadataFilterParser
Parser for a <Predicate> filter.

## Field Summary

Fields
Modifier and Type
Field
Description
`private final org.slf4j.Logger`
`log`
Class logger.
`private Class<? extends Predicate<?>>`
`mappedPredicateClass`
Stores class of the predicate handling the mapped entity attribute feature.
`static final QName`
`TYPE_NAME`
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
`PredicateFilterParser()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)`
`protected Class<?>`
`getBeanClass(Element element)`
`BeanDefinition`
`parseCustomElements(Element element)`
Parser custom element content into a `Predicate` to pass to the filter constructor.
`BeanDefinitionBuilder`
`parseEntityPredicate(Element element)`
Parse Entity elements into a builder for an `EntityIdPredicate`.
`BeanDefinitionBuilder`
`parseEntityRegexPredicate(Element element)`
Parse EntityRegex elements into a builder for an `EntityRegexPredicate`.
`BeanDefinitionBuilder`
`parseGroupPredicate(Element element)`
Parse Group elements into a builder for an `EntityGroupNamePredicate`.
`BeanDefinitionBuilder`
`parseMappedTagPredicate(Element element)`
Parse MappedTag elements into a builder for the relevant predicate class.
`BeanDefinitionBuilder`
`parseScripts(Element element)`
Parse ConditionScript elements into a builder, wrapped in an OR as necessary.
`BeanDefinitionBuilder`
`parseTagPredicate(Element element)`
Parse Tag elements into a builder for an `EntityAttributesPredicate`.
`protected boolean`
`shouldGenerateId()`

### 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, shouldGenerateIdAsFallback, shouldParseNameAsAliases`

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

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

## Field Details

### TYPE_NAME

@Nonnull public static final QName TYPE_NAME
Element name.

### log

@Nonnull private final org.slf4j.Logger log
Class logger.

### mappedPredicateClass

@Nullable private Class<? extends Predicate<?>> mappedPredicateClass
Stores class of the predicate handling the mapped entity attribute feature.

## Constructor Details

### PredicateFilterParser

public PredicateFilterParser()
Constructor.

## Method Details

### getBeanClass

@Nonnull protected Class<?> getBeanClass(@Nonnull Element element)

Overrides:
  `getBeanClass` in class `AbstractSingleBeanDefinitionParser`

### doParse

protected void doParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder)

Overrides:
  `doParse` in class `AbstractMetadataFilterParser`

### parseCustomElements

@Nonnull public BeanDefinition parseCustomElements(@Nonnull Element element)
Parser custom element content into a `Predicate` to pass to the filter constructor.

Parameters:
  `element` - root element to parse
Returns:
  the bean definition of the Predicate to install

### parseEntityPredicate

@Nullable public BeanDefinitionBuilder parseEntityPredicate(@Nonnull Element element)
Parse Entity elements into a builder for an `EntityIdPredicate`.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### parseEntityRegexPredicate

@Nullable public BeanDefinitionBuilder parseEntityRegexPredicate(@Nonnull Element element)
Parse EntityRegex elements into a builder for an `EntityRegexPredicate`.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### parseGroupPredicate

@Nullable public BeanDefinitionBuilder parseGroupPredicate(@Nonnull Element element)
Parse Group elements into a builder for an `EntityGroupNamePredicate`.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### parseTagPredicate

@Nullable public BeanDefinitionBuilder parseTagPredicate(@Nonnull Element element)
Parse Tag elements into a builder for an `EntityAttributesPredicate`.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### parseMappedTagPredicate

@Nullable public BeanDefinitionBuilder parseMappedTagPredicate(@Nonnull Element element)
Parse MappedTag elements into a builder for the relevant predicate class.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### parseScripts

@Nullable public BeanDefinitionBuilder parseScripts(@Nonnull Element element)
Parse ConditionScript elements into a builder, wrapped in an OR as necessary.

Parameters:
  `element` - root element to parse under
Returns:
  builder for the predicate, or null if none needed

### shouldGenerateId

protected boolean shouldGenerateId()

Overrides:
  `shouldGenerateId` in class `AbstractBeanDefinitionParser`