Class ChildCategoriesCustomPersistenceHandler

java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.admin.server.service.handler.ChildCategoriesCustomPersistenceHandler
All Implemented Interfaces:
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler, org.springframework.core.Ordered

@Component("blChildCategoriesCustomPersistenceHandler") public class ChildCategoriesCustomPersistenceHandler extends org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
Author:
Jeff Fischer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected org.broadleafcommerce.core.catalog.dao.CategoryDao
     
    protected org.broadleafcommerce.common.sandbox.SandBoxHelper
     
    protected static final String
     

    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.broadleafcommerce.openadmin.dto.Entity
    add(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage, org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao dynamicEntityDao, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper)
     
    protected void
    addCategoryLink(StringBuilder productLinks, String categoryName)
     
    canHandleAdd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage)
     
    protected void
    validateChildCategories(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Category category, Long id, StringBuilder categoryLinks)
     
    protected void
    validateChildCategory(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected void
    validateDuplicateChild(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected void
    validateRecursiveRelationship(org.broadleafcommerce.openadmin.dto.Entity entity)
     
    protected void
    validateSelfLink(org.broadleafcommerce.openadmin.dto.Entity entity)
     

    Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter

    canHandleFetch, canHandleInspect, canHandleRemove, canHandleUpdate, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, remove, update, willHandleSecurity

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ALL_CHILD_CATEGORY_XREFS

      protected static final String ALL_CHILD_CATEGORY_XREFS
      See Also:
    • CATEGORY_ID

      protected static final String CATEGORY_ID
      See Also:
    • SUB_CATEGORY_ID

      protected static final String SUB_CATEGORY_ID
      See Also:
    • CATEGORY_SEPARATOR

      protected static final String CATEGORY_SEPARATOR
      See Also:
    • categoryDao

      protected org.broadleafcommerce.core.catalog.dao.CategoryDao categoryDao
    • sandBoxHelper

      protected org.broadleafcommerce.common.sandbox.SandBoxHelper sandBoxHelper
  • Constructor Details

    • ChildCategoriesCustomPersistenceHandler

      public ChildCategoriesCustomPersistenceHandler()
  • Method Details

    • canHandleAdd

      public Boolean canHandleAdd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage)
      Specified by:
      canHandleAdd in interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
      Overrides:
      canHandleAdd in class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
    • add

      public org.broadleafcommerce.openadmin.dto.Entity add(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage, org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao dynamicEntityDao, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException
      Specified by:
      add in interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
      Overrides:
      add in class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • validateChildCategory

      protected void validateChildCategory(org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateSelfLink

      protected void validateSelfLink(org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateDuplicateChild

      protected void validateDuplicateChild(org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateRecursiveRelationship

      protected void validateRecursiveRelationship(org.broadleafcommerce.openadmin.dto.Entity entity) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • validateChildCategories

      protected void validateChildCategories(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Category category, Long id, StringBuilder categoryLinks) throws org.broadleafcommerce.openadmin.server.service.ValidationException
      Throws:
      org.broadleafcommerce.openadmin.server.service.ValidationException
    • addCategoryLink

      protected void addCategoryLink(StringBuilder productLinks, String categoryName)