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 Classes
    Modifier and Type
    Class
    Description
    static class 
    Built-in bounded, LRU-like permission-cache creator factory.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The managed-container product group for permission-cache creator factories.
    static final String
    Repository property supplying implementation-specific permission-cache creator configuration.
    static final String
    Repository property selecting the permission-cache creator factory type.

    Fields inherited from class org.eclipse.net4j.util.factory.Factory

    NO_DESCRIPTION
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a factory for the given managed-container product type.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String description)
    Creates a creator from a repository-qualified product description.
    protected abstract PermissionCache.Creator
    create(String repositoryName, String description)
    Creates a creator for the named repository with implementation-specific configuration.
    get(org.eclipse.net4j.util.container.IManagedContainer container, String type, String qualifiedDescription)
    Resolves a creator using a complete repository-qualified managed-container product description.
    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.

    Methods inherited from class org.eclipse.net4j.util.factory.Factory

    getDescriptionFor, getFactoryKey, getKey, getProductGroup, getType, productCreationException, productCreationException, setFactoryKey, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • PRODUCT_GROUP

      public static final String PRODUCT_GROUP
      The managed-container product group for permission-cache creator factories.
      See Also:
    • PROP_TYPE

      public static final String PROP_TYPE
      Repository property selecting the permission-cache creator factory type.
      See Also:
    • PROP_DESCRIPTION

      public static final String PROP_DESCRIPTION
      Repository property supplying implementation-specific permission-cache creator configuration.
      See Also:
  • Constructor Details

    • PermissionCacheFactory

      public PermissionCacheFactory(String type)
      Creates a factory for the given managed-container product type.
      Parameters:
      type - the product type registered in PRODUCT_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 whose SecurityManager resolves this factory
      description - implementation-specific configuration, or null when 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 factory
      type - the factory type in PRODUCT_GROUP
      repository - the repository whose creator is being resolved
      description - implementation-specific configuration, or null when 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 factory
      type - the factory type in PRODUCT_GROUP
      qualifiedDescription - the repository name, optionally followed by implementation-specific configuration
      Returns:
      the creator returned by the selected factory