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
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected org.broadleafcommerce.core.catalog.dao.CategoryDaoprotected org.broadleafcommerce.common.sandbox.SandBoxHelperprotected static final StringFields inherited from interface org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler
DEFAULT_ORDERFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.broadleafcommerce.openadmin.dto.Entityadd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage, org.broadleafcommerce.openadmin.server.dao.DynamicEntityDao dynamicEntityDao, org.broadleafcommerce.openadmin.server.service.persistence.module.RecordHelper helper) protected voidaddCategoryLink(StringBuilder productLinks, String categoryName) canHandleAdd(org.broadleafcommerce.openadmin.dto.PersistencePackage persistencePackage) protected voidvalidateChildCategories(org.broadleafcommerce.openadmin.dto.Entity entity, org.broadleafcommerce.core.catalog.domain.Category category, Long id, StringBuilder categoryLinks) protected voidvalidateChildCategory(org.broadleafcommerce.openadmin.dto.Entity entity) protected voidvalidateDuplicateChild(org.broadleafcommerce.openadmin.dto.Entity entity) protected voidvalidateRecursiveRelationship(org.broadleafcommerce.openadmin.dto.Entity entity) protected voidvalidateSelfLink(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
-
Field Details
-
ALL_CHILD_CATEGORY_XREFS
- See Also:
-
CATEGORY_ID
- See Also:
-
SUB_CATEGORY_ID
- See Also:
-
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:
canHandleAddin interfaceorg.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler- Overrides:
canHandleAddin classorg.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:
addin interfaceorg.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandler- Overrides:
addin classorg.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
-