@@ -0,0 +1,2246 @@
+package org.whitesource.agent.api.dispatch;%0D%0A%0D%0Aimport java.util.Collection;%0D%0A%0D%0Aimport org.whitesource.agent.api.model.AgentProjectInfo;%0D%0Aimport org.whitesource.agent.api.model.DependencyInfo;%0D%0A%0D%0A/**%0D%0A * Factory for constructing %7B@link ServiceRequest%7D.%0D%0A * %0D%0A * @author Edo.Shor%0D%0A */%0D%0Apublic class RequestFactory %7B%0D%0A%0D%0A%09/* --- Members --- */%0D%0A%09%0D%0A%09private String agent;%0D%0A%09%0D%0A%09private String agentVersion;%0D%0A%09%0D%0A%09/* --- Constructors --- */%0D%0A%09%0D%0A%09/**%0D%0A%09 * Constructor%0D%0A%09 * %0D%0A%09 * @param agent Agent type identifier.%0D%0A%09 * @param agentVersion Agent version.%0D%0A%09 */%0D%0A%09public RequestFactory(String agent, String agentVersion) %7B%0D%0A%09%09this.agent = agent;%0D%0A%09%09this.agentVersion = agentVersion;%0D%0A%09%7D%0D%0A%09%0D%0A%09/* --- Public methods --- */%0D%0A%0D%0A%09/**%0D%0A%09 * Create new Properties request.%0D%0A%09 * %0D%0A%09 * @param orgToken WhiteSource organization token.%0D%0A%09 * %0D%0A%09 * @return Newly created request for properties.%0D%0A%09 */%0D%0A%09public PropertiesRequest newPropertiesRequest(String orgToken) %7B%0D%0A%09%09PropertiesRequest request = new PropertiesRequest(orgToken);%0D%0A%09%09prepareRequest(request);%0D%0A%09%09%0D%0A%09%09return request;%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Create new Report request.%0D%0A%09 * %0D%0A%09 * @param dependencies List of dependencies for analysis.%0D%0A%09 * %0D%0A%09 * @return Newly created request for analysis.%0D%0A%09 */%0D%0A%09public ReportRequest newReportRequest(Collection%3CDependencyInfo%3E dependencies) %7B%0D%0A%09%09ReportRequest request  = new ReportRequest(dependencies);%0D%0A%09%09prepareRequest(request);%0D%0A%09%09%0D%0A%09%09return request;%0D%0A%09%7D%0D%0A%09%0D%0A%09/**%0D%0A%09 * Create new Inventory Update request.%0D%0A%09 * %0D%0A%09 * @param orgToken WhiteSource organization token.%0D%0A%09 * @param projects Projects status statement to update.%0D%0A%09 * %0D%0A%09 * @return Newly created request to update organization inventory.%0D%0A%09 */%0D%0A%09public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, Collection%3CAgentProjectInfo%3E projects) %7B%0D%0A%09%09UpdateInventoryRequest request = new UpdateInventoryRequest(orgToken, projects);%0D%0A%09%09prepareRequest(request);%0D%0A%09%09%0D%0A%09%09return request;%0D%0A%09%7D%0D%0A%09%0D%0A%09/* --- Protected methods --- */%0D%0A%09%0D%0A%09/**%0D%0A%09 * The method populate the given request with basic information.%0D%0A%09 * %0D%0A%09 * @param request Service request to prepare.%0D%0A%09 */%0D%0A%09protected void prepareRequest(BaseRequest%3C?%3E request) %7B%0D%0A%09%09request.setAgent(agent);%0D%0A%09%09request.setAgentVersion(agentVersion);%0D%0A%09%7D%0D%0A%09%0D%0A%7D%0D%0A

Fix for missing file