org.apache.chemistry.opencmis.inmemory.storedobj.api
Interface StoreManager

All Known Implementing Classes:
StoreManagerImpl

public interface StoreManager

interface to a repository implementation. This interface is the entry point to a repository that can persist CMIS objects. Using this interface the type information can be retrieved or set, a repository can be created or for a given repository the store can be retrieved.

Author:
Jens

Method Summary
 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
 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.
 TypeManager getTypeManager(String repositoryId)
          retrieve the type manager for a given repository
 void initRepository(String repositoryId)
          Initialize the store for the given repository.
 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
 

Method Detail

getAllRepositoryIds

List<String> getAllRepositoryIds()
return a list of all available repositories

Returns:

initRepository

void initRepository(String repositoryId)
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.

Parameters:
repositoryId - id of repository to initialize
isCreated - true if the repository was just created and is initialized for the first time false if it existed before and is reloaded

getObjectStore

ObjectStore getObjectStore(String repositoryId)
get the object store for the given repository id.

Parameters:
repositoryId -
Returns:
the object store in which objects for this repository are stored.

getServiceValidator

CmisServiceValidator getServiceValidator()
get a permission and parameter validating instance

Returns:
validator and permission checker

createAndInitRepository

void createAndInitRepository(String repositoryId,
                             String typeCreatorClassName)
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

Parameters:
repositoryId - id of repository
typeCreatorClassName - class implementing the type creation, the class must implement the interface TypeCreator

getTypeDefinitionList

Collection<TypeDefinitionContainer> getTypeDefinitionList(String repositoryId,
                                                          boolean includePropertyDefinitions)
retrieve a list with all type definitions.

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

getTypeById

TypeDefinitionContainer getTypeById(String repositoryId,
                                    String typeId)
Retrieve a type definition for a give repository and type id

Parameters:
repositoryId - id of repository
typeId - id of type definition
Returns:
type definition

getTypeById

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

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

getObjectFactory

BindingsObjectFactory getObjectFactory()
Retrieve a factory to create CMIS data structures used as containers

Returns:
factory object

getRootTypes

List<TypeDefinitionContainer> getRootTypes(String repositoryId)
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

Parameters:
repositoryId - id of repository
Returns:
list of root types

getRepositoryInfo

RepositoryInfo getRepositoryInfo(String repositoryId)
Retrieve the repository information for a repository

Parameters:
repositoryId - id of repository
Returns:
repository information

getTypeManager

TypeManager getTypeManager(String repositoryId)
retrieve the type manager for a given repository

Parameters:
repositoryId - id of repository
Returns:
type manager for this repository or null if repository is unknown

query

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

Parameters:
user -
repositoryId -
statement -
searchAllVersions -
includeAllowableActions -
includeRelationships -
renditionFilter -
maxItems -
skipCount -
Returns:


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