@ConsumerType
public interface ConfigurationPersistenceStrategy2
Modifier and Type | Method and Description |
---|---|
boolean |
deleteConfiguration(ResourceResolver resourceResolver,
java.lang.String configResourcePath)
Delete configuration or configuration collection data from repository using the inner-most context path as reference.
|
java.lang.String |
getCollectionItemConfigName(java.lang.String configName,
java.lang.String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
Resource |
getCollectionItemResource(Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
java.lang.String |
getCollectionItemResourcePath(java.lang.String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
java.lang.String |
getCollectionParentConfigName(java.lang.String configName,
java.lang.String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
Resource |
getCollectionParentResource(Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
java.lang.String |
getCollectionParentResourcePath(java.lang.String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
java.lang.String |
getConfigName(java.lang.String configName,
java.lang.String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
Resource |
getResource(Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
java.lang.String |
getResourcePath(java.lang.String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
boolean |
persistConfiguration(ResourceResolver resourceResolver,
java.lang.String configResourcePath,
ConfigurationPersistData data)
Stores configuration data for a singleton configuration resource.
|
boolean |
persistConfigurationCollection(ResourceResolver resourceResolver,
java.lang.String configResourceCollectionParentPath,
ConfigurationCollectionPersistData data)
Stores configuration data for a configuration resource collection.
|
@CheckForNull Resource getResource(@Nonnull Resource resource)
resource
- Singleton configuration resource@CheckForNull Resource getCollectionParentResource(@Nonnull Resource resource)
resource
- Configuration collection parent resource@CheckForNull Resource getCollectionItemResource(@Nonnull Resource resource)
resource
- Configuration collection item resource@CheckForNull java.lang.String getResourcePath(@Nonnull java.lang.String resourcePath)
resourcePath
- Configuration resource path (full path)@CheckForNull java.lang.String getCollectionParentResourcePath(@Nonnull java.lang.String resourcePath)
resourcePath
- Configuration collection parent resource path (full path)@CheckForNull java.lang.String getCollectionItemResourcePath(@Nonnull java.lang.String resourcePath)
resourcePath
- Configuration collection item resource path (full path)@CheckForNull java.lang.String getConfigName(@Nonnull java.lang.String configName, @CheckForNull java.lang.String relatedConfigPath)
configName
- Configuration namerelatedConfigPath
- Path of a configuration resource that was resolved in context of this configuration name.
This can be used to detect if the persistence strategy supports the configuration location. If null it should be assumed that it matches.@CheckForNull java.lang.String getCollectionParentConfigName(@Nonnull java.lang.String configName, @CheckForNull java.lang.String relatedConfigPath)
configName
- Configuration namerelatedConfigPath
- Path of a configuration resource that was resolved in context of this configuration name.
This can be used to detect if the persistence strategy supports the configuration location. If null it should be assumed that it matches.@CheckForNull java.lang.String getCollectionItemConfigName(@Nonnull java.lang.String configName, @CheckForNull java.lang.String relatedConfigPath)
configName
- Configuration namerelatedConfigPath
- Path of a configuration resource that was resolved in context of this configuration name.
This can be used to detect if the persistence strategy supports the configuration location. If null it should be assumed that it matches.boolean persistConfiguration(@Nonnull ResourceResolver resourceResolver, @Nonnull java.lang.String configResourcePath, @Nonnull ConfigurationPersistData data)
resourceResolver
- Resource resolverconfigResourcePath
- Path to store configuration data to. The resource (and it's parents) may not exist and may have to be created.data
- Configuration data to be stored. All existing properties are erased and replaced with the new ones.boolean persistConfigurationCollection(@Nonnull ResourceResolver resourceResolver, @Nonnull java.lang.String configResourceCollectionParentPath, @Nonnull ConfigurationCollectionPersistData data)
resourceResolver
- Resource resolverconfigResourceCollectionParentPath
- Parent path to store configuration collection data to.
The resource (and it's parents) may not exist and may have to be created.data
- Configuration collection data. All existing collection entries on this context path level are erased and replaced with the new ones.boolean deleteConfiguration(@Nonnull ResourceResolver resourceResolver, @Nonnull java.lang.String configResourcePath)
resourceResolver
- Resource resolverconfigResourcePath
- Path to store configuration data to. The resource (and it's parents) may not exist and may have to be created.Copyright © 2018 The Apache Software Foundation. All rights reserved.