|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.portals.graffito.persistence.impl.ContentPersistenceServiceImpl
public class ContentPersistenceServiceImpl
Default implementation for
org.apache.portals.graffito.persistenceService.ContentPersistenceService
Field Summary |
---|
Fields inherited from interface org.apache.portals.graffito.persistence.ContentPersistenceService |
---|
CONTENT, DOCUMENT, FILE_SYSTEM_SERVER, FOLDER, GRAFFITO_SERVER, HISTPORY, LINK, VERSIONNED_CONTENT, WEBDAV_SERVER |
Constructor Summary | |
---|---|
ContentPersistenceServiceImpl(org.apache.portals.graffito.model.server.Server graffitoMasterServer,
ContentStoreService contentStoreService)
Constructor. |
Method Summary | |
---|---|
java.lang.Object |
createObject(java.lang.String omName)
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 uri)
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 parentUri)
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 versionNumber)
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 persistenceStoreName)
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, ...) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContentPersistenceServiceImpl(org.apache.portals.graffito.model.server.Server graffitoMasterServer, ContentStoreService contentStoreService)
graffitoMasterServer
- the Graffito Master Server.contentStoreService
- The content store service used by this persistenceService storeMethod Detail |
---|
public java.lang.Object createObject(java.lang.String omName) throws org.apache.portals.graffito.exception.CmsInstantiateException
ContentPersistenceService
createObject
in interface ContentPersistenceService
omName
- The object interface name
org.apache.portals.graffito.exception.CmsInstantiateException
- when the cms object instance can't be createdContentPersistenceService.createObject(java.lang.String)
public void insert(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
insert
in interface ContentPersistenceService
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 privilegesContentPersistenceService.insert(java.lang.Object)
public void update(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
update
in interface ContentPersistenceService
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 privilegesContentPersistenceService.update(java.lang.Object)
public void delete(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
delete
in interface ContentPersistenceService
object
- the object to be delete
ContentPersistenceException
- unknown object or system error
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentPersistenceService.delete(java.lang.Object)
public void delete(java.lang.String uri) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
delete
in interface ContentPersistenceService
uri
- 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 privilegesorg.apache.portals.graffito.persistenceService.ContentPersistenceService#delete(java.lang.String)
public void deleteAll(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
deleteAll
in interface ContentPersistenceService
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.persistenceService.ContentPersistenceService#deleteAll(Class,
Filter)
public org.apache.portals.graffito.model.core.CmsObject getCmsObject(java.lang.String uri) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
getCmsObject
in interface ContentPersistenceService
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 privilegesContentPersistenceService.getCmsObject(String)
public org.apache.portals.graffito.model.core.CmsObject getCmsObject(java.lang.String uri, java.lang.String versionNumber) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
getCmsObject
in interface ContentPersistenceService
uri
- object uriversionNumber
- 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 privilegesContentPersistenceService.getCmsObject(String, String)
public java.util.Collection getChildren(java.lang.String parentUri) throws ContentPersistenceException
ContentPersistenceService
getChildren
in interface ContentPersistenceService
parentUri
- 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 storeorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getChildren(java.lang.String)
public java.util.Collection getContents(java.lang.String uri) throws ContentPersistenceException
ContentPersistenceService
getContents
in interface ContentPersistenceService
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 storeorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getContents(java.lang.String)
public java.util.Collection getLinks(java.lang.String uri) throws ContentPersistenceException
ContentPersistenceService
getLinks
in interface ContentPersistenceService
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 storeorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getLinks(java.lang.String)
public java.util.Collection getFolders(java.lang.String uri) throws ContentPersistenceException
ContentPersistenceService
getFolders
in interface ContentPersistenceService
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 storeorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getFolders(java.lang.String)
public org.apache.portals.graffito.model.core.HistoryElement getHistory(org.apache.portals.graffito.model.core.VersionnedContent versionnedContent) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
HistoryElement.getPrevious()
getHistory
in interface ContentPersistenceService
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 privilegesorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getHistory(org.apache.portals.graffito.model.core.VersionnedContent)
public void insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement historyElement) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
insertHistoryElement
in interface ContentPersistenceService
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.persistenceService.ContentPersistenceService#insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement)
public org.apache.portals.graffito.services.search.Filter newFilter()
ContentPersistenceService
newFilter
in interface ContentPersistenceService
org.apache.portals.graffito.persistenceService.ContentPersistenceService#newFilter()
public java.util.Collection getCollectionByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException
ContentPersistenceService
getCollectionByQuery
in interface ContentPersistenceService
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.persistenceService.ContentPersistenceService#getCollectionByQuery(java.lang.Class, org.apache.portals.graffito.services.search.Filter)
public java.util.Iterator getIteratorByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException
ContentPersistenceService
getIteratorByQuery
in interface ContentPersistenceService
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.persistenceService.ContentPersistenceService#getIteratorByQuery(java.lang.Class, org.apache.portals.graffito.services.search.Filter)
public java.lang.Object getObjectbyQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
getObjectbyQuery
in interface ContentPersistenceService
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
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesorg.apache.portals.graffito.persistenceService.ContentPersistenceService#getObjectbyQuery(java.lang.Class, org.apache.portals.graffito.services.search.Filter)
public ContentStore getGraffitoMasterStore()
ContentPersistenceService
getGraffitoMasterStore
in interface ContentPersistenceService
ContentPersistenceService.getGraffitoMasterStore()
public ContentStore getStore(java.lang.String persistenceStoreName)
ContentPersistenceService
getStore
in interface ContentPersistenceService
persistenceStoreName
- Scope based uri path used to search a PersistencStore
ContentPersistenceService.getStore(String)
public org.apache.portals.graffito.model.server.Server getServer(java.lang.String scope) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentPersistenceService
getServer
in interface ContentPersistenceService
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 privilegesContentPersistenceService.getServer(String)
public void registerServer(org.apache.portals.graffito.model.server.Server server) throws org.apache.portals.graffito.exception.CmsPermissionException, org.apache.portals.graffito.exception.CmsIncorrectServerException
ContentPersistenceService
registerServer
in interface ContentPersistenceService
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 correctorg.apache.portals.graffito.persistenceService.ContentPersistenceService#registerServer(org.apache.portals.graffito.model.server.Server)
public void unRegisterServer(org.apache.portals.graffito.model.server.Server server) throws org.apache.portals.graffito.exception.CmsPermissionException, org.apache.portals.graffito.exception.CmsIncorrectServerException
ContentPersistenceService
unRegisterServer
in interface ContentPersistenceService
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 serverorg.apache.portals.graffito.persistenceService.ContentPersistenceService#unRegisterServer(org.apache.portals.graffito.model.server.Server)
public java.util.Collection getServers(boolean withMasterServer)
ContentPersistenceService
getServers
in interface ContentPersistenceService
withMasterServer
- If true the Graffito Master server will be in the server list
org.apache.portals.graffito.persistenceService.ContentPersistenceService#getServers(boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |