it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl
Class StoreManagerImpl_OLD

java.lang.Object
  extended by it.sistematica.isharedoc.opencmis.indatabase.storedobj.impl.StoreManagerImpl_OLD
All Implemented Interfaces:
StoreManager

public class StoreManagerImpl_OLD
extends java.lang.Object
implements StoreManager

factory to create objects that are stored in the InMemory store

Author:
Jens

Field Summary
protected  DocumentManager documentManager
           
protected  it.neverworks.data.EntityManager entities
           
protected  org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory fObjectFactory
           
protected  org.apache.chemistry.opencmis.commons.data.RepositoryInfo fRepositoryInfo
           
protected  SearchService searchService
           
protected  java.lang.String typeCreatorClassName
           
protected  CmisServiceValidator validator
           
 
Constructor Summary
StoreManagerImpl_OLD()
           
 
Method Summary
 void clearTypeSystem(java.lang.String repositoryId)
           
 void createAndInitRepository(java.lang.String repositoryId, java.lang.String typeCreatorClassName)
          create a new repository with the given id.
 java.util.List<java.lang.String> getAllRepositoryIds()
          return a list of all available repositories
 it.neverworks.data.EntityManager getEntities()
           
 org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory getObjectFactory()
          Retrieve a factory to create CMIS data structures used as containers
 ObjectStore getObjectStore(java.lang.String repositoryId)
          get the object store for the given repository id.
 org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo(java.lang.String repositoryId)
          Retrieve the repository information for a repository
 java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getRootTypes(java.lang.String repositoryId, boolean includePropertyDefinitions)
          Retrieve a list of root types in the repositories.
 SearchService getSearchService()
           
 CmisServiceValidator getServiceValidator()
          get a permission and parameter validating instance
 ObjectStoreImpl getStore(java.lang.String repositoryId)
           
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer getTypeById(java.lang.String repositoryId, java.lang.String typeId)
          Retrieve a type definition for a give repository and type id
 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer getTypeById(java.lang.String repositoryId, java.lang.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
 java.util.Collection<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDefinitionList(java.lang.String repositoryId, boolean includePropertyDefinitions)
          retrieve a list with all type definitions.
 TypeManagerCreatable getTypeManager(java.lang.String repositoryId)
          retrieve the type manager for a given repository
 TypeManagerCreatable getTypeManager(java.lang.String repositoryId, StoredObject so)
           
 it.neverworks.application.service.UserInfo getUserInfo()
           
 void initRepository(java.lang.String repositoryId, java.lang.String typeCreatorClassName)
          Initialize the store for the given repository.
 void initRepositoryInfo(java.lang.String repositoryId, java.lang.String repoInfoCreatorClassName)
           
 java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinition> initTypeSystem(java.lang.String typeCreatorClassName)
           
 org.apache.chemistry.opencmis.commons.data.ObjectList query(java.lang.String user, java.lang.String repositoryId, java.lang.String statement, java.lang.Boolean searchAllVersions, java.lang.Boolean includeAllowableActions, org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships, java.lang.String renditionFilter, java.math.BigInteger maxItems, java.math.BigInteger skipCount)
          Execute a query against the repository (same parameter as the discovery service query method
 void setDocumentManager(DocumentManager documentManager)
          Set the document manager.
 void setEntities(it.neverworks.data.EntityManager entities)
          Set the entity manager.
 void setSearchService(SearchService searchService)
          Set the searchService.
 void startManager()
          return a list of all available repositories
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fObjectFactory

protected final org.apache.chemistry.opencmis.commons.spi.BindingsObjectFactory fObjectFactory

fRepositoryInfo

protected org.apache.chemistry.opencmis.commons.data.RepositoryInfo fRepositoryInfo

validator

protected CmisServiceValidator validator

entities

protected it.neverworks.data.EntityManager entities

documentManager

protected DocumentManager documentManager

searchService

protected SearchService searchService

typeCreatorClassName

protected java.lang.String typeCreatorClassName
Constructor Detail

StoreManagerImpl_OLD

public StoreManagerImpl_OLD()
Method Detail

getStore

public ObjectStoreImpl getStore(java.lang.String repositoryId)

getUserInfo

public it.neverworks.application.service.UserInfo getUserInfo()
Specified by:
getUserInfo in interface StoreManager

getEntities

public it.neverworks.data.EntityManager getEntities()
Specified by:
getEntities in interface StoreManager

setEntities

public void setEntities(it.neverworks.data.EntityManager entities)
Description copied from interface: StoreManager
Set the entity manager.

Specified by:
setEntities in interface StoreManager
Parameters:
entities - reference to entity manager

getSearchService

public SearchService getSearchService()
Specified by:
getSearchService in interface StoreManager

setSearchService

public void setSearchService(SearchService searchService)
Description copied from interface: StoreManager
Set the searchService.

Specified by:
setSearchService in interface StoreManager
Parameters:
searchService - reference to searchService

setDocumentManager

public void setDocumentManager(DocumentManager documentManager)
Description copied from interface: StoreManager
Set the document manager.

Specified by:
setDocumentManager in interface StoreManager
Parameters:
documentManager - reference to document manager

startManager

public void startManager()
Description copied from interface: StoreManager
return a list of all available repositories

Specified by:
startManager in interface StoreManager

getAllRepositoryIds

public java.util.List<java.lang.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(java.lang.String repositoryId,
                           java.lang.String typeCreatorClassName)
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
typeCreatorClassName - class implementing the type creation, the class must implement the interface TypeCreator

createAndInitRepository

public void createAndInitRepository(java.lang.String repositoryId,
                                    java.lang.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(java.lang.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 org.apache.chemistry.opencmis.commons.spi.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 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer getTypeById(java.lang.String repositoryId,
                                                                                             java.lang.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 org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer getTypeById(java.lang.String repositoryId,
                                                                                             java.lang.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 java.util.Collection<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getTypeDefinitionList(java.lang.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

getRootTypes

public java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionContainer> getRootTypes(java.lang.String repositoryId,
                                                                                                              boolean includePropertyDefinitions)
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 org.apache.chemistry.opencmis.commons.data.RepositoryInfo getRepositoryInfo(java.lang.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(java.lang.String repositoryId)

initRepositoryInfo

public void initRepositoryInfo(java.lang.String repositoryId,
                               java.lang.String repoInfoCreatorClassName)

initTypeSystem

public java.util.List<org.apache.chemistry.opencmis.commons.definitions.TypeDefinition> initTypeSystem(java.lang.String typeCreatorClassName)

getTypeManager

public TypeManagerCreatable getTypeManager(java.lang.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

getTypeManager

public TypeManagerCreatable getTypeManager(java.lang.String repositoryId,
                                           StoredObject so)

query

public org.apache.chemistry.opencmis.commons.data.ObjectList query(java.lang.String user,
                                                                   java.lang.String repositoryId,
                                                                   java.lang.String statement,
                                                                   java.lang.Boolean searchAllVersions,
                                                                   java.lang.Boolean includeAllowableActions,
                                                                   org.apache.chemistry.opencmis.commons.enums.IncludeRelationships includeRelationships,
                                                                   java.lang.String renditionFilter,
                                                                   java.math.BigInteger maxItems,
                                                                   java.math.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: