Class CompositeConfiguration<T extends SecurityConfiguration>
java.lang.Object
org.apache.jackrabbit.oak.spi.security.CompositeConfiguration<T>
- All Implemented Interfaces:
SecurityConfiguration
- Direct Known Subclasses:
CompositePrincipalConfiguration,CompositeTokenConfiguration
@ProviderType
public abstract class CompositeConfiguration<T extends SecurityConfiguration>
extends Object
implements SecurityConfiguration
Abstract base implementation for
SecurityConfigurations that can
combine different implementations.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jackrabbit.oak.spi.security.SecurityConfiguration
SecurityConfiguration.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringParameter used to define the ranking of a given configuration compared to other registered configuration in this aggregate. -
Constructor Summary
ConstructorsConstructorDescriptionCompositeConfiguration(@NotNull String name) CompositeConfiguration(@NotNull String name, @NotNull SecurityProvider securityProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConfiguration(T configuration) voidaddConfiguration(T configuration, @NotNull ConfigurationParameters params) @NotNull List<? extends org.apache.jackrabbit.oak.spi.commit.CommitHook>getCommitHooks(@NotNull String workspaceName) Returns the list of commit hooks that need to be executed for the specified workspace name.@NotNull List<org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler>Returns the list of conflict handlers available for this security configuration.@NotNull Context@NotNull Iterable<org.apache.jackrabbit.oak.stats.Monitor<?>>getMonitors(@NotNull org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider) @NotNull StringgetName()Returns the name of this security configuration.@NotNull ConfigurationParametersReturns the configuration parameters associated with this security configuration instance.@NotNull List<ProtectedItemImporter>@NotNull org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializerReturns a repository initializer for this security configuration.protected @NotNull RootProviderprotected @NotNull SecurityProviderprotected @NotNull TreeProvider@NotNull List<? extends org.apache.jackrabbit.oak.spi.commit.ValidatorProvider>getValidators(@NotNull String workspaceName, @NotNull Set<Principal> principals, @NotNull org.apache.jackrabbit.oak.spi.commit.MoveTracker moveTracker) Returns the list of validators that need to be executed for the specified workspace name.@NotNull org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializerReturns a workspace initializer for this security configuration.voidremoveConfiguration(T configuration) voidsetDefaultConfig(T defaultConfig) voidsetRootProvider(@NotNull RootProvider rootProvider) voidsetSecurityProvider(@NotNull SecurityProvider securityProvider) voidsetTreeProvider(@NotNull TreeProvider treeProvider)
-
Field Details
-
PARAM_RANKING
Parameter used to define the ranking of a given configuration compared to other registered configuration in this aggregate. If the ranking parameter is missing a new configuration will be added at the end of the list.- See Also:
-
-
Constructor Details
-
CompositeConfiguration
-
CompositeConfiguration
public CompositeConfiguration(@NotNull @NotNull String name, @NotNull @NotNull SecurityProvider securityProvider)
-
-
Method Details
-
getDefaultConfig
-
setDefaultConfig
-
addConfiguration
-
addConfiguration
public void addConfiguration(@NotNull T configuration, @NotNull @NotNull ConfigurationParameters params) -
removeConfiguration
-
getConfigurations
-
setSecurityProvider
-
getSecurityProvider
-
setRootProvider
-
getRootProvider
-
setTreeProvider
-
getTreeProvider
-
getName
Description copied from interface:SecurityConfigurationReturns the name of this security configuration.- Specified by:
getNamein interfaceSecurityConfiguration- Returns:
- The name of this configuration.
-
getParameters
Description copied from interface:SecurityConfigurationReturns the configuration parameters associated with this security configuration instance. If no parameters are presentConfigurationParameters.EMPTYshould be returned.- Specified by:
getParametersin interfaceSecurityConfiguration- Returns:
- The configuration parameters.
-
getWorkspaceInitializer
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer getWorkspaceInitializer()Description copied from interface:SecurityConfigurationReturns a workspace initializer for this security configuration. If this configuration doesn't require any specific workspace initializationWorkspaceInitializer.DEFAULTshould be returned.- Specified by:
getWorkspaceInitializerin interfaceSecurityConfiguration- Returns:
- An instance of
WorkspaceInitializer.
-
getRepositoryInitializer
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer getRepositoryInitializer()Description copied from interface:SecurityConfigurationReturns a repository initializer for this security configuration. If this configuration doesn't require any specific repository initializationRepositoryInitializer.DEFAULTshould be returned.- Specified by:
getRepositoryInitializerin interfaceSecurityConfiguration- Returns:
- An instance of
RepositoryInitializer.
-
getCommitHooks
@NotNull public @NotNull List<? extends org.apache.jackrabbit.oak.spi.commit.CommitHook> getCommitHooks(@NotNull @NotNull String workspaceName) Description copied from interface:SecurityConfigurationReturns the list of commit hooks that need to be executed for the specified workspace name.- Specified by:
getCommitHooksin interfaceSecurityConfiguration- Parameters:
workspaceName- The name of the workspace.- Returns:
- A list of commit hooks.
-
getValidators
@NotNull public @NotNull List<? extends org.apache.jackrabbit.oak.spi.commit.ValidatorProvider> getValidators(@NotNull @NotNull String workspaceName, @NotNull @NotNull Set<Principal> principals, @NotNull @NotNull org.apache.jackrabbit.oak.spi.commit.MoveTracker moveTracker) Description copied from interface:SecurityConfigurationReturns the list of validators that need to be executed for the specified workspace name.- Specified by:
getValidatorsin interfaceSecurityConfiguration- Parameters:
workspaceName- The name of the workspace.principals- The set of principals associated with the subject that is committing modifications.moveTracker- The move tracker associated with the commit.- Returns:
- A list of validators.
-
getConflictHandlers
@NotNull public @NotNull List<org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler> getConflictHandlers()Description copied from interface:SecurityConfigurationReturns the list of conflict handlers available for this security configuration.- Specified by:
getConflictHandlersin interfaceSecurityConfiguration- Returns:
- A list of
ThreeWayConflictHandler.
-
getProtectedItemImporters
- Specified by:
getProtectedItemImportersin interfaceSecurityConfiguration- Returns:
- The list of protected item importers defined by this configuration.
-
getContext
- Specified by:
getContextin interfaceSecurityConfiguration- Returns:
- The context defined by this configuration.
-
getMonitors
@NotNull public @NotNull Iterable<org.apache.jackrabbit.oak.stats.Monitor<?>> getMonitors(@NotNull @NotNull org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider) - Specified by:
getMonitorsin interfaceSecurityConfiguration
-