Implementing a Provider for arbitrary Repository Technologies

Infinity allows to use federated document repositories as described in chapter Federated Document Repositories in the Concepts part.

A repository provider is provided to allow implementing arbitrary repository technologies.

The Repository Provider Interface

By implementing the IRepositoryProvider service provider interface and registering it via the ServiceLocator contract at META-INF/services/org.eclipse.stardust.engine.core.spi.dms.IRepositoryProvider$Factory new Providers can be supplied.

@SPI(status = Status.Experimental, useRestriction = UseRestriction.Public)
public interface IRepositoryProvider
{

   public interface Factory
   {
      IRepositoryProvider getInstance();
   }

   public String getProviderId();

   public List<IRepositoryConfiguration> getDefaultConfigurations();

   public IRepositoryInstance createInstance(IRepositoryConfiguration configuration,
         String partitionId);

   public void destroyInstance(IRepositoryInstance instance);

   public IRepositoryProviderInfo getProviderInfo();

}

This SPI allows to implement the IRepositoryProvider as an access layer for arbitrary repository technologies.

General Design

Life Cycle

The IRepositoryProvider is loaded as part of the SPI contract.

An IRepositoryInstance is usually located via a distinct URL or jndiName and is created and destroyed at runtime using the following methods:

An IRepositoryService usually represents a session on the IRepositoryInstance and contains all methods needed for repository operations.

Default Instances

If a configuration is supplied via getDefaultConfigurations(), the repository instances are created after the provider is loaded. getDefaultConfigurations() returns a list of repository configurations that should be used to implicitly create repository instances.

Example Implementation