Class AbstractValidation
java.lang.Object
org.dspace.app.rest.submit.step.validation.AbstractValidation
- All Implemented Interfaces:
Validation
- Direct Known Subclasses:
CclicenseValidator,LicenseValidation,MetadataValidation,NotifyValidation,UploadValidation
Abstract class to provide basic management of errors resulting from a validation on a submission
- Author:
- Luigi Andrea Pascarelli (luigiandrea.pascarelli at 4science.it)
-
Constructor Details
-
AbstractValidation
public AbstractValidation()
-
-
Method Details
-
getName
An unique name to identify the validation implementation- Specified by:
getNamein interfaceValidation
-
setName
-
addError
Add an error message (i18nKey) for a specific json path, to list provided in input.- Parameters:
errors- the list to which error must be addedi18nKey- the validation error message as a key to internationalizepath- the json path that identify the wrong data in the submission. It could be as specific as a single value in a multivalued attribute or general of a "whole" section
-