|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.portals.graffito.store.impl.AbstractGraffitoStore org.apache.portals.graffito.store.impl.ojb.GraffitoOJBStore
public class GraffitoOJBStore
Implementation for an OJB (Persistence Broker) Store
Field Summary |
---|
Fields inherited from class org.apache.portals.graffito.store.impl.AbstractGraffitoStore |
---|
cmsAccessController, log, scope |
Constructor Summary | |
---|---|
GraffitoOJBStore(org.apache.portals.graffito.model.server.Server server,
CmsAccessController cmsAccessController)
Constructor based on the a server object. |
Method Summary | |
---|---|
void |
close()
Close the connection to this store |
void |
delete(java.lang.Object object)
Delete any kind of object (CmsObject, Server, HistoryElement, ...) |
void |
deleteAll(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Delete all object matching to a query |
java.util.Collection |
getChildren(java.lang.String parentUri)
Get cms object childen found in a folder. |
org.apache.portals.graffito.model.core.CmsObject |
getCmsObject(java.lang.String uri)
Get a cms object |
java.util.Collection |
getCollectionByQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get collection of object matching to a query |
java.util.Collection |
getContents(java.lang.String parentUri)
Get contents found in a parent folder. |
java.util.Collection |
getFolders(java.lang.String parentUri)
Get folders found in a parent folder. |
org.apache.portals.graffito.model.core.HistoryElement |
getHistory(org.apache.portals.graffito.model.core.VersionnedContent content)
Get the version history element defined from a content. |
java.util.Iterator |
getIteratorByQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get an iterator of object matching to a query |
java.util.Collection |
getLinks(java.lang.String parentUri)
Get links found in a parent folder. |
java.lang.Object |
getObjectByQuery(java.lang.Class clazz,
org.apache.portals.graffito.services.search.Filter filter)
Get an object matching to a query |
java.lang.String |
getScope()
Get the content store scope |
void |
insert(java.lang.Object object)
Insert a new object in the content store |
void |
insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement historyElement)
Add a new history element |
boolean |
isClosed()
Check if the connection to this store is closed |
org.apache.portals.graffito.services.search.Filter |
newFilter()
Instantiate a new empty filter object |
void |
setOjbFactory(OjbFactory ojbFactory)
Initialise the Ojb factory to use with this PB content store. |
void |
update(java.lang.Object object)
Update a new object in the content store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraffitoOJBStore(org.apache.portals.graffito.model.server.Server server, CmsAccessController cmsAccessController) throws org.apache.portals.graffito.exception.CmsInstantiateException
server
- The server object contains all information to connect to this
content storecmsAccessController
- The CmsAccesController used to check the permissions
org.apache.portals.graffito.exception.CmsInstantiateException
- when it is not possible to instantiate this storeMethod Detail |
---|
public org.apache.portals.graffito.model.core.CmsObject getCmsObject(java.lang.String uri) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getCmsObject
in interface ContentStore
uri
- The cms object uri
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getCmsObject(String)
public java.util.Collection getChildren(java.lang.String parentUri) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getChildren
in interface ContentStore
parentUri
- The parent folder uri from which the cms objects have to be retrieved
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getChildren(java.lang.String)
public java.util.Collection getLinks(java.lang.String parentUri) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getLinks
in interface ContentStore
parentUri
- The parent folder uri from which the links have to be retrieved
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getLinks(java.lang.String)
public java.util.Collection getContents(java.lang.String parentUri) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getContents
in interface ContentStore
parentUri
- The parent folder uri from which the contents have to be retrieved
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getContents(java.lang.String)
public java.util.Collection getFolders(java.lang.String parentUri) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getFolders
in interface ContentStore
parentUri
- The parent folder uri from which the folders have to be retrieved
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getFolders(java.lang.String)
public org.apache.portals.graffito.model.core.HistoryElement getHistory(org.apache.portals.graffito.model.core.VersionnedContent content) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
HistoryElement.getPrevious()
getHistory
in interface ContentStore
content
- The versionned content for which the version history has be found
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.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
ContentStore
insertHistoryElement
in interface ContentStore
ContentPersistenceException
- when it is not possible to insert the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.insertHistoryElement(org.apache.portals.graffito.model.core.HistoryElement)
public org.apache.portals.graffito.services.search.Filter newFilter()
ContentStore
newFilter
in interface ContentStore
ContentStore.newFilter()
public java.lang.Object getObjectByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
getObjectByQuery
in interface ContentStore
clazz
- The class on which the query has to be exexutedfilter
- The filter used by the query
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.getObjectByQuery(Class,
Filter)
public java.util.Collection getCollectionByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter)
ContentStore
getCollectionByQuery
in interface ContentStore
clazz
- The class on which the query has to be exexutedfilter
- The filter used by the query
CmsObject
ContentStore.getCollectionByQuery(Class,
Filter)
public java.util.Iterator getIteratorByQuery(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter)
ContentStore
getIteratorByQuery
in interface ContentStore
clazz
- The class on which the query has to be exexutedfilter
- The filter used by the query
CmsObject
ContentStore.getIteratorByQuery(Class,
Filter)
public void delete(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
delete
in interface ContentStore
object
- The object to delete
ContentPersistenceException
- when it is not possible to delete the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.delete(Object)
public void deleteAll(java.lang.Class clazz, org.apache.portals.graffito.services.search.Filter filter) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
deleteAll
in interface ContentStore
clazz
- The class on which the query has to be exexutedfilter
- The filter used by the query
ContentPersistenceException
- when it is not possible to delete the objects
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.deleteAll(Class, Filter)
public void insert(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
insert
in interface ContentStore
object
- The object to insert
ContentPersistenceException
- when it is not possible to insert the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.insert(java.lang.Object)
public void update(java.lang.Object object) throws ContentPersistenceException, org.apache.portals.graffito.exception.CmsPermissionException
ContentStore
update
in interface ContentStore
object
- The object to update
ContentPersistenceException
- when it is not possible to update the object
org.apache.portals.graffito.exception.CmsPermissionException
- when the user has not suffisiant privilegesContentStore.update(java.lang.Object)
public boolean isClosed()
ContentStore
isClosed
in interface ContentStore
ContentStore.isClosed()
public void close()
ContentStore
close
in interface ContentStore
ContentStore.close()
public java.lang.String getScope()
ContentStore
getScope
in interface ContentStore
ContentStore.getScope()
public void setOjbFactory(OjbFactory ojbFactory)
ojbFactory
- The ojbFactory to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |