Package net.shibboleth.sp.credential
Class AbstractOrderedCredentialResolver
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.sp.credential.AbstractOrderedCredentialResolver
- All Implemented Interfaces:
Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,Resolver<Credential,,CriteriaSet> OrderedCredentialResolver,CredentialResolver,Ordered
- Direct Known Subclasses:
StaticCredentialResolver,StaticMapCredentialResolver
public abstract class AbstractOrderedCredentialResolver
extends AbstractIdentifiableInitializableComponent
implements OrderedCredentialResolver
Simple base class for resolvers to supply an
Ordered implementation if they don't
need a dedicated base class.
Additional "value-adds" include the component handling, the resolveSingle method, and
built-in support for UsageCriterion and ProtocolCriterion filtering.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis is more or less a duplicate of an OpenSAML implementation class to filter by usage. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanWhether to apply usage filteing.private final org.slf4j.LoggerClass logger.private intOrder.Protocol values supported by these credentials.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Iterable<Credential>doResolve(CriteriaSet criteria) Subclasses implement this method to resolve the underlying objects.private Iterable<Credential>filter(Iterable<Credential> creds, CriteriaSet criteria) Filter the supplied credentials by type and/or usage as required.intgetOrder()resolve(CriteriaSet criteria) resolveSingle(CriteriaSet criteriaSet) voidsetFilterByUsage(boolean flag) Sets whether to applyUsageCriterionif supplied to the results.voidsetOrder(int i) Set component order.voidsetProtocols(Collection<String> protocols) Sets the protocol values supported by this resolver.Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, 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.IdentifiedComponent
getId
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
order
private int orderOrder. -
filterByUsage
private boolean filterByUsageWhether to apply usage filteing. -
supportedProtocols
Protocol values supported by these credentials.
-
-
Constructor Details
-
AbstractOrderedCredentialResolver
public AbstractOrderedCredentialResolver()Constructor.
-
-
Method Details
-
getOrder
public int getOrder() -
setOrder
public void setOrder(int i) Set component order.Defaults to
Ordered.LOWEST_PRECEDENCE- 1, meaning "as low as possible except for components specifically configured to be lowest", allowing certain objects or types to be explicitly configured to be last.- Parameters:
i- order value
-
setFilterByUsage
public void setFilterByUsage(boolean flag) Sets whether to applyUsageCriterionif supplied to the results.Defaults to true.
- Parameters:
flag- flag to set
-
setProtocols
Sets the protocol values supported by this resolver.If set, any
ProtocolCriterionwill be enforced apriori before returning any credentials.- Parameters:
protocols- the protocols supported
-