org.broadleafcommerce.cms.admin.server.handler
Class StructuredContentTypeCustomPersistenceHandler

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
      extended by org.broadleafcommerce.cms.admin.server.handler.StructuredContentTypeCustomPersistenceHandler
All Implemented Interfaces:
CustomPersistenceHandler, DynamicEntityRetriever, org.springframework.core.Ordered

@Component(value="blStructuredContentTypeCustomPersistenceHandler")
public class StructuredContentTypeCustomPersistenceHandler
extends CustomPersistenceHandlerAdapter
implements DynamicEntityRetriever

Created by jfischer


Field Summary
protected  DynamicFieldPersistenceHandlerHelper dynamicFieldUtil
           
protected  StructuredContentService structuredContentService
           
 
Fields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDER
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
StructuredContentTypeCustomPersistenceHandler()
           
 
Method Summary
 Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
          Invoked when StructuredContent is saved in order to fill out the dynamic form for the structured content type
protected  Entity addOrUpdate(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 Boolean canHandleAdd(PersistencePackage persistencePackage)
           
 Boolean canHandleFetch(PersistencePackage persistencePackage)
           
 Boolean canHandleInspect(PersistencePackage persistencePackage)
           
 Boolean canHandleRemove(PersistencePackage persistencePackage)
           
 Boolean canHandleUpdate(PersistencePackage persistencePackage)
           
 DynamicResultSet fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
           
 Entity fetchDynamicEntity(Serializable root, List<String> dirtyFields, boolean includeId)
           
 Entity fetchEntityBasedOnId(String structuredContentId, List<String> dirtyFields)
           
 String getFieldContainerClassName()
           
 DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper)
           
 Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper)
          Invoked when StructuredContent is saved in order to fill out the dynamic form for the structured content type
 
Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
getMetadata, getOrder, getResultSet, remove, willHandleSecurity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

structuredContentService

protected StructuredContentService structuredContentService

dynamicFieldUtil

protected DynamicFieldPersistenceHandlerHelper dynamicFieldUtil
Constructor Detail

StructuredContentTypeCustomPersistenceHandler

public StructuredContentTypeCustomPersistenceHandler()
Method Detail

canHandleFetch

public Boolean canHandleFetch(PersistencePackage persistencePackage)
Specified by:
canHandleFetch in interface CustomPersistenceHandler
Overrides:
canHandleFetch in class CustomPersistenceHandlerAdapter

canHandleAdd

public Boolean canHandleAdd(PersistencePackage persistencePackage)
Specified by:
canHandleAdd in interface CustomPersistenceHandler
Overrides:
canHandleAdd in class CustomPersistenceHandlerAdapter

canHandleInspect

public Boolean canHandleInspect(PersistencePackage persistencePackage)
Specified by:
canHandleInspect in interface CustomPersistenceHandler
Overrides:
canHandleInspect in class CustomPersistenceHandlerAdapter

canHandleRemove

public Boolean canHandleRemove(PersistencePackage persistencePackage)
Specified by:
canHandleRemove in interface CustomPersistenceHandler
Overrides:
canHandleRemove in class CustomPersistenceHandlerAdapter

canHandleUpdate

public Boolean canHandleUpdate(PersistencePackage persistencePackage)
Specified by:
canHandleUpdate in interface CustomPersistenceHandler
Overrides:
canHandleUpdate in class CustomPersistenceHandlerAdapter

inspect

public DynamicResultSet inspect(PersistencePackage persistencePackage,
                                DynamicEntityDao dynamicEntityDao,
                                InspectHelper helper)
                         throws ServiceException
Specified by:
inspect in interface CustomPersistenceHandler
Overrides:
inspect in class CustomPersistenceHandlerAdapter
Throws:
ServiceException

fetch

public DynamicResultSet fetch(PersistencePackage persistencePackage,
                              CriteriaTransferObject cto,
                              DynamicEntityDao dynamicEntityDao,
                              RecordHelper helper)
                       throws ServiceException
Specified by:
fetch in interface CustomPersistenceHandler
Overrides:
fetch in class CustomPersistenceHandlerAdapter
Throws:
ServiceException

fetchEntityBasedOnId

public Entity fetchEntityBasedOnId(String structuredContentId,
                                   List<String> dirtyFields)
                            throws Exception
Specified by:
fetchEntityBasedOnId in interface DynamicEntityRetriever
Throws:
Exception

getFieldContainerClassName

public String getFieldContainerClassName()
Specified by:
getFieldContainerClassName in interface DynamicEntityRetriever

fetchDynamicEntity

public Entity fetchDynamicEntity(Serializable root,
                                 List<String> dirtyFields,
                                 boolean includeId)
                          throws Exception
Specified by:
fetchDynamicEntity in interface DynamicEntityRetriever
Throws:
Exception

update

public Entity update(PersistencePackage persistencePackage,
                     DynamicEntityDao dynamicEntityDao,
                     RecordHelper helper)
              throws ServiceException
Invoked when StructuredContent is saved in order to fill out the dynamic form for the structured content type

Specified by:
update in interface CustomPersistenceHandler
Overrides:
update in class CustomPersistenceHandlerAdapter
Throws:
ServiceException

add

public Entity add(PersistencePackage persistencePackage,
                  DynamicEntityDao dynamicEntityDao,
                  RecordHelper helper)
           throws ServiceException
Invoked when StructuredContent is saved in order to fill out the dynamic form for the structured content type

Specified by:
add in interface CustomPersistenceHandler
Overrides:
add in class CustomPersistenceHandlerAdapter
Throws:
ServiceException

addOrUpdate

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


Copyright © 2013. All Rights Reserved.