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

com.fizzgate.fizz.StepResponse Maven / Gradle / Ivy

/*
 *  Copyright (C) 2020 the original author or authors.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see .
 */

package com.fizzgate.fizz;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *  @author linwaiwai
 */
public class StepResponse {
	private String stepName;
	private Map> requests;
	private Map result;
	private boolean stop;
	// circle item
	private Object item;
	// index of circle item
	private Integer index;
	// circle results
	private List> circle;
	// result of condition components
	private List> conditionResults;
	
	public StepResponse(Step aStep, HashMap item, Map> requests) {
		setStepName(aStep.getName());
		setResult(item);
		setRequests(requests);
	}
	public StepResponse(Step aStep, HashMap item) {
		setStepName(aStep.getName());
		setResult(item);
	}
	
	public void addRequest(String requestName, Map requestObj) {
		if (this.requests.containsKey(requestName)) {
			this.requests.get(requestName).putAll(requestObj);
		} else {
			this.requests.put(requestName, requestObj);
		}
	}
	
	public boolean isStop() {
		return stop;
	}
	public void setStop(boolean stop) {
		this.stop = stop;
	}
	public String getStepName() {
		return stepName;
	}
	public void setStepName(String stepName) {
		this.stepName = stepName;
	}
	public Map> getRequests() {
		return requests;
	}
	public void setRequests(Map> requests) {
		this.requests = requests;
	}
	public Map getResult() {
		return result;
	}
	public void setResult(Map result) {
		this.result = result;
	}
	public Object getItem() {
		return item;
	}
	public void setItem(Object item) {
		this.item = item;
	}
	public List> getCircle() {
		return circle;
	}
	public void setCircle(List> circle) {
		this.circle = circle;
	}
	public Integer getIndex() {
		return index;
	}
	public void setIndex(Integer index) {
		this.index = index;
	}
	public List> getConditionResults() {
		return conditionResults;
	}
	public void setConditionResults(List> conditionResults) {
		this.conditionResults = conditionResults;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy