@ConsumerType public interface ConfigurationPersistenceStrategy2
Modifier and Type | Method and Description |
---|---|
boolean |
deleteConfiguration(@NotNull ResourceResolver resourceResolver,
@NotNull String configResourcePath)
Delete configuration or configuration collection data from repository using the inner-most context path as reference.
|
@Nullable String |
getCollectionItemConfigName(@NotNull String configName,
@Nullable String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
@Nullable Resource |
getCollectionItemResource(@NotNull Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
@Nullable String |
getCollectionItemResourcePath(@NotNull String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
@Nullable String |
getCollectionParentConfigName(@NotNull String configName,
@Nullable String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
@Nullable Resource |
getCollectionParentResource(@NotNull Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
@Nullable String |
getCollectionParentResourcePath(@NotNull String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
@Nullable String |
getConfigName(@NotNull String configName,
@Nullable String relatedConfigPath)
Allows the strategy to transform the given configuration name for nested configurations according to it's persistent strategies,
e.g.
|
@Nullable Resource |
getResource(@NotNull Resource resource)
Allows the strategy to transform the given configuration resource according to it's persistent strategies,
e.g.
|
@Nullable String |
getResourcePath(@NotNull String resourcePath)
Allows the strategy to transform the given configuration resource path according to it's persistent strategies,
e.g.
|
boolean |
persistConfiguration(@NotNull ResourceResolver resourceResolver,
@NotNull String configResourcePath,
@NotNull ConfigurationPersistData data)
Stores configuration data for a singleton configuration resource.
|
boolean |
persistConfigurationCollection(@NotNull ResourceResolver resourceResolver,
@NotNull String configResourceCollectionParentPath,
@NotNull ConfigurationCollectionPersistData data)
Stores configuration data for a configuration resource collection.
|
@Nullable @Nullable Resource getResource(@NotNull @NotNull Resource resource)
resource
- Singleton configuration resource@Nullable @Nullable Resource getCollectionParentResource(@NotNull @NotNull Resource resource)
resource
- Configuration collection parent resource@Nullable @Nullable Resource getCollectionItemResource(@NotNull @NotNull Resource resource)
resource
- Configuration collection item resource@Nullable @Nullable String getResourcePath(@NotNull @NotNull String resourcePath)
resourcePath
- Configuration resource path (full path)@Nullable @Nullable String getCollectionParentResourcePath(@NotNull @NotNull String resourcePath)
resourcePath
- Configuration collection parent resource path (full path)@Nullable @Nullable String getCollectionItemResourcePath(@NotNull @NotNull String resourcePath)
resourcePath
- Configuration collection item resource path (full path)@Nullable @Nullable String getConfigName(@NotNull @NotNull String configName, @Nullable @Nullable 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.@Nullable @Nullable String getCollectionParentConfigName(@NotNull @NotNull String configName, @Nullable @Nullable 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.@Nullable @Nullable String getCollectionItemConfigName(@NotNull @NotNull String configName, @Nullable @Nullable 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(@NotNull @NotNull ResourceResolver resourceResolver, @NotNull @NotNull String configResourcePath, @NotNull @NotNull 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(@NotNull @NotNull ResourceResolver resourceResolver, @NotNull @NotNull String configResourceCollectionParentPath, @NotNull @NotNull 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(@NotNull @NotNull ResourceResolver resourceResolver, @NotNull @NotNull 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 © 2010 - 2020 Adobe. All Rights Reserved