Interface AccountPermissionContextValidator<P extends AccountPermission>
- 
- All Known Implementing Classes:
 DefaultAccountPermissionContextValidator
public interface AccountPermissionContextValidator<P extends AccountPermission>Various context-related validation functions for use when performing CRUD operations related to an account permission.This performs only context-related validations.
AccountPermissionValidatoris used for the more basic field validations.- Author:
 - Samarth Dhruva (samarthd), Chris Kittrell (ckittrell)
 - See Also:
 AccountPermissionValidator
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.springframework.validation.ErrorsvalidateCreate(P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates a create operation is allowed in the current context.voidvalidateCreate(P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates a create operation is allowed in the current context.org.springframework.validation.ErrorsvalidateDelete(P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates a delete operation is allowed in the current context.voidvalidateDelete(P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates a delete operation is allowed in the current context.org.springframework.validation.ErrorsvalidateUpdate(String id, P permission, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates an update operation is allowed in the current context.voidvalidateUpdate(String id, P permission, org.springframework.validation.Errors errors, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)Validates an update operation is allowed in the current context. 
 - 
 
- 
- 
Method Detail
- 
validateCreate
org.springframework.validation.Errors validateCreate(P permission, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates a create operation is allowed in the current context.- Parameters:
 permission- The permission to validatecontextInfo- The current context- Returns:
 - An 
Errorsobject bound to a {code permission} - See Also:
 validateCreate(AccountPermission, Errors, ContextInfo)
 
- 
validateUpdate
org.springframework.validation.Errors validateUpdate(String id, P permission, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates an update operation is allowed in the current context.- Parameters:
 id- the id of the permission being updated, explicitly provided such that it can be used to find the existing record even ifAccountPermission.getId()is unsupplied inpermission.permission- The permission to validatecontextInfo- The current context- Returns:
 - An 
Errorsobject bound to a {code permission} - See Also:
 validateUpdate(String, AccountPermission, Errors, ContextInfo)
 
- 
validateDelete
org.springframework.validation.Errors validateDelete(P permission, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates a delete operation is allowed in the current context.- Parameters:
 permission- the permission being deleted to validatecontextInfo- The current context- Returns:
 - An 
Errorsobject bound to a {code permission} - See Also:
 validateDelete(AccountPermission, Errors, ContextInfo)
 
- 
validateCreate
void validateCreate(P permission, org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates a create operation is allowed in the current context.- Parameters:
 permission- The permission to validateerrors- An errors object bound to thepermissionto be validatedcontextInfo- The current context
 
- 
validateUpdate
void validateUpdate(String id, P permission, org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates an update operation is allowed in the current context.- Parameters:
 id- the id of the permission being updated, explicitly provided such that it can be used to find the existing record even ifAccountPermission.getId()is unsupplied inpermission.permission- The permission to validateerrors- An errors object bound to thepermissionto be validatedcontextInfo- The current context
 
- 
validateDelete
void validateDelete(P permission, org.springframework.validation.Errors errors, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Validates a delete operation is allowed in the current context.- Parameters:
 permission- The permission being deleted to validateerrors- An errors object bound to thepermissionto be validatedcontextInfo- The current context
 
 - 
 
 -