Interface ConfigurationResourceResolver
@ProviderType
public interface ConfigurationResourceResolver
Getting context-aware configuration resources for a given resource context.
This is a low-level interface for supporting advanced use cases. If you just want to fetch
some configuration parameters
ConfigurationResolver
is the right place.-
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<String>
getAllContextPaths
(@NotNull Resource resource) Get all context paths for which context-aware configurations could be defined.getContextPath
(@NotNull Resource resource) Get the inner-most context path (deepest path) returned bygetAllContextPaths(Resource)
.@Nullable Resource
getResource
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.@NotNull Collection<Resource>
getResourceCollection
(@NotNull Resource resource, @NotNull String bucketName, @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name.
-
Method Details
-
getResource
@Nullable @Nullable Resource getResource(@NotNull @NotNull Resource resource, @NotNull @NotNull String bucketName, @NotNull @NotNull String configName) Get a context-aware singleton configuration resource defined by the given configuration name.- Parameters:
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.- Returns:
- Configuration resource or
null
.
-
getResourceCollection
@NotNull @NotNull Collection<Resource> getResourceCollection(@NotNull @NotNull Resource resource, @NotNull @NotNull String bucketName, @NotNull @NotNull String configName) Get a collection of context-aware configuration resources defined by the given configuration name.- Parameters:
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.- Returns:
- Collection of configuration resources, the collection might be empty.
-
getContextPath
Get the inner-most context path (deepest path) returned bygetAllContextPaths(Resource)
.- Parameters:
resource
- Context resource to fetch configuration for- Returns:
- Context path or null
-
getAllContextPaths
Get all context paths for which context-aware configurations could be defined. The context paths are always ancestors of the resource path, or the resource path itself. Which ancestors are allowed for context-aware configuration depends on configuration.- Parameters:
resource
- Context resource to fetch configuration for- Returns:
- List of context paths
-