Class DefaultComponentValidatorManager
java.lang.Object
com.broadleafcommerce.metadata.dsl.validators.DefaultComponentValidatorManager
- All Implemented Interfaces:
ComponentValidatorManager
The default implementation of
ComponentValidatorManager
.- Author:
- Nick Crum (ncrum)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final List<ActionValidator>
static final List<ComponentValidator>
static final List<EndpointValidator>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultComponentValidatorManager
(List<ComponentValidator> componentValidators, List<ActionValidator> actionValidators, List<EndpointValidator> endpointValidators) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionValidator
(ActionValidator actionValidator) void
addActionValidators
(List<ActionValidator> actionValidators) void
addComponentValidator
(ComponentValidator componentValidator) void
addComponentValidators
(List<ComponentValidator> componentValidators) protected void
void
addEndpointValidator
(EndpointValidator endpointValidator) void
addEndpointValidators
(List<EndpointValidator> endpointValidators) The set ofActionValidator
to use to validate anyAction
passed toComponentValidatorManager.validateAction(Action, Errors)
.The set ofComponentValidator
to use to validate any component passed toComponentValidatorManager.validateComponent(Component, Errors)
.The set ofEndpointValidator
to use to validate anyEndpoint
passed toComponentValidatorManager.validateEndpoint(Endpoint, Errors)
.void
setActionValidators
(List<ActionValidator> actionValidators) void
setComponentValidators
(List<ComponentValidator> componentValidators) void
setEndpointValidators
(List<EndpointValidator> endpointValidators) org.springframework.validation.Errors
The primary method of validating a targetComponent
and its entire component tree.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.metadata.dsl.validators.ComponentValidatorManager
validateAction, validateComponent, validateEndpoint
-
Field Details
-
DEFAULT_COMPONENT_VALIDATORS
-
DEFAULT_ACTION_VALIDATORS
-
DEFAULT_ENDPOINT_VALIDATORS
-
-
Constructor Details
-
DefaultComponentValidatorManager
public DefaultComponentValidatorManager() -
DefaultComponentValidatorManager
public DefaultComponentValidatorManager(@Nullable List<ComponentValidator> componentValidators, @Nullable List<ActionValidator> actionValidators, @Nullable List<EndpointValidator> endpointValidators)
-
-
Method Details
-
addDefaultValidators
protected void addDefaultValidators() -
addComponentValidator
-
addComponentValidators
-
addActionValidator
-
addActionValidators
-
addEndpointValidator
-
addEndpointValidators
-
validate
Description copied from interface:ComponentValidatorManager
The primary method of validating a targetComponent
and its entire component tree. Returns anErrors
that contains any validation errors discovered on the component or any descendents, if any were found.- Specified by:
validate
in interfaceComponentValidatorManager
- Parameters:
target
- the component to validate- Returns:
- the
Errors
, which is empty if no errors were found
-
getComponentValidators
Description copied from interface:ComponentValidatorManager
The set ofComponentValidator
to use to validate any component passed toComponentValidatorManager.validateComponent(Component, Errors)
.- Specified by:
getComponentValidators
in interfaceComponentValidatorManager
- Returns:
- the set of validators
-
getActionValidators
Description copied from interface:ComponentValidatorManager
The set ofActionValidator
to use to validate anyAction
passed toComponentValidatorManager.validateAction(Action, Errors)
.- Specified by:
getActionValidators
in interfaceComponentValidatorManager
- Returns:
- the set of validators
-
getEndpointValidators
Description copied from interface:ComponentValidatorManager
The set ofEndpointValidator
to use to validate anyEndpoint
passed toComponentValidatorManager.validateEndpoint(Endpoint, Errors)
.- Specified by:
getEndpointValidators
in interfaceComponentValidatorManager
- Returns:
- the set of validators
-
setComponentValidators
-
setActionValidators
-
setEndpointValidators
-