class DataValidator {

    public static void validatePostArtifact(final Artifact artifact) {
    	validate(artifact);
    	
        if(artifact.getExtension() == null ||
                artifact.getExtension().isEmpty()){
            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
                    .entity("Artifact extension should not be null or empty")
                    .build());
        }
        if(artifact.getSha256() == null ||
                artifact.getSha256().isEmpty()){
            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
                    .entity("Artifact SHA256 checksum should not be null or empty")
                    .build());
        }
        if(artifact.getSha256().length() != 64){
            throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
                    .entity("Artifact SHA256 checksum length should be 64")
                    .build());
        }
    }

    private  DataValidator();

}