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

All Known Implementing Classes:
ObjectStoreImpl

public interface ObjectStore

Author:
Jens This is the interface an implementation must provide to store any kind of CMIS objects. The ObjectStore is the topmost container of all CMIS object that get persisted. It is comparable to a file system, one object store exists per repository id. The object store allows access objects by an id. In addition a object can be retrieved by path. Typically the object store owns the list of object ids and maintains the path hierarchy.

Method Summary
 void clear()
          Clear repository and remove all data.
 Document createDocument(String name)
          Create a document as initial step.
 Folder createFolder(String name)
          Create a folder as initial step.
 VersionedDocument createVersionedDocument(String name)
          Create a document that supports versions as initial step.
 void deleteObject(String objectId)
          Deletes an object from the store.
 List<StoredObject> getCheckedOutDocuments(String orderBy)
          Return a list of all documents that are checked out in the repository.
 StoredObject getObjectById(String folderId)
          get an object by its id
 StoredObject getObjectByPath(String path)
          return an object by path.
 long getObjectCount()
          For statistics: return the number of objects contained in the system
 Folder getRootFolder()
          Get the root folder of this object store
 

Method Detail

getRootFolder

Folder getRootFolder()
Get the root folder of this object store

Returns:
the root folder of this store

getObjectByPath

StoredObject getObjectByPath(String path)
return an object by path.

Parameters:
path - the path to the object
Returns:
the stored object with this path

getObjectById

StoredObject getObjectById(String folderId)
get an object by its id

Parameters:
folderId - the id of the object
Returns:
the object identified by this id

deleteObject

void deleteObject(String objectId)
Deletes an object from the store. For a folders the folder must be empty.

Parameters:
objectId -

createDocument

Document createDocument(String name)
Create a document as initial step. The document is created but still temporary It is not yet persisted and does not have an id yet. After this call additional actions can take place (like assigning properties and a type) before it is persisted.

Parameters:
name - name of the document
Returns:
document object

createFolder

Folder createFolder(String name)
Create a folder as initial step. The folder is created but still temporary It is not yet persisted and does not have an id yet. After this call additional actions can take place (like assigning properties and a type) before it is persisted.

Parameters:
name - name of the folder
Returns:
folder object

createVersionedDocument

VersionedDocument createVersionedDocument(String name)
Create a document that supports versions as initial step. The document is created but still temporary. It is not yet persisted and does not have an id yet. After this call additional actions can take place (like assigning properties and a type) before it is persisted.

Parameters:
name - name of the document
Returns:
versioned document object

getCheckedOutDocuments

List<StoredObject> getCheckedOutDocuments(String orderBy)
Return a list of all documents that are checked out in the repository.

Parameters:
orderBy - orderBy specification according to CMIS spec.
Returns:
list of checked out documents in the repository

clear

void clear()
Clear repository and remove all data.


getObjectCount

long getObjectCount()
For statistics: return the number of objects contained in the system

Returns:
number of stored objects


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