public class Validator extends Object
| Modifier and Type | Method and Description |
|---|---|
Boolean |
isDescriptorFilePresent()
It validates that the mandatory descriptor files are present
|
Boolean |
isPackagingTypeValid(String packagingType)
It validates that the provided packaging types is a valid one
|
Boolean |
isProjectStructureValid(String packagingType)
It validates the project folder structure is valid
|
Boolean |
isProjectValid(String packagingType)
Ensure a project contained in the projectBaseDir is valid based on its packagin type.
|
void |
validateSharedLibraries(List<SharedLibraryDependency> sharedLibraries,
List<ArtifactCoordinates> projectDependencies)
It validates if every shared library is present in the project dependencies.
|
public Validator(Path projectBaseDir)
public Boolean isProjectValid(String packagingType) throws ValidationException
packagingType - defines the package type of the project to validateValidationException - if the project is invalidpublic Boolean isPackagingTypeValid(String packagingType) throws ValidationException
packagingType - defines the package type of the project to validateValidationException - if the packaging type is unknownpublic Boolean isProjectStructureValid(String packagingType) throws ValidationException
packagingType - defines the package type of the project to validateValidationException - if the project's structure is invalidpublic Boolean isDescriptorFilePresent() throws ValidationException
ValidationException - if the project's descriptor files are missingpublic void validateSharedLibraries(List<SharedLibraryDependency> sharedLibraries, List<ArtifactCoordinates> projectDependencies) throws ValidationException
ValidationException - if at least one shared library is not defined in the project dependenciesCopyright © 2017. All rights reserved.