public abstract class AbstractBatchMetadataResolver extends AbstractMetadataResolver implements BatchMetadataResolver, IterableMetadataSource
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractBatchMetadataResolver.BatchEntityBackingStore
Specialized entity backing store implementation for batch metadata resolvers.
|
AbstractMetadataResolver.EntityBackingStore
Modifier and Type | Field and Description |
---|---|
private boolean |
cacheSourceMetadata
Flag indicating whether to cache the original source metadata document.
|
private Set<MetadataIndex> |
indexes
The set of indexes configured.
|
private org.slf4j.Logger |
log
Class logger.
|
private boolean |
resolveViaPredicatesOnly
Flag indicating whether resolution may be performed solely by applying predicates to the
entire metadata collection.
|
Constructor and Description |
---|
AbstractBatchMetadataResolver()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractBatchMetadataResolver.BatchEntityBackingStore |
createNewBackingStore()
Create a new backing store instance for EntityDescriptor data.
|
protected AbstractBatchMetadataResolver.BatchEntityBackingStore |
getBackingStore()
Get the EntityDescriptor backing store currently in use by the metadata resolver.
|
protected org.opensaml.core.xml.XMLObject |
getCachedFilteredMetadata()
Convenience method for getting the current effective cached filtered metadata.
|
protected org.opensaml.core.xml.XMLObject |
getCachedOriginalMetadata()
Convenience method for getting the current effective cached original metadata.
|
Set<MetadataIndex> |
getIndexes()
Get the configured indexes.
|
protected void |
indexEntityDescriptor(EntityDescriptor entityDescriptor,
AbstractMetadataResolver.EntityBackingStore backingStore)
Index the specified entity descriptor, updating the specified entity backing store instance as necessary.
|
protected void |
initMetadataResolver()
Subclasses should override this method to perform any initialization logic necessary.
|
protected boolean |
isCacheSourceMetadata()
Get whether to cache the original source metadata document.
|
boolean |
isResolveViaPredicatesOnly()
Get the flag indicating whether resolution may be performed solely
by applying predicates to the entire metadata collection.
|
Iterator<EntityDescriptor> |
iterator() |
protected com.google.common.base.Optional<Set<EntityDescriptor>> |
lookupByIndexes(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
Resolve the set up descriptors based on the indexes currently held.
|
protected AbstractBatchMetadataResolver.BatchEntityBackingStore |
preProcessNewMetadata(org.opensaml.core.xml.XMLObject root)
Process the specified new metadata document, including metadata filtering
and return its data in a new entity backing store instance.
|
Iterable<EntityDescriptor> |
resolve(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) |
protected void |
setCacheSourceMetadata(boolean flag)
Set whether to cache the original source metadata document.
|
void |
setIndexes(Set<MetadataIndex> newIndexes)
Set the configured indexes.
|
void |
setResolveViaPredicatesOnly(boolean flag)
Set the flag indicating whether resolution may be performed solely
by applying predicates to the entire metadata collection.
|
doDestroy, doInitialize, filterMetadata, getCriterionPredicateRegistry, getLogPrefix, getMetadataFilter, getParserPool, getUnmarshallerFactory, isFailFastInitialization, isRequireValidMetadata, isSatisfyAnyPredicates, isUseDefaultPredicateRegistry, isValid, lookupEntityID, lookupIndexedEntityID, predicateFilterCandidates, preProcessEntitiesDescriptor, preProcessEntityDescriptor, releaseMetadataDOM, removeByEntityID, resolveSingle, setBackingStore, setCriterionPredicateRegistry, setFailFastInitialization, setMetadataFilter, setParserPool, setRequireValidMetadata, setSatisfyAnyPredicates, setUseDefaultPredicateRegistry, unmarshallMetadata
setId
getId
destroy, initialize, isDestroyed, isInitialized
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetadataFilter, isRequireValidMetadata, setMetadataFilter, setRequireValidMetadata
resolveSingle
getId
forEach, spliterator
private final org.slf4j.Logger log
private boolean cacheSourceMetadata
private Set<MetadataIndex> indexes
private boolean resolveViaPredicatesOnly
public AbstractBatchMetadataResolver()
public Iterator<EntityDescriptor> iterator()
iterator
in interface Iterable<EntityDescriptor>
protected boolean isCacheSourceMetadata()
protected void setCacheSourceMetadata(boolean flag)
flag
- true if source should be cached, false otherwise@Nonnull @NonnullElements @Unmodifiable @NotLive public Set<MetadataIndex> getIndexes()
public void setIndexes(@Nullable Set<MetadataIndex> newIndexes)
newIndexes
- the new indexes to setpublic boolean isResolveViaPredicatesOnly()
public void setResolveViaPredicatesOnly(boolean flag)
flag
- true if resolution may be attempted solely via predicates, false if not@Nonnull public Iterable<EntityDescriptor> resolve(net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria) throws net.shibboleth.utilities.java.support.resolver.ResolverException
resolve
in interface net.shibboleth.utilities.java.support.resolver.Resolver<EntityDescriptor,net.shibboleth.utilities.java.support.resolver.CriteriaSet>
net.shibboleth.utilities.java.support.resolver.ResolverException
@Nonnull @NonnullElements protected com.google.common.base.Optional<Set<EntityDescriptor>> lookupByIndexes(@Nonnull net.shibboleth.utilities.java.support.resolver.CriteriaSet criteria)
criteria
- the criteria set to processOptional
instance containing the descriptors resolved via indexes,
and based on the input criteria set. If the Optional instance indicates 'absent',
there were either no indexes configured, or no criteria were applicable/understood
by any indexes. If 'present' is indicated, then there were applicable/understood criteria,
and the wrapped set contains the indexed data, which may be empty.protected void indexEntityDescriptor(@Nonnull EntityDescriptor entityDescriptor, @Nonnull AbstractMetadataResolver.EntityBackingStore backingStore)
indexEntityDescriptor
in class AbstractMetadataResolver
entityDescriptor
- the target entity descriptor to processbackingStore
- the backing store instance to update@Nonnull protected AbstractBatchMetadataResolver.BatchEntityBackingStore createNewBackingStore()
AbstractMetadataResolver.setBackingStore(EntityBackingStore)
to make it the effective
instance in use.createNewBackingStore
in class AbstractMetadataResolver
@Nonnull protected AbstractBatchMetadataResolver.BatchEntityBackingStore getBackingStore()
getBackingStore
in class AbstractMetadataResolver
protected void initMetadataResolver() throws net.shibboleth.utilities.java.support.component.ComponentInitializationException
initMetadataResolver
in class AbstractMetadataResolver
net.shibboleth.utilities.java.support.component.ComponentInitializationException
- thrown if there is a problem initializing the provider@Nullable protected org.opensaml.core.xml.XMLObject getCachedOriginalMetadata()
Note: may or may not be the same as that obtained from getCachedFilteredMetadata()
,
depending on what metadata filtering produced from the original metadata document.
@Nullable protected org.opensaml.core.xml.XMLObject getCachedFilteredMetadata()
Note: may or may not be the same as that obtained from getCachedOriginalMetadata()
,
depending on what metadata filtering produced from the original metadata document.
@Nonnull protected AbstractBatchMetadataResolver.BatchEntityBackingStore preProcessNewMetadata(@Nonnull org.opensaml.core.xml.XMLObject root) throws FilterException
root
- the root of the new metadata document being processedFilterException
- if there is a problem filtering the metadataCopyright © 1999–2020 Shibboleth Consortium. All rights reserved.