Class PermissionCacheFactory
java.lang.Object
org.eclipse.net4j.util.factory.Factory
org.eclipse.emf.cdo.server.spi.security.PermissionCacheFactory
- All Implemented Interfaces:
org.eclipse.net4j.util.factory.IFactory,org.eclipse.net4j.util.factory.IFactoryKeyAware
- Direct Known Subclasses:
PermissionCacheFactory.Default
public abstract class PermissionCacheFactory
extends org.eclipse.net4j.util.factory.Factory
A managed-container factory for
PermissionCache.Creator products.
The product description is qualified with the name of the repository whose SecurityManager resolves the
creator. This keeps creators configured for different repositories from being shared accidentally. The optional
description after the repository name is passed to the implementation as implementation-specific configuration.
- Since:
- 4.13
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilt-in bounded, LRU-like permission-cache creator factory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe managed-container product group for permission-cache creator factories.static final StringRepository property supplying implementation-specific permission-cache creator configuration.static final StringRepository property selecting the permission-cache creator factory type.Fields inherited from class org.eclipse.net4j.util.factory.Factory
NO_DESCRIPTION -
Constructor Summary
ConstructorsConstructorDescriptionPermissionCacheFactory(String type) Creates a factory for the given managed-container product type. -
Method Summary
Modifier and TypeMethodDescriptionfinal PermissionCache.CreatorCreates a creator from a repository-qualified product description.protected abstract PermissionCache.CreatorCreates a creator for the named repository with implementation-specific configuration.static PermissionCache.Creatorget(org.eclipse.net4j.util.container.IManagedContainer container, String type, String qualifiedDescription) Resolves a creator using a complete repository-qualified managed-container product description.static PermissionCache.Creatorget(org.eclipse.net4j.util.container.IManagedContainer container, String type, IRepository repository, String description) Resolves a creator using the repository name and an optional implementation-specific description.Methods inherited from class org.eclipse.net4j.util.factory.Factory
getDescriptionFor, getFactoryKey, getKey, getProductGroup, getType, productCreationException, productCreationException, setFactoryKey, toString
-
Field Details
-
PRODUCT_GROUP
The managed-container product group for permission-cache creator factories.- See Also:
-
PROP_TYPE
Repository property selecting the permission-cache creator factory type.- See Also:
-
PROP_DESCRIPTION
Repository property supplying implementation-specific permission-cache creator configuration.- See Also:
-
-
Constructor Details
-
PermissionCacheFactory
Creates a factory for the given managed-container product type.- Parameters:
type- the product type registered inPRODUCT_GROUP
-
-
Method Details
-
create
public final PermissionCache.Creator create(String description) throws org.eclipse.net4j.util.factory.ProductCreationException Creates a creator from a repository-qualified product description.The part before the first colon identifies the repository; the remaining part, if any, is passed to
create(String, String)as implementation-specific configuration.- Parameters:
description- the repository name, optionally followed by a colon and implementation-specific description- Returns:
- a creator for the named repository
- Throws:
org.eclipse.net4j.util.factory.ProductCreationException- if the creator cannot be created
-
create
protected abstract PermissionCache.Creator create(String repositoryName, String description) throws org.eclipse.net4j.util.factory.ProductCreationException Creates a creator for the named repository with implementation-specific configuration.- Parameters:
repositoryName- the name of the repository whoseSecurityManagerresolves this factorydescription- implementation-specific configuration, ornullwhen none was supplied- Returns:
- the creator for the repository
- Throws:
org.eclipse.net4j.util.factory.ProductCreationException- if the creator cannot be created
-
get
public static PermissionCache.Creator get(org.eclipse.net4j.util.container.IManagedContainer container, String type, IRepository repository, String description) Resolves a creator using the repository name and an optional implementation-specific description.- Parameters:
container- the managed container that owns the factorytype- the factory type inPRODUCT_GROUPrepository- the repository whose creator is being resolveddescription- implementation-specific configuration, ornullwhen none was supplied- Returns:
- the creator returned by the selected factory
-
get
public static PermissionCache.Creator get(org.eclipse.net4j.util.container.IManagedContainer container, String type, String qualifiedDescription) Resolves a creator using a complete repository-qualified managed-container product description.- Parameters:
container- the managed container that owns the factorytype- the factory type inPRODUCT_GROUPqualifiedDescription- the repository name, optionally followed by implementation-specific configuration- Returns:
- the creator returned by the selected factory
-