Class PolicyFromMatcherId
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.idp.attribute.filter.BaseBridgingClass
net.shibboleth.idp.attribute.filter.PolicyFromMatcherId
- All Implemented Interfaces:
PolicyRequirementRule,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
public final class PolicyFromMatcherId
extends BaseBridgingClass
implements PolicyRequirementRule, IdentifiedComponent, DestructableComponent
Bridging class to go from a
Matcher to a PolicyRequirementRule.
If the value of the supplied attribute matches then this is true, otherwise false.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
PolicyRequirementRule.Tristate -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe attribute Id we care about.private final org.slf4j.LoggerClass logger.private final MatcherThe rule we are shadowing.Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the Id of the attribute in question.Testing support.matches(AttributeFilterContext context) Evaluate what this rule means.Methods inherited from class net.shibboleth.idp.attribute.filter.BaseBridgingClass
doDestroy, doInitialize, getLogPrefixMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.DestructableComponent
destroy, isDestroyedMethods inherited from interface net.shibboleth.shared.component.IdentifiableComponent
setIdMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
theMatcher
The rule we are shadowing. -
attributeId
The attribute Id we care about. -
log
@Nonnull private final org.slf4j.Logger logClass logger.
-
-
Constructor Details
-
PolicyFromMatcherId
public PolicyFromMatcherId(@Nonnull @ParameterName(name="matcher") Matcher matcher, @Nonnull @NotEmpty @ParameterName(name="attribute") String attribute) Constructor.- Parameters:
matcher- the class we are bridging toattribute- the Id of the attribute in question.
-
-
Method Details
-
getAttributeId
Gets the Id of the attribute in question.- Returns:
- the id.
-
getMatcher
Testing support. Get the embedded matcher.- Returns:
- the embedded matcher.
-
matches
Evaluate what this rule means.- Specified by:
matchesin interfacePolicyRequirementRule- Parameters:
context- the context.- Returns:
- whether the rule holds
-