Class AdminUserCustomPersistenceHandler
java.lang.Object
org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
org.broadleafcommerce.openadmin.server.security.handler.AdminUserCustomPersistenceHandler
- All Implemented Interfaces:
CustomPersistenceHandler
,org.springframework.core.Ordered
@Component("blAdminUserCustomPersistenceHandler")
public class AdminUserCustomPersistenceHandler
extends CustomPersistenceHandlerAdapter
- Author:
- jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected SecurityVerifier
protected AdminSecurityService
protected org.springframework.core.env.Environment
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 -
Method Summary
Modifier and TypeMethodDescriptionadd
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) canHandleAdd
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an add request from the admincanHandleRemove
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with a remove request from the admincanHandleUpdate
(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an update request from the adminprotected boolean
void
remove
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) update
(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected Entity
validateLegalUsernameAndEmail
(Entity entity, AdminUser adminInstance, boolean isAdd) protected void
validateUserUpdateSecurity
(PersistencePackage persistencePackage, AdminUser changingUser) willHandleSecurity
(PersistencePackage persistencePackage) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
canHandleFetch, canHandleInspect, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, inspect, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria
-
Field Details
-
adminSecurityService
-
adminRemoteSecurityService
-
environment
@Autowired protected org.springframework.core.env.Environment environment
-
-
Constructor Details
-
AdminUserCustomPersistenceHandler
public AdminUserCustomPersistenceHandler()
-
-
Method Details
-
getRequireUniqueEmailAddress
protected boolean getRequireUniqueEmailAddress() -
willHandleSecurity
- Specified by:
willHandleSecurity
in interfaceCustomPersistenceHandler
- Overrides:
willHandleSecurity
in classCustomPersistenceHandlerAdapter
-
canHandleAdd
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an add request from the admin- Specified by:
canHandleAdd
in interfaceCustomPersistenceHandler
- Overrides:
canHandleAdd
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the add operation- Returns:
- whether or not this handler supports adds
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdate
in interfaceCustomPersistenceHandler
- Overrides:
canHandleUpdate
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the update operation- Returns:
- whether or not this handler supports updatess
-
canHandleRemove
Description copied from interface:CustomPersistenceHandler
Is this persistence handler capable of dealing with a remove request from the admin- Specified by:
canHandleRemove
in interfaceCustomPersistenceHandler
- Overrides:
canHandleRemove
in classCustomPersistenceHandlerAdapter
- Parameters:
persistencePackage
- details about the remove operation- Returns:
- whether or not this handler supports remove
-
add
public Entity add(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
add
in interfaceCustomPersistenceHandler
- Overrides:
add
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
update
public Entity update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
update
in interfaceCustomPersistenceHandler
- Overrides:
update
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
remove
public void remove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) throws ServiceException - Specified by:
remove
in interfaceCustomPersistenceHandler
- Overrides:
remove
in classCustomPersistenceHandlerAdapter
- Throws:
ServiceException
-
validateUserUpdateSecurity
protected void validateUserUpdateSecurity(PersistencePackage persistencePackage, AdminUser changingUser) throws ServiceException - Throws:
ServiceException
-
validateLegalUsernameAndEmail
-