class FossologyUploader {

    public FossologyStatus getStatusInFossology(int uploadId, String clearingTeam) {
        try {
            final CapturerOutputStream os = new CapturerOutputStream();

            if (uploadId < 0) {
                throw fail("bad Upload Id");
            }
            assertNotEmpty(clearingTeam);

            final String command = String.format(FOSSOLOGY_COMMAND_GET_STATUS, uploadId, sanitizeQuotes(clearingTeam));

            final int exitCode = fossologySshConnector.runInFossologyViaSsh(command, os);

            String output = os.getContent();
            if (exitCode != 0) {
                log.error("get status in fossology failed: " + output);
                return FossologyStatus.CONNECTION_FAILED;
            }
            return parseResultStatus(output);
        } catch (SW360Exception e) {
            log.error("cannot check status of upload with id " + uploadId + " in fossology", e);
            return FossologyStatus.ERROR;
        }
    }

    @Autowired public  FossologyUploader(FossologySshConnector fossologySshConnector);

}