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

com.reprezen.genflow.api.template.config.GenTemplateConfig Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright © 2013, 2016 Modelsolv, Inc.
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains the property
 * of ModelSolv, Inc. See the file license.html in the root directory of
 * this project for further information.
 *******************************************************************************/
package com.reprezen.genflow.api.template.config;

import java.util.Collections;
import java.util.List;

public class GenTemplateConfig {

	private List prerequisites;
	private PrimarySourceConfig primarySource;
	private List namedSources;
	private List outputItems;
	private List staticResources;
	private List parameters;

	public List getPrerequisites() {
		return prerequisites;
	}

	public void setPrerequisites(List prerequisites) {
		this.prerequisites = prerequisites;
	}

	public PrimarySourceConfig getPrimarySource() {
		return primarySource;
	}

	public void setPrimarySource(PrimarySourceConfig primarySource) {
		this.primarySource = primarySource;
	}

	public List getNamedSources() {
		return namedSources;
	}

	public void setNamedSources(List namedSources) {
		this.namedSources = namedSources;
	}

	public List getOutputItems() {
		return outputItems;
	}

	public void setOutputItems(List outputItems) {
		this.outputItems = outputItems;
	}

	public List getStaticResources() {
		return staticResources;
	}

	public void setStaticResources(List staticResources) {
		this.staticResources = staticResources != null ? staticResources
				: Collections.emptyList();
	}

	public List getParameters() {
		return parameters;
	}

	public void setParameters(List parameters) {
		this.parameters = parameters;
	}

	/**
	 * Replace null collection values with empty collections.
	 * 

* This makes consuming code far simpler and less error-prone. Jackson leaves * collection values null if the corresponding properities were missing in the * json. Call this after deserialization to fix things up. */ public void complete() { if (prerequisites == null) { prerequisites = Collections.emptyList(); } if (namedSources == null) { namedSources = Collections.emptyList(); } if (outputItems == null) { outputItems = Collections.emptyList(); } if (staticResources == null) { staticResources = Collections.emptyList(); } if (parameters == null) { parameters = Collections.emptyList(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy