-
Story
-
Resolution: Done
-
Medium
-
None
-
None
Define a CSAR validator interface which all CSAR validators should implement.
The interface should have a method to check if the validator apply to the model.
A suggestion of interfaces for a singleton validator:
CsarValidator
ValidationResult validate(org.openecomp.core.utilities.file.FileContentHandler fileContentHandler) //the method that will validate the package and create the error list
boolean applyTo(String model) //if the validator applies for that model
int getOrder() //to check the order of execution of the validator (maybe there is no meaning for this)
ValidationResult
boolean isValid() //if the package is valid
List<String> getErrors() //return the error messages during the validation