package com.bayer.edam.migration.adam;

import java.util.ArrayList;
import java.util.List;

import com.bayer.edam.migration.adam.WriteRecord.Field;
import com.bayer.edam.migration.adam.WriteRecord.Fields;
import com.bayer.edam.migration.adam.WriteRecord.LocalizedValue;

public class Campaign {
	
	private static String basePath = "/Definitions/Animal Health/Campaign/Global/";
	
	public String parentNamePath;
	public String name;
	public String identifier = "";
	public Integer sortIndex = 1;
	public LocalizedValue[] labels;
	
	public Fields fields = new Fields();
	
	
	public Campaign (String name, String label, String year) {
		this.parentNamePath = basePath + year;
		this.name = name;
		LocalizedValue labelValue = new LocalizedValue(label);
		labels = new LocalizedValue[] { labelValue };
		
		// set field "IsCampaign"
		Field isCampaign = new Field("ed1b60f4069b48339128a77600bfb82a");
		List<String> values = new ArrayList<String>();
		values.add("70af5b79ea1c4cf387c5a77600bfb838");
		LocalizedValue localizedValue = new LocalizedValue(values);
		localizedValue.languageId = "00000000000000000000000000000000";
		isCampaign.localizedValues.add(localizedValue);
		fields.addOrUpdate.add(isCampaign);
	}

}
