org.apache.chemistry.opencmis.inmemory.storedobj.impl
Class StoreManagerImpl

java.lang.Object
  extended by org.apache.chemistry.opencmis.inmemory.storedobj.impl.StoreManagerImpl
All Implemented Interfaces:
StoreManager

public class StoreManagerImpl
extends Object
implements StoreManager

factory to create objects that are stored in the InMemory store

Author:
Jens

Field Summary
protected  BindingsObjectFactory fObjectFactory
           
protected  RepositoryInfo fRepositoryInfo
           
protected  CmisServiceValidator validator
           
 
Constructor Summary
StoreManagerImpl()
           
 
Method Summary
 void clearTypeSystem(String repositoryId)
           
 void createAndInitRepository(String repositoryId, String typeCreatorClassName)
          create a new repository with the given id.
 List<String> getAllRepositoryIds()
          return a list of all available repositories
 BindingsObjectFactory getObjectFactory()
          Retrieve a factory to create CMIS data structures used as containers
 ObjectStore getObjectStore(String repositoryId)
          get the object store for the given repository id.
 RepositoryInfo getRepositoryInfo(String repositoryId)
          Retrieve the repository information for a repository
 List<TypeDefinitionContainer> getRootTypes(String repositoryId)
          Retrieve a list of root types in the repositories.
 CmisServiceValidator getServiceValidator()
          get a permission and parameter validating instance
 ObjectStoreImpl getStore(String repositoryId)
           
 TypeDefinitionContainer getTypeById(String repositoryId, String typeId)
          Retrieve a type definition for a give repository and type id
 TypeDefinitionContainer getTypeById(String repositoryId, String typeId, boolean includePropertyDefinitions, int depth)
          Retrieve a type definition for a give repository and type id with or without property definitions and limited to depth in hierarchy
 Collection<TypeDefinitionContainer> getTypeDefinitionList(String repositoryId, boolean includePropertyDefinitions)
          retrieve a list with all type definitions.
 Map<String,TypeDefinitionContainer> getTypeDefinitionMap(String repositoryId)
           
 TypeManager getTypeManager(String repositoryId)
          retrieve the type manager for a given repository
 void initRepository(String repositoryId)
          Initialize the store for the given repository.
 void initRepositoryInfo(String repositoryId, String repoInfoCreatorClassName)
           
 List<TypeDefinition> initTypeSystem(String typeCreatorClassName)
           
 ObjectList query(String user, String repositoryId, String statement, Boolean searchAllVersions, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount)
          Execute a query against the repository (same parameter as the discovery service query method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fObjectFactory

protected final BindingsObjectFactory fObjectFactory

fRepositoryInfo

protected RepositoryInfo fRepositoryInfo

validator

protected CmisServiceValidator validator
Constructor Detail

StoreManagerImpl

public StoreManagerImpl()
Method Detail

getStore

public ObjectStoreImpl getStore(String repositoryId)

getAllRepositoryIds

public List<String> getAllRepositoryIds()
Description copied from interface: StoreManager
return a list of all available repositories

Specified by:
getAllRepositoryIds in interface StoreManager
Returns:

initRepository

public void initRepository(String repositoryId)
Description copied from interface: StoreManager
Initialize the store for the given repository. Only called for repositories that exist on startup (i.e. for each repository id returned in a previous getAllRepositoryIds() call.

Specified by:
initRepository in interface StoreManager
Parameters:
repositoryId - id of repository to initialize

createAndInitRepository

public void createAndInitRepository(String repositoryId,
                                    String typeCreatorClassName)
Description copied from interface: StoreManager
create a new repository with the given id. Create the repository, initiate the type system and initialize it so that it is ready for use

Specified by:
createAndInitRepository in interface StoreManager
Parameters:
repositoryId - id of repository
typeCreatorClassName - class implementing the type creation, the class must implement the interface TypeCreator

getObjectStore

public ObjectStore getObjectStore(String repositoryId)
Description copied from interface: StoreManager
get the object store for the given repository id.

Specified by:
getObjectStore in interface StoreManager
Returns:
the object store in which objects for this repository are stored.

getServiceValidator

public CmisServiceValidator getServiceValidator()
Description copied from interface: StoreManager
get a permission and parameter validating instance

Specified by:
getServiceValidator in interface StoreManager
Returns:
validator and permission checker

getObjectFactory

public BindingsObjectFactory getObjectFactory()
Description copied from interface: StoreManager
Retrieve a factory to create CMIS data structures used as containers

Specified by:
getObjectFactory in interface StoreManager
Returns:
factory object

getTypeById

public TypeDefinitionContainer getTypeById(String repositoryId,
                                           String typeId)
Description copied from interface: StoreManager
Retrieve a type definition for a give repository and type id

Specified by:
getTypeById in interface StoreManager
Parameters:
repositoryId - id of repository
typeId - id of type definition
Returns:
type definition

getTypeById

public TypeDefinitionContainer getTypeById(String repositoryId,
                                           String typeId,
                                           boolean includePropertyDefinitions,
                                           int depth)
Description copied from interface: StoreManager
Retrieve a type definition for a give repository and type id with or without property definitions and limited to depth in hierarchy

Specified by:
getTypeById in interface StoreManager
Parameters:
repositoryId - id of repository
typeId - id of type definition
includePropertyDefinitions - indicates whether to include property definitions in returned type
depth - limit depth of type hierarchy in return (-1 means unlimited)
Returns:
type definition

getTypeDefinitionList

public Collection<TypeDefinitionContainer> getTypeDefinitionList(String repositoryId,
                                                                 boolean includePropertyDefinitions)
Description copied from interface: StoreManager
retrieve a list with all type definitions.

Specified by:
getTypeDefinitionList in interface StoreManager
Parameters:
repositoryId - id of repository
includePropertyDefinitions - indicates whether to include property definitions in returned type
Returns:
map with type definition

getTypeDefinitionMap

public Map<String,TypeDefinitionContainer> getTypeDefinitionMap(String repositoryId)

getRootTypes

public List<TypeDefinitionContainer> getRootTypes(String repositoryId)
Description copied from interface: StoreManager
Retrieve a list of root types in the repositories. Root types are available by definition and need to to be created by a client. CMIS supports documents, folders, relations and policies as root types

Specified by:
getRootTypes in interface StoreManager
Parameters:
repositoryId - id of repository
Returns:
list of root types

getRepositoryInfo

public RepositoryInfo getRepositoryInfo(String repositoryId)
Description copied from interface: StoreManager
Retrieve the repository information for a repository

Specified by:
getRepositoryInfo in interface StoreManager
Parameters:
repositoryId - id of repository
Returns:
repository information

clearTypeSystem

public void clearTypeSystem(String repositoryId)

initRepositoryInfo

public void initRepositoryInfo(String repositoryId,
                               String repoInfoCreatorClassName)

initTypeSystem

public List<TypeDefinition> initTypeSystem(String typeCreatorClassName)

getTypeManager

public TypeManager getTypeManager(String repositoryId)
Description copied from interface: StoreManager
retrieve the type manager for a given repository

Specified by:
getTypeManager in interface StoreManager
Parameters:
repositoryId - id of repository
Returns:
type manager for this repository or null if repository is unknown

query

public ObjectList query(String user,
                        String repositoryId,
                        String statement,
                        Boolean searchAllVersions,
                        Boolean includeAllowableActions,
                        IncludeRelationships includeRelationships,
                        String renditionFilter,
                        BigInteger maxItems,
                        BigInteger skipCount)
Description copied from interface: StoreManager
Execute a query against the repository (same parameter as the discovery service query method

Specified by:
query in interface StoreManager
Returns:


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.