Interface AccessControlProviderFactory
-
- All Known Implementing Classes:
AccessControlProviderFactoryImpl
public interface AccessControlProviderFactoryTheAccessControlProviderFactoryis used to createAccessControlProviders for the various workspaces present in the repository. If a provider is no longer used by the workspace, it isclosed.The factory does not need to cache the created
AccessControlProviders. They are used during the entire lifetime of their workspace, and are cached together with the respective workspace related objects by the repository implementation.The
AccessControlProviders are requested using asystem Session. The system sessions have a distinct access control rules in order to prevent chicken-egg problems when setting up security for a workspace.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Dispose thisAccessControlProviderFactoryand its resources.AccessControlProvidercreateProvider(Session systemSession, WorkspaceSecurityConfig config)Creates an AccessControlProvider for the workspace of the given system session.voidinit(Session securitySession)Initialize this factory.
-
-
-
Method Detail
-
init
void init(Session securitySession) throws RepositoryException
Initialize this factory.- Parameters:
securitySession- Security Session.- Throws:
RepositoryException- If an error occurs.
-
close
void close() throws RepositoryExceptionDispose thisAccessControlProviderFactoryand its resources.- Throws:
RepositoryException- if an error occurs.
-
createProvider
AccessControlProvider createProvider(Session systemSession, WorkspaceSecurityConfig config) throws RepositoryException
Creates an AccessControlProvider for the workspace of the given system session. If the passed configuration isnullor does not have a provider entry, this factory must create a default provider. In any case the provider must be initialized before it is returned to the caller.- Parameters:
systemSession- the system session for the workspace theAccessControlProvidershould be created for.config- The security configuration for that workspace ornullif no config entry is present. In this case the factory must use its default. The configuration is used to determine the implementation ofAccessControlProviderto be used and to retrieve eventual configuration parameters.- Returns:
- a new, initialized AccessControlProvider.
- Throws:
RepositoryException- if an error occurs
-
-