public abstract class AbstractObjectPersister extends Object implements ModelObjectPersister, org.springframework.beans.factory.BeanNameAware
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| Modifier and Type | Field and Description |
|---|---|
protected static Class<?>[] |
MODELOBJECT_CLASSES |
| Constructor and Description |
|---|
AbstractObjectPersister() |
| Modifier and Type | Method and Description |
|---|---|
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
|
protected PersisterService |
getPersisterService() |
WebFrameworkServiceRegistry |
getServiceRegistry()
Deprecated.
Please configure the Spring application context to set a PersisterService and WebFrameworkConfigElement explicitly
|
protected WebFrameworkConfigElement |
getWebFrameworkConfiguration() |
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 |
setPersisterService(PersisterService persisterService) |
void |
setServiceRegistry(WebFrameworkServiceRegistry serviceRegistry)
Deprecated.
Please configure the Spring application context to set a PersisterService and WebFrameworkConfigElement explicitly
|
void |
setWebFrameworkConfig(WebFrameworkConfigElement webFrameworkConfig) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAllObjects, getAllObjectsByFilter, getObject, getTimestamp, hasObject, hasReadOnlyStore, newObject, removeObject, saveObject, saveObjectsprotected static final Class<?>[] MODELOBJECT_CLASSES
public void setBeanName(String name)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void init(ModelPersistenceContext context)
ModelObjectPersisterinit in interface ModelObjectPersistercontext - the persistence contextpublic void reset()
ModelObjectPersisterreset in interface ModelObjectPersisterpublic boolean removeObject(ModelPersistenceContext context, ModelObject object) throws ModelObjectPersisterException
ModelObjectPersisterremoveObject in interface ModelObjectPersistercontext - ModelPersistenceContextobject - ModelObjectModelObjectPersisterExceptionpublic boolean hasObject(ModelPersistenceContext context, ModelObject object) throws ModelObjectPersisterException
ModelObjectPersisterhasObject in interface ModelObjectPersistercontext - ModelPersistenceContextobject - ModelObjectModelObjectPersisterExceptionpublic String getId()
ModelObjectPersistergetId in interface ModelObjectPersisterpublic boolean isEnabled()
ModelObjectPersisterisEnabled in interface ModelObjectPersisterprotected void disable()
public void setPersisterService(PersisterService persisterService)
public void setWebFrameworkConfig(WebFrameworkConfigElement webFrameworkConfig)
protected WebFrameworkConfigElement getWebFrameworkConfiguration()
protected PersisterService getPersisterService()
public void setServiceRegistry(WebFrameworkServiceRegistry serviceRegistry)
public WebFrameworkServiceRegistry getServiceRegistry()
Copyright © 2005–2016 Alfresco Software. All rights reserved.