All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whitesource.agent.api.dispatch.UpdateInventoryResult Maven / Gradle / Ivy

There is a newer version: 18.4.1
Show newest version
/**
 * Copyright (C) 2012 White Source 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.api.dispatch;

import com.google.gson.annotations.Since;
import org.whitesource.agent.api.AgentApiVersion;
import org.whitesource.agent.api.model.ProjectDetails;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;


/**
 * Result of the update inventory operation.
 *
 * @author Edo.Shor
 */
public class UpdateInventoryResult extends BaseResult {

	/* --- Static members --- */

	private static final long serialVersionUID = 9074828488465436483L;

	/* --- Members --- */

	private boolean removeIfExist = false;

	private Collection updatedProjects;

	private Collection createdProjects;

	private HashMap projectNamesToIds;

	/*
	 * @since 2.9.8
	 */
	@Since(AgentApiVersion.AGENT_API_VERSION_2_9_8)
	private HashMap projectNamesToDetails;


	/* --- Constructors --- */
	/**
	 * Default constructor (for JSON parsing)
	 *
	 */
	public UpdateInventoryResult() {
		updatedProjects = new ArrayList();
		createdProjects = new ArrayList();
		projectNamesToIds = new HashMap<>();
		projectNamesToDetails = new HashMap<>();
	}

	/**
	 * Constructor
	 *
	 * @param organization Name of the domain.
	 */
	public UpdateInventoryResult(String organization) {
		this();
		setOrganization(organization);
	}

	public UpdateInventoryResult(String organization,boolean removeIfExist) {
		this(organization);
		this.removeIfExist = removeIfExist;
	}


	/* --- Getters / Setters --- */
	public Collection getUpdatedProjects() {
		return updatedProjects;
	}

	public void setUpdatedProjects(Collection updatedProjects) {
		this.updatedProjects = updatedProjects;
	}

	public Collection getCreatedProjects() {
		return createdProjects;
	}

	public void setCreatedProjects(Collection createdProjects) {
		this.createdProjects = createdProjects;
	}

	public HashMap getProjectNamesToIds() {
		return projectNamesToIds;
	}

	public void setProjectNamesToIds(HashMap projectNamesToIds) {
		this.projectNamesToIds = projectNamesToIds;
	}

	public HashMap getProjectNamesToDetails(){
		return projectNamesToDetails;
	}

	public void setProjectNamesToDetails(HashMap value){
		this.projectNamesToDetails = value;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy