org.broadleafcommerce.openadmin.server.service.handler
Interface CustomPersistenceHandler

All Known Implementing Classes:
AdminPermissionCustomPersistenceHandler, AdminRoleCustomPersistenceHandler, AdminUserCustomPersistenceHandler, CustomPersistenceHandlerAdapter

public interface CustomPersistenceHandler

Custom Persistence Handlers provide a hook to override the normal persistence behavior of the admin application. This is useful when an alternate pathway for working with persisted data is desirable. For example, if you want to work directly with a service API, rather than go through the standard admin persistence pipeline. In such a case, you can use Spring to inject an instance of your service into your custom persistence handler and utilize that service to work with your entity. The implementation is responsible for converting domain object into the return type required by the admin. Helper classes are passed in to assist with conversion operations.

Author:
Jeff Fischer

Method Summary
 Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 Boolean canHandleAdd(PersistencePackage persistencePackage)
          Is this persistence handler capable of dealing with an add request from the admin
 Boolean canHandleFetch(PersistencePackage persistencePackage)
          Is this persistence handler capable of dealing with an fetch request from the admin
 Boolean canHandleInspect(PersistencePackage persistencePackage)
          Is this persistence handler capable of dealing with an inspect request from the admin
 Boolean canHandleRemove(PersistencePackage persistencePackage)
          Is this persistence handler capable of dealing with a remove request from the admin
 Boolean canHandleUpdate(PersistencePackage persistencePackage)
          Is this persistence handler capable of dealing with an update request from the admin
 DynamicResultSet fetch(PersistencePackage persistencePackage, com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper)
           
 void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 Boolean willHandleSecurity(PersistencePackage persistencePackage)
           
 

Method Detail

canHandleInspect

Boolean canHandleInspect(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an inspect request from the admin

Parameters:
persistencePackage - details about the inspect operation
Returns:
whether or not this handler supports inspects

canHandleFetch

Boolean canHandleFetch(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an fetch request from the admin

Parameters:
persistencePackage - details about the fetch operation
Returns:
whether or not this handler supports fetches

canHandleAdd

Boolean canHandleAdd(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an add request from the admin

Parameters:
persistencePackage - details about the add operation
Returns:
whether or not this handler supports adds

canHandleRemove

Boolean canHandleRemove(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with a remove request from the admin

Parameters:
persistencePackage - details about the remove operation
Returns:
whether or not this handler supports remove

canHandleUpdate

Boolean canHandleUpdate(PersistencePackage persistencePackage)
Is this persistence handler capable of dealing with an update request from the admin

Parameters:
persistencePackage - details about the update operation
Returns:
whether or not this handler supports updatess

willHandleSecurity

Boolean willHandleSecurity(PersistencePackage persistencePackage)

inspect

DynamicResultSet inspect(PersistencePackage persistencePackage,
                         DynamicEntityDao dynamicEntityDao,
                         InspectHelper helper)
                         throws ServiceException
Throws:
ServiceException

fetch

DynamicResultSet fetch(PersistencePackage persistencePackage,
                       com.anasoft.os.daofusion.cto.client.CriteriaTransferObject cto,
                       DynamicEntityDao dynamicEntityDao,
                       RecordHelper helper)
                       throws ServiceException
Throws:
ServiceException

add

Entity add(PersistencePackage persistencePackage,
           DynamicEntityDao dynamicEntityDao,
           RecordHelper helper)
           throws ServiceException
Throws:
ServiceException

remove

void remove(PersistencePackage persistencePackage,
            DynamicEntityDao dynamicEntityDao,
            RecordHelper helper)
            throws ServiceException
Throws:
ServiceException

update

Entity update(PersistencePackage persistencePackage,
              DynamicEntityDao dynamicEntityDao,
              RecordHelper helper)
              throws ServiceException
Throws:
ServiceException


Copyright © 2013. All Rights Reserved.