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 SecurityVerifierprotected AdminSecurityServiceprotected org.springframework.core.env.Environmentstatic final Stringstatic final Stringstatic final Stringprotected 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) Is this persistence handler capable of dealing with an add request from the admincanHandleInspect(PersistencePackage persistencePackage) Is this persistence handler capable of dealing with an inspect 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 booleaninspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) protected voidmodifyMetadataProperties(PersistencePackage persistencePackage, Map<String, FieldMetadata> properties) voidremove(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) update(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, RecordHelper helper) protected EntityvalidateLegalUsernameAndEmail(Entity entity, AdminUser adminInstance, boolean isAdd) protected voidvalidatePassword(Entity entity, String currentPassword) protected voidvalidateUserUpdateSecurity(PersistencePackage persistencePackage, AdminUser changingUser) willHandleSecurity(PersistencePackage persistencePackage) Methods inherited from class org.broadleafcommerce.openadmin.server.service.handler.CustomPersistenceHandlerAdapter
canHandleFetch, fetch, getClassForName, getMetadata, getOrder, getPolymorphicClasses, getResultSet, isAdornedListOperation, isAssignableFrom, isBasicOperation, isMapOperation, meetsCustomCriteria
-
Field Details
-
PASSWORD_PROPERTY
- See Also:
-
PASSWORD_CONFIRM_PROPERTY
- See Also:
-
REQUIRED_VALIDATION_FAILURE
- See Also:
-
adminSecurityService
-
adminRemoteSecurityService
-
environment
@Autowired protected org.springframework.core.env.Environment environment -
validateAdminUserPassword
@Value("${validate.admin.user.password:false}") protected boolean validateAdminUserPassword
-
-
Constructor Details
-
AdminUserCustomPersistenceHandler
public AdminUserCustomPersistenceHandler()
-
-
Method Details
-
getRequireUniqueEmailAddress
protected boolean getRequireUniqueEmailAddress() -
willHandleSecurity
- Specified by:
willHandleSecurityin interfaceCustomPersistenceHandler- Overrides:
willHandleSecurityin classCustomPersistenceHandlerAdapter
-
canHandleAdd
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an add request from the admin- Specified by:
canHandleAddin interfaceCustomPersistenceHandler- Overrides:
canHandleAddin classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the add operation- Returns:
- whether or not this handler supports adds
-
canHandleUpdate
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an update request from the admin- Specified by:
canHandleUpdatein interfaceCustomPersistenceHandler- Overrides:
canHandleUpdatein classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the update operation- Returns:
- whether or not this handler supports updatess
-
canHandleRemove
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with a remove request from the admin- Specified by:
canHandleRemovein interfaceCustomPersistenceHandler- Overrides:
canHandleRemovein classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the remove operation- Returns:
- whether or not this handler supports remove
-
canHandleInspect
Description copied from interface:CustomPersistenceHandlerIs this persistence handler capable of dealing with an inspect request from the admin- Specified by:
canHandleInspectin interfaceCustomPersistenceHandler- Overrides:
canHandleInspectin classCustomPersistenceHandlerAdapter- Parameters:
persistencePackage- details about the inspect operation- Returns:
- whether or not this handler supports inspects
-
inspect
public DynamicResultSet inspect(PersistencePackage persistencePackage, DynamicEntityDao dynamicEntityDao, InspectHelper helper) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
inspectin interfaceCustomPersistenceHandler- Overrides:
inspectin classCustomPersistenceHandlerAdapter- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
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
-
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
-
validateUserUpdateSecurity
protected void validateUserUpdateSecurity(PersistencePackage persistencePackage, AdminUser changingUser) throws org.broadleafcommerce.common.exception.ServiceException - Throws:
org.broadleafcommerce.common.exception.ServiceException
-
validateLegalUsernameAndEmail
-
modifyMetadataProperties
protected void modifyMetadataProperties(PersistencePackage persistencePackage, Map<String, FieldMetadata> properties) -
validatePassword
- Throws:
ValidationException
-