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 forSecurityConfiguration
s 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
Fields Modifier and Type Field Description static String
PARAM_RANKING
Parameter used to define the ranking of a given configuration compared to other registered configuration in this aggregate.
-
Constructor Summary
Constructors Constructor Description CompositeConfiguration(@NotNull String name)
CompositeConfiguration(@NotNull String name, @NotNull SecurityProvider securityProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConfiguration(T configuration)
void
addConfiguration(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<T>
getConfigurations()
@NotNull List<org.apache.jackrabbit.oak.spi.commit.ThreeWayConflictHandler>
getConflictHandlers()
Returns the list of conflict handlers available for this security configuration.@NotNull Context
getContext()
T
getDefaultConfig()
@NotNull String
getName()
Returns the name of this security configuration.@NotNull ConfigurationParameters
getParameters()
Returns the configuration parameters associated with this security configuration instance.@NotNull List<ProtectedItemImporter>
getProtectedItemImporters()
@NotNull org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer
getRepositoryInitializer()
Returns a repository initializer for this security configuration.protected @NotNull RootProvider
getRootProvider()
protected @NotNull SecurityProvider
getSecurityProvider()
protected @NotNull TreeProvider
getTreeProvider()
@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.WorkspaceInitializer
getWorkspaceInitializer()
Returns a workspace initializer for this security configuration.void
removeConfiguration(T configuration)
void
setDefaultConfig(T defaultConfig)
void
setRootProvider(@NotNull RootProvider rootProvider)
void
setSecurityProvider(@NotNull SecurityProvider securityProvider)
void
setTreeProvider(@NotNull TreeProvider treeProvider)
-
-
-
Field Detail
-
PARAM_RANKING
public static final String 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:
- Constant Field Values
-
-
Constructor Detail
-
CompositeConfiguration
public CompositeConfiguration(@NotNull @NotNull String name)
-
CompositeConfiguration
public CompositeConfiguration(@NotNull @NotNull String name, @NotNull @NotNull SecurityProvider securityProvider)
-
-
Method Detail
-
getDefaultConfig
@Nullable public T getDefaultConfig()
-
setDefaultConfig
public void setDefaultConfig(@NotNull T defaultConfig)
-
addConfiguration
public void addConfiguration(@NotNull T configuration)
-
addConfiguration
public void addConfiguration(@NotNull T configuration, @NotNull @NotNull ConfigurationParameters params)
-
removeConfiguration
public void removeConfiguration(@NotNull T configuration)
-
setSecurityProvider
public void setSecurityProvider(@NotNull @NotNull SecurityProvider securityProvider)
-
getSecurityProvider
@NotNull protected @NotNull SecurityProvider getSecurityProvider()
-
setRootProvider
public void setRootProvider(@NotNull @NotNull RootProvider rootProvider)
-
getRootProvider
@NotNull protected @NotNull RootProvider getRootProvider()
-
setTreeProvider
public void setTreeProvider(@NotNull @NotNull TreeProvider treeProvider)
-
getTreeProvider
@NotNull protected @NotNull TreeProvider getTreeProvider()
-
getName
@NotNull public @NotNull String getName()
Description copied from interface:SecurityConfiguration
Returns the name of this security configuration.- Specified by:
getName
in interfaceSecurityConfiguration
- Returns:
- The name of this configuration.
-
getParameters
@NotNull public @NotNull ConfigurationParameters getParameters()
Description copied from interface:SecurityConfiguration
Returns the configuration parameters associated with this security configuration instance. If no parameters are presentConfigurationParameters.EMPTY
should be returned.- Specified by:
getParameters
in interfaceSecurityConfiguration
- Returns:
- The configuration parameters.
-
getWorkspaceInitializer
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.lifecycle.WorkspaceInitializer getWorkspaceInitializer()
Description copied from interface:SecurityConfiguration
Returns a workspace initializer for this security configuration. If this configuration doesn't require any specific workspace initializationWorkspaceInitializer.DEFAULT
should be returned.- Specified by:
getWorkspaceInitializer
in interfaceSecurityConfiguration
- Returns:
- An instance of
WorkspaceInitializer
.
-
getRepositoryInitializer
@NotNull public @NotNull org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer getRepositoryInitializer()
Description copied from interface:SecurityConfiguration
Returns a repository initializer for this security configuration. If this configuration doesn't require any specific repository initializationRepositoryInitializer.DEFAULT
should be returned.- Specified by:
getRepositoryInitializer
in 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:SecurityConfiguration
Returns the list of commit hooks that need to be executed for the specified workspace name.- Specified by:
getCommitHooks
in 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:SecurityConfiguration
Returns the list of validators that need to be executed for the specified workspace name.- Specified by:
getValidators
in 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:SecurityConfiguration
Returns the list of conflict handlers available for this security configuration.- Specified by:
getConflictHandlers
in interfaceSecurityConfiguration
- Returns:
- A list of
ThreeWayConflictHandler
.
-
getProtectedItemImporters
@NotNull public @NotNull List<ProtectedItemImporter> getProtectedItemImporters()
- Specified by:
getProtectedItemImporters
in interfaceSecurityConfiguration
- Returns:
- The list of protected item importers defined by this configuration.
-
getContext
@NotNull public @NotNull Context getContext()
- Specified by:
getContext
in interfaceSecurityConfiguration
- Returns:
- The context defined by this configuration.
-
-