Class FilterByQueriedAttributes
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- org.opensaml.profile.action.AbstractProfileAction
-
- org.opensaml.profile.action.AbstractConditionalProfileAction
-
- net.shibboleth.idp.profile.AbstractProfileAction
-
- net.shibboleth.idp.saml.saml2.profile.impl.FilterByQueriedAttributes
-
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class FilterByQueriedAttributes extends AbstractProfileAction
Action that filters a set of attributes against theAttributeobjects in anAttributeQuery.- Event:
EventIds.PROCEED_EVENT_ID
-
-
Field Summary
Fields Modifier and Type Field Description private AttributeContextattributeContextAttributeContext to filter.private Function<ProfileRequestContext,AttributeContext>attributeContextLookupStrategyStrategy used to locate theAttributeContextto filter.private org.slf4j.LoggerlogClass logger.private AttributeQueryqueryQuery to filter against.private Function<ProfileRequestContext,AttributeQuery>queryLookupStrategyStrategy used to locate theAttributeQueryto filter against.private ReloadableService<AttributeTranscoderRegistry>transcoderRegistryTranscoder registry service object.
-
Constructor Summary
Constructors Constructor Description FilterByQueriedAttributes()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddecodeAttribute(AttributeTranscoderRegistry registry, ProfileRequestContext profileRequestContext, Attribute input, Multimap<String,IdPAttribute> results)Access the registry of transcoding rules to decode the inputAttribute.protected voiddoExecute(ProfileRequestContext profileRequestContext)protected voiddoInitialize()protected booleandoPreExecute(ProfileRequestContext profileRequestContext)private intfilterRequestedValues(IdPAttribute attribute, Collection<IdPAttribute> requestedAttributes)Adjust an input attribute's values based on any values requested.voidsetAttributeContextLookupStrategy(Function<ProfileRequestContext,AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.voidsetQueryLookupStrategy(Function<ProfileRequestContext,AttributeQuery> strategy)Set the strategy used to locate theAttributeQueryassociated with a givenProfileRequestContext.voidsetTranscoderRegistry(ReloadableService<AttributeTranscoderRegistry> registry)Sets the registry of transcoding rules to apply to encode attributes.-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
transcoderRegistry
@NonnullAfterInit private ReloadableService<AttributeTranscoderRegistry> transcoderRegistry
Transcoder registry service object.
-
queryLookupStrategy
@Nonnull private Function<ProfileRequestContext,AttributeQuery> queryLookupStrategy
Strategy used to locate theAttributeQueryto filter against.
-
attributeContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,AttributeContext> attributeContextLookupStrategy
Strategy used to locate theAttributeContextto filter.
-
query
@Nullable private AttributeQuery query
Query to filter against.
-
attributeContext
@Nullable private AttributeContext attributeContext
AttributeContext to filter.
-
-
Method Detail
-
setTranscoderRegistry
public void setTranscoderRegistry(@Nonnull ReloadableService<AttributeTranscoderRegistry> registry)Sets the registry of transcoding rules to apply to encode attributes.- Parameters:
registry- registry service interface
-
setQueryLookupStrategy
public void setQueryLookupStrategy(@Nonnull Function<ProfileRequestContext,AttributeQuery> strategy)Set the strategy used to locate theAttributeQueryassociated with a givenProfileRequestContext.- Parameters:
strategy- lookup strategy
-
setAttributeContextLookupStrategy
public void setAttributeContextLookupStrategy(@Nonnull Function<ProfileRequestContext,AttributeContext> strategy)Set the strategy used to locate theAttributeContextassociated with a givenProfileRequestContext.- Parameters:
strategy- lookup strategy
-
doInitialize
protected void doInitialize() throws ComponentInitializationException- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)- Overrides:
doExecutein classAbstractProfileAction
-
decodeAttribute
protected void decodeAttribute(@Nonnull AttributeTranscoderRegistry registry, @Nonnull ProfileRequestContext profileRequestContext, @Nonnull Attribute input, @Nonnull @NonnullElements @Live Multimap<String,IdPAttribute> results) throws AttributeDecodingExceptionAccess the registry of transcoding rules to decode the inputAttribute.- Parameters:
registry- registry of transcoding rulesprofileRequestContext- current profile request contextinput- input objectresults- collection to add results to- Throws:
AttributeDecodingException- if an error occurs or no results were obtained
-
filterRequestedValues
private int filterRequestedValues(@Nonnull IdPAttribute attribute, @Nonnull @NonnullElements Collection<IdPAttribute> requestedAttributes)Adjust an input attribute's values based on any values requested.- Parameters:
attribute- attribute to filterrequestedAttributes- the attributes (and possibly values) requested- Returns:
- the number of values left in the input attribute
-
-