Class CustomerCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.admin.server.service.handler.CustomerCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler,org.springframework.core.Ordered
@Component("blCustomerCustomPersistenceHandler")
public class CustomerCustomPersistenceHandler
extends CustomPersistenceHandlerAdapter
- Author:
- jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.profile.core.service.CustomerServiceprotected org.broadleafcommerce.profile.core.dao.RoleDaoprotected booleanFields 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 TypeMethodDescriptionadd(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) canHandleAdd(PersistencePackage persistencePackage) canHandleRemove(PersistencePackage persistencePackage) canHandleUpdate(PersistencePackage persistencePackage) voidremove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected EntityvalidateUniqueUsername(Entity entity, org.broadleafcommerce.profile.core.domain.Customer adminInstance, boolean isAdd) Validates that a Customer does not have their username duplicatedMethods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
canHandleFetch, canHandleInspect, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria, willHandleSecurity
-
Field Details
-
useEmailForLogin
@Value("${use.email.for.site.login:true}") protected boolean useEmailForLogin -
customerService
protected org.broadleafcommerce.profile.core.service.CustomerService customerService -
roleDao
protected org.broadleafcommerce.profile.core.dao.RoleDao roleDao
-
-
Constructor Details
-
CustomerCustomPersistenceHandler
public CustomerCustomPersistenceHandler()
-
-
Method Details
-
canHandleAdd
- Specified by:
canHandleAddin interfaceCustomPersistenceHandler- Overrides:
canHandleAddin classCustomPersistenceHandlerAdapter
-
canHandleUpdate
- Specified by:
canHandleUpdatein interfaceCustomPersistenceHandler- Overrides:
canHandleUpdatein classCustomPersistenceHandlerAdapter
-
canHandleRemove
- Specified by:
canHandleRemovein interfaceCustomPersistenceHandler- Overrides:
canHandleRemovein classCustomPersistenceHandlerAdapter
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
addin interfaceCustomPersistenceHandler- Overrides:
addin classCustomPersistenceHandlerAdapter- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
updatein interfaceCustomPersistenceHandler- Overrides:
updatein classCustomPersistenceHandlerAdapter- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
validateUniqueUsername
protected Entity validateUniqueUsername(Entity entity, org.broadleafcommerce.profile.core.domain.Customer adminInstance, boolean isAdd) Validates that a Customer does not have their username duplicated- Parameters:
entity-adminInstance-- Returns:
- the original entity with a validation error on it or null if no validation failure
-
remove
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
removein interfaceCustomPersistenceHandler- Overrides:
removein classCustomPersistenceHandlerAdapter- Throws:
org.broadleafcommerce.common.exception.ServiceException
-