[java-opensaml COMMIT] in /trunk: opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataI...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Oct 6 19:47:29 EDT 2015
Author: putmanb
Date: Tue Oct 6 19:47:28 2015
New Revision: 4344
URL: http://svn.shibboleth.net/view/java-opensaml?rev=4344&view=rev
Log:
OSJ-128: Add support for secondary indexes to metadata resolvers
Refactor MetadataIndex to remove MetadataIndexStore from the API.
It now just generates MetadataIndexKeys from EntityDescriptor and CriteriaSet.
Move MetadataIndexStore to saml-impl.
Introduce new MetadataIndexManager in saml-impl to centralize handling of the indexing
and lookup ops for an EntityBackingStore within a metadata resolver.
Added:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/MetadataIndexManager.java (with props)
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/MetadataIndexStore.java
- copied, changed from r4343, trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndexStore.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/MetadataIndexManagerTest.java (with props)
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/MetadataIndexStoreTest.java
- copied, changed from r4343, trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/MetadataIndexStoreTest.java
Modified:
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndex.java
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndexKey.java
trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndexStore.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/impl/AbstractBatchMetadataResolver.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/AbstractMetadataIndex.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/FunctionDrivenMetadataIndex.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/metadata/resolver/index/impl/RoleMetadataIndex.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/MetadataIndexStoreTest.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/FunctionDrivenMetadataIndexTest.java
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/metadata/resolver/index/impl/RoleMetadataIndexTest.java
Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndex.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndex.java?rev=4344&r1=4343&r2=4344&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndex.java (original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/metadata/resolver/index/MetadataIndex.java Tue Oct 6 19:47:28 2015
@@ -30,31 +30,35 @@
import org.opensaml.saml.saml2.metadata.EntityDescriptor;
/**
- * A component which is capable of indexing an {@link EntityDescriptor}, using one or more implementation-specific
- * instances of {@link MetadataIndexKey} and stored in a {@link MetadataIndexStore}.
+ * A component which defines and supports indexing an {@link EntityDescriptor}, and corresponding lookup
+ * via a {@link CriteriaSet}, using one or more (possibly implementation-specific)
+ * instances of {@link MetadataIndexKey}.
*/
public interface MetadataIndex {
/**
- * Index the supplied {@link EntityDescriptor} into the supplied {@link MetadataIndexStore}.
+ * Generate a set of one or more {@link MetadataIndexKey} instances based on the input {@link EntityDescriptor}.
*
* <p>
- * An implementation typically will simply generate one or more instances of {@link MetadataIndexKey}
- * based on the descriptor, and use those to store the descriptor in the {@link MetadataIndexStore}.
+ * These index key instances reflect the type of indexing performed and "understood" by the implementation,
+ * and as such should complement the {@link MetadataIndexKey} types generated for descriptor
+ * lookup via {@link #generateKeys(CriteriaSet)}.
* </p>
*
- * @param descriptor the descriptor to index
- * @param store the store for the indexed data
+ * @param descriptor the entity descriptor set to process
+ * @return the set of index keys generated from the criteria. May be null or empty,
+ * but will not contain null elements.
*/
- public void index(@Nonnull final EntityDescriptor descriptor, @Nonnull final MetadataIndexStore store);
+ @Nullable @NonnullElements @Unmodifiable @NotLive
+ public Set<MetadataIndexKey> generateKeys(@Nonnull final EntityDescriptor descriptor);
/**
[... 492 lines stripped ...]
More information about the commits
mailing list