Class MockPolicyRequirementRule
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.idp.attribute.filter.testing.MockPolicyRequirementRule
- All Implemented Interfaces:
PolicyRequirementRule,Component,DestructableComponent,IdentifiedComponent,InitializableComponent
public class MockPolicyRequirementRule
extends AbstractIdentifiedInitializableComponent
implements PolicyRequirementRule
A simple, mock implementation of
Matcher.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
PolicyRequirementRule.Tristate -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanstate variableprivate PolicyRequirementRule.Tristateto return from matcher().Fields inherited from interface net.shibboleth.idp.attribute.filter.PolicyRequirementRule
MATCHES_ALL, MATCHES_NONE, REQUIREMENT_RULE_FAILS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanmatches(AttributeFilterContext filterContext) Evaluate what this rule means.voidSet what to returnMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, setIdMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
initialized
private boolean initializedstate variable -
retVal
to return from matcher().
-
-
Constructor Details
-
MockPolicyRequirementRule
public MockPolicyRequirementRule()Constructor.
-
-
Method Details
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceInitializableComponent- Overrides:
isInitializedin classAbstractInitializableComponent
-
doInitialize
public void doInitialize()- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent
-
setRetVal
Set what to return- Parameters:
what- what to return
-
matches
@Nonnull public PolicyRequirementRule.Tristate matches(@Nonnull AttributeFilterContext filterContext) Evaluate what this rule means.- Specified by:
matchesin interfacePolicyRequirementRule- Parameters:
filterContext- the context.- Returns:
- whether the rule holds
-