|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentPersistenceService
Cms Persistence Service. The persistenceService service manages a set of content stores and dispatch all requests to thoses stores. By default, there is a Master Graffito Store and different content stores. The Master Graffito Store contains all content stores references and if needed some cms objects like documents & folders. When a service like the ContentModelService send a request to do on a cms object, the persistenceService service try to find the correct content store and send it the request.
Field Summary | |
---|---|
static java.lang.String |
CONTENT
Content Interface name - use to instantiate CmsOjbect |
static java.lang.String |
DOCUMENT
Content Interface name - use to instantiate CmsOjbect |
static java.lang.String |
FILE_SYSTEM_SERVER
File System Store Interface name - use to instantiate FileSystem Server reference |
static java.lang.String |
FOLDER
Folder Interface name - use to instantiate CmsOjbect |
static java.lang.String |
GRAFFITO_SERVER
Graffito Store Interface name - use to instantiate GraffitoServer reference |
static java.lang.String |
HISTPORY
Hisotry Interface name - use to instantiate a version history element |
static java.lang.String |
LINK
Link Interface name - use to instantiate CmsOjbect |
static java.lang.String |
VERSIONNED_CONTENT
Content Interface name - use to instantiate CmsOjbect |
static java.lang.String |
WEBDAV_SERVER
Webdav Server Interface name - use to instantiate Webdav server reference |
Method Summary | |
---|---|
java.lang.Object |
createObject(java.lang.String objectName)
Factory method to create cms objects. |
void |
delete(java.lang.Object object)
Delete any kind of object from a persistenceService store (CmsObject, Server, ...) . |
void |
delete(java.lang.String cmsObjectUri)
Delete a CmsObject |
void |
deleteAll(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Delete several objects from a persistenceService store. |
java.util.Collection |
getChildren(java.lang.String uri)
Get all cms objects (documents & folders) found in an parent uri. |
org.apache.portals.graffito.model.core.CmsObject |
getCmsObject(java.lang.String uri)
Get a cms object from the persistent store depending on an uri. |
org.apache.portals.graffito.model.core.CmsObject |
getCmsObject(java.lang.String uri,
java.lang.String versionNum)
Get a cms object from the persistent store depending on an uri and a version number. |
java.util.Collection |
getCollectionByQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get a collection of objects (CmsObject, Server, HistoryElement, ...) from the persistenceService store. |
java.util.Collection |
getContents(java.lang.String uri)
Get contents found in a parent uri. |
java.util.Collection |
getFolders(java.lang.String uri)
Get folders found in a parent uri. |
ContentStore |
getGraffitoMasterStore()
Get a persistenceService store associated to a scope. |
org.apache.portals.graffito.model.core.HistoryElement |
getHistory(org.apache.portals.graffito.model.core.VersionnedContent versionnedContent)
Get the version history element defined from a versionned content. |
java.util.Iterator |
getIteratorByQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get an iterator of objects (CmsObject, Server, HistoryElement, ...) from the persistenceService store. |
java.util.Collection |
getLinks(java.lang.String uri)
Get links found in a parent uri. |
java.lang.Object |
getObjectbyQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get a cms related object from the persistent store (can be a document, a folder or Server, ...). |
org.apache.portals.graffito.model.server.Server |
getServer(java.lang.String scope)
Get a server reference based on the scope |
java.util.Collection |
getServers(boolean withMasterServer)
Get all registered servers |
ContentStore |
getStore(java.lang.String scope)
Get a content store associated to a scope. |
void |
insert(java.lang.Object object)
Insert any kind of object (CmsObject, Server, HistoryElement, ...) |
void |
insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement historyElement)
Add a new history element |
org.apache.portals.graffito.services.search.Filter |
newFilter()
Instantiate a new filter object. |
void |
registerServer(org.apache.portals.graffito.model.server.Server server)
Add a new Server reference into the content tree. |
void |
unRegisterServer(org.apache.portals.graffito.model.server.Server server)
Drop a server from the content tree |
void |
update(java.lang.Object object)
Update any kind of object (CmsObject, Server, HistoryElement, ...) |
Field Detail |
---|
static final java.lang.String FOLDER
static final java.lang.String CONTENT
static final java.lang.String VERSIONNED_CONTENT
static final java.lang.String DOCUMENT
static final java.lang.String HISTPORY
static final java.lang.String LINK
static final java.lang.String WEBDAV_SERVER
static final java.lang.String GRAFFITO_SERVER
static final java.lang.String FILE_SYSTEM_SERVER
Method Detail |
---|
java.lang.Object createObject(java.lang.String objectName) throws org.apache.portals.graffito.exception.CmsInstantiateException
objectName
- The object interface name
org.apache.portals.graffito.exception.CmsInstantiateException
- when the cms object instance can't be createdvoid insert(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
object
- The object to be inserted
ContentPersistenceException
- when it is not possible to insert the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesvoid update(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
object
- The object to be updated.
ContentPersistenceException
- when it is not possible to insert the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesvoid delete(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
object
- the object to be delete
ContentPersistenceException
- unknown object or system error
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesvoid delete(java.lang.String cmsObjectUri) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
cmsObjectUri
- The uri of the cms object to delete
ContentPersistenceException
- unknown object or system error
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesvoid deleteAll(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
clazz
- The class on wich the filter has to be executedfilter
- Filter used to select the object to delete
ContentPersistenceException
- unknown object or system error
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesorg.apache.portals.graffito.services.search.Filter newFilter()
java.lang.Object getObjectbyQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
clazz
- Class or interface used for the filter. Represent the extend to be searchfilter
- used to retrieve the cms object.The criteria should provide only one object
ContentPersistenceException
- when it is not possible to find the associated store
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesorg.apache.portals.graffito.model.core.CmsObject getCmsObject(java.lang.String uri) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
uri
- Object uri
ContentPersistenceException
- when it is not possible to find the associated store
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesorg.apache.portals.graffito.model.core.CmsObject getCmsObject(java.lang.String uri, java.lang.String versionNum) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
uri
- object uriversionNum
- The document version number
ContentPersistenceException
- when it is not possible to find the associated store
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesjava.util.Collection getChildren(java.lang.String uri) throws ContentPersistenceException
uri
- The parent folder uri from which the cms objects have to be retrieved. it can be a server scope or a folder uri.
ContentPersistenceException
- when it is not possible to find the associated storejava.util.Collection getFolders(java.lang.String uri) throws ContentPersistenceException
uri
- The parent folder uri from which the folders have to be retrieved. it can be a server scope or a parent folder uri.
ContentPersistenceException
- when it is not possible to find the associated storejava.util.Collection getContents(java.lang.String uri) throws ContentPersistenceException
uri
- The parent folder uri from which the contents have to be retrieved. it can be a server scope or a parent folder uri.
ContentPersistenceException
- when it is not possible to find the associated storejava.util.Collection getLinks(java.lang.String uri) throws ContentPersistenceException
uri
- The parent folder uri from which the links have to be retrieved. it can be a server scope or a parent folder uri.
ContentPersistenceException
- when it is not possible to find the associated storevoid insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement historyElement) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
historyElement
-
ContentPersistenceException
- when it is not possible to insert the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesorg.apache.portals.graffito.model.core.HistoryElement getHistory(org.apache.portals.graffito.model.core.VersionnedContent versionnedContent) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
HistoryElement.getPrevious()
versionnedContent
- The content for which the history has to be retrieved
ContentPersistenceException
- when it is not possible to find the store associated to the associated document
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesjava.util.Collection getCollectionByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException
clazz
- Class or interface used for the filter. Represent the extend to be searchfilter
- used to retrieve the cms object.The criteria should provide only one object
ContentPersistenceException
- when it is not possible to find the associated storejava.util.Iterator getIteratorByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException
clazz
- Class or interface used for the filter. Represent the extend to be searchfilter
- used to retrieve the cms object.The criteria should provide only one object
ContentPersistenceException
- when it is not possible to find the associated storeorg.apache.portals.graffito.model.server.Server getServer(java.lang.String scope) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
scope
- the scope associated to the server to search. The scope is an uri prefix like "/myserver"
ContentPersistenceException
- when it is not possible to find the associated store
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesvoid registerServer(org.apache.portals.graffito.model.server.Server server) throws org.apache.portals.graffito.exception.CmsPermissionException, org.apache.portals.graffito.exception.CmsIncorrectServerException
server
- the server to add into the content tree
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privileges
org.apache.portals.graffito.exception.CmsIncorrectServerException
- when the server is not correctvoid unRegisterServer(org.apache.portals.graffito.model.server.Server server) throws org.apache.portals.graffito.exception.CmsPermissionException, org.apache.portals.graffito.exception.CmsIncorrectServerException
server
- the server to remove from tne content tree
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privileges
org.apache.portals.graffito.exception.CmsIncorrectServerException
- when it is not possible to unregister the serverjava.util.Collection getServers(boolean withMasterServer) throws org.apache.portals.graffito.exception.CmsPermissionException
withMasterServer
- If true the Graffito Master server will be in the server list
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore getStore(java.lang.String scope) throws ContentPersistenceException
scope
- Scope based uri path used to search a PersistencStore
ContentPersistenceException
- when it is not possible to find the associated storeContentStore getGraffitoMasterStore() throws ContentPersistenceException
ContentPersistenceException
- when it is not possible to find the associated store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |