|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.surf.persister.AbstractObjectPersister
public abstract class AbstractObjectPersister
Abstract implementation of a model object persister. Provided to enable ease-of-extension by developers for customer object persisters. This class serves as a foundation and really only provides essential helper functions. Surf provides persister implementations that are largely file-based. Customizations may seek to incorporate persisters that interact with databases or Alfresco content models directly.
StoreObjectPersister,
CachedStoreObjectPersister| Field Summary | |
|---|---|
protected static Class[] |
MODELOBJECT_CLASSES
|
| Constructor Summary | |
|---|---|
AbstractObjectPersister()
|
|
| Method Summary | |
|---|---|
protected void |
disable()
Disables the persister |
String |
getId()
Returns a unique id for this persister If this persister is wrapped around a ClassPath store, a LocalFileSystem store or a Repository store, this will return the value provided getBasePath() If this is wrapped around a RemoteStore, this will return the AVM Store ID to which this persister is bound |
WebFrameworkServiceRegistry |
getServiceRegistry()
Gets the service registry. |
protected WebFrameworkConfigElement |
getWebFrameworkConfiguration()
Gets the configuration. |
protected WebFrameworkManager |
getWebFrameworkManager()
Gets the web framework manager. |
boolean |
hasObject(ModelPersistenceContext context,
ModelObject object)
Checks whether the given object is persisted |
void |
init(ModelPersistenceContext context)
Initializes the persister by preloading the object cache |
boolean |
isEnabled()
Indicates whether this persisted is currently enabled. |
boolean |
removeObject(ModelPersistenceContext context,
ModelObject object)
Removes an object from persisted storage |
void |
reset()
Resets the persister, clearing cache and starting anew. |
void |
setBeanName(String name)
|
void |
setServiceRegistry(WebFrameworkServiceRegistry serviceRegistry)
Sets the web framework service registry. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.springframework.extensions.surf.ModelObjectPersister |
|---|
getAllObjects, getAllObjectsByFilter, getObject, getTimestamp, hasObject, newObject, removeObject, saveObject |
| Field Detail |
|---|
protected static final Class[] MODELOBJECT_CLASSES
| Constructor Detail |
|---|
public AbstractObjectPersister()
| Method Detail |
|---|
public void setBeanName(String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setServiceRegistry(WebFrameworkServiceRegistry serviceRegistry)
serviceRegistry - the service registrypublic WebFrameworkServiceRegistry getServiceRegistry()
protected WebFrameworkConfigElement getWebFrameworkConfiguration()
protected WebFrameworkManager getWebFrameworkManager()
public void init(ModelPersistenceContext context)
ModelObjectPersister
init in interface ModelObjectPersistercontext - the persistence contextpublic void reset()
ModelObjectPersister
reset in interface ModelObjectPersister
public boolean removeObject(ModelPersistenceContext context,
ModelObject object)
throws ModelObjectPersisterException
ModelObjectPersister
removeObject in interface ModelObjectPersisterModelObjectPersisterException
public boolean hasObject(ModelPersistenceContext context,
ModelObject object)
throws ModelObjectPersisterException
ModelObjectPersister
hasObject in interface ModelObjectPersisterModelObjectPersisterExceptionpublic String getId()
ModelObjectPersister
getId in interface ModelObjectPersisterpublic boolean isEnabled()
ModelObjectPersister
isEnabled in interface ModelObjectPersisterprotected void disable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||