@ConsumerType
public interface ConfigurationResourceResolvingStrategy
CollectionInheritanceDecider
SPI interface. If such services are available,
they should be called in order of there service ranking, starting with the highest
ranking. The first decider service providing a non null return value is used
for the decision.Modifier and Type | Method and Description |
---|---|
Resource |
getResource(Resource resource,
java.util.Collection<java.lang.String> bucketNames,
java.lang.String configName)
Get a context-aware singleton configuration resource defined by the given configuration name.
|
java.util.Collection<Resource> |
getResourceCollection(Resource resource,
java.util.Collection<java.lang.String> bucketNames,
java.lang.String configName)
Get a collection of context-aware configuration resources defined by the given configuration name.
|
java.util.Collection<java.util.Iterator<Resource>> |
getResourceCollectionInheritanceChain(Resource resource,
java.util.Collection<java.lang.String> bucketNames,
java.lang.String configName)
Get a collection of context-aware configuration resource inheritance chains defined by the given configuration name.
|
java.lang.String |
getResourceCollectionParentPath(Resource resource,
java.lang.String bucketName,
java.lang.String configName)
Get the configuration resource collection parent path for storing configuration data for the given context resource and configuration name.
|
java.util.Iterator<Resource> |
getResourceInheritanceChain(Resource resource,
java.util.Collection<java.lang.String> bucketNames,
java.lang.String configName)
Get a context-aware singleton configuration resource inheritance chain defined by the given configuration name.
|
java.lang.String |
getResourcePath(Resource resource,
java.lang.String bucketName,
java.lang.String configName)
Get the configuration resource path for storing configuration data for the given context resource and configuration name.
|
@CheckForNull Resource getResource(@Nonnull Resource resource, @Nonnull java.util.Collection<java.lang.String> bucketNames, @Nonnull java.lang.String configName)
resource
- Context resource to fetch configuration forbucketNames
- Configuration "bucket" names. For each inheritance level all bucket names are tried, and the first
one that has a result is included.configName
- Configuration name or relative path.null
if this strategy did not found matching resources.@CheckForNull java.util.Collection<Resource> getResourceCollection(@Nonnull Resource resource, @Nonnull java.util.Collection<java.lang.String> bucketNames, @Nonnull java.lang.String configName)
resource
- Context resource to fetch configuration forbucketNames
- Configuration "bucket" names. For each inheritance level all bucket names are tried, and the first
one that has a result is included.configName
- Configuration name or relative path.null
if this strategy did not found matching resources.@CheckForNull java.util.Iterator<Resource> getResourceInheritanceChain(@Nonnull Resource resource, @Nonnull java.util.Collection<java.lang.String> bucketNames, @Nonnull java.lang.String configName)
getResource(Resource, Collection, String)
.resource
- Context resource to fetch configuration forbucketNames
- Configuration "bucket" names. For each inheritance level all bucket names are tried, and the first
one that has a result is included.configName
- Configuration name or relative path.null
if this strategy did not found matching resources.@CheckForNull java.util.Collection<java.util.Iterator<Resource>> getResourceCollectionInheritanceChain(@Nonnull Resource resource, @Nonnull java.util.Collection<java.lang.String> bucketNames, @Nonnull java.lang.String configName)
getResourceCollection(Resource, Collection, String)
.resource
- Context resource to fetch configuration forbucketNames
- Configuration "bucket" names. For each inheritance level all bucket names are tried, and the first
one that has a result is included.configName
- Configuration name or relative path.null
if this strategy did not found matching resources.@CheckForNull java.lang.String getResourcePath(@Nonnull Resource resource, @Nonnull java.lang.String bucketName, @Nonnull java.lang.String configName)
resource
- Context resource to fetch configuration forbucketName
- Configuration "bucket" name. Each high-level configuration resolver should store
it's configuration data grouped in a child resource of the configuration resource. This is what
we call a "bucket", and the resource name is specified with this parameter.configName
- Configuration name or relative path.@CheckForNull java.lang.String getResourceCollectionParentPath(@Nonnull Resource resource, @Nonnull java.lang.String bucketName, @Nonnull java.lang.String configName)
resource
- Context resource to fetch configuration forbucketName
- Configuration "bucket" name. Each high-level configuration resolver should store
it's configuration data grouped in a child resource of the configuration resource. This is what
we call a "bucket", and the resource name is specified with this parameter.configName
- Configuration name or relative path.Copyright © 2018 The Apache Software Foundation. All rights reserved.