class FossologyScriptsHandler {

    public RequestStatus deployScripts() throws SW360Exception {
        RequestStatus status = RequestStatus.SUCCESS;

        for (String scriptFileName : SCRIPT_FILE_NAMES) {
            final InputStream inputStream = FossologyScriptsHandler.class.getResourceAsStream(SCRIPTS_FOLDER + scriptFileName);
            if (inputStream == null) {
                log.error("cannot get content of script " + scriptFileName);
                status = RequestStatus.FAILURE;
                continue;
            }
            try {
                if (!fossologyUploader.copyToFossology(scriptFileName, inputStream, true)) {
                    status = RequestStatus.FAILURE;
                }
            } finally {
                closeQuietly(inputStream, log);
            }
        }

        return status;
    }

    @Autowired public  FossologyScriptsHandler(FossologyUploader fossologyUploader);

}