diff --git a/src/main/java/org/whitesource/agent/ProjectsSender.java b/src/main/java/org/whitesource/agent/ProjectsSender.java index 6b6a7e30..83768509 100644 --- a/src/main/java/org/whitesource/agent/ProjectsSender.java +++ b/src/main/java/org/whitesource/agent/ProjectsSender.java @@ -1,87 +1,4 @@ -/** - * Copyright (C) 2014 WhiteSource Ltd. - *
- * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - *
- * http://www.apache.org/licenses/LICENSE-2.0 - *
- * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.whitesource.agent; - -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.whitesource.agent.api.dispatch.CheckPolicyComplianceResult; -import org.whitesource.agent.api.dispatch.UpdateInventoryRequest; -import org.whitesource.agent.api.dispatch.UpdateInventoryResult; -import org.whitesource.agent.api.dispatch.UpdateType; -import org.whitesource.agent.api.model.AgentProjectInfo; -import org.whitesource.agent.client.WhitesourceService; -import org.whitesource.agent.client.WssServiceException; -import org.whitesource.agent.report.OfflineUpdateRequest; -import org.whitesource.agent.report.PolicyCheckReport; -import org.whitesource.agent.utils.Pair; -import org.whitesource.contracts.PluginInfo; -import org.whitesource.fs.ProjectsDetails; -import org.whitesource.fs.StatusCode; -import org.whitesource.fs.configuration.OfflineConfiguration; -import org.whitesource.fs.configuration.RequestConfiguration; -import org.whitesource.fs.configuration.SenderConfiguration; -import whitesource.analysis.server.FSAgentServer; -import whitesource.analysis.server.Server; -import whitesource.analysis.vulnerabilities.VulnerabilitiesAnalysis; -import whitesource.via.api.vulnerability.update.GlobalVulnerabilityAnalysisResult; - -import java.io.File; -import java.io.IOException; -import java.util.Collection; -import java.util.HashMap; - -/** - * Class for sending projects for all WhiteSource command line agents. - * - * @author Itai Marko - * @author tom.shapira - * @author anna.rozin - */ -public class ProjectsSender { - public static final String PROJECT_URL_PREFIX = "Wss/WSS.html#!project;id="; - - /* --- Static members --- */ - - private final Logger logger = LoggerFactory.getLogger(ProjectsSender.class); - - private static final String NEW_LINE = System.lineSeparator(); - private static final String DOT = "."; - private static final String JAVA_NETWORKING = "java.net"; - private static final int MAX_NUMBER_OF_DEPENDENCIES = 1000000; - public static final String JAVA = "java"; - public static final String JAVA_SCRIPT = "javascript"; - public static final String BACK_SLASH = "\\"; - public static final String FORWARD_SLASH = "/"; - /* --- Members --- */ - - private final SenderConfiguration senderConfig; - private final OfflineConfiguration offlineConfig; - private final RequestConfiguration requestConfig; - private final PluginInfo pluginInfo; - protected StatusCode prepStepStatusCode = StatusCode.SUCCESS; - - /* --- Constructors --- */ - - public ProjectsSender(SenderConfiguration senderConfig, OfflineConfiguration offlineConfig, RequestConfiguration requestConfig, PluginInfo pluginInfo) { - this.senderConfig = senderConfig; - this.offlineConfig = offlineConfig; - this.requestConfig = requestConfig; - this.pluginInfo = pluginInfo; - } + /* --- Public methods --- */ @@ -366,4 +283,4 @@ private String logResult(UpdateInventoryResult updateResult) { } return resultLogMsg.toString(); } -} \ No newline at end of file +}