ProjectEnvironment.java 1 KB
package com.ui.project;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class ProjectEnvironment {

	private static String[] dockerEnvironments = {"ONLINE-QCLOUD","GRAY-QCLOUD"};
	private static String[] dockerProjectJobTypes = {"Docker-Deploy-Node","Docker-Deploy-Java"};
	private static Map<String,String> map = new HashMap<>();

	static{
		map.put("aws", "http://172.31.16.167:8883/web/");
		map.put("qcloud","http://172.31.16.167:8883/web/");
		map.put("qcloud_gray","http://172.31.16.167:8883/web/");
		map.put("aws_gray","http://172.31.16.167:8883/web/");
	}

	public static Set<String> getEnviroments(){
		return  map.keySet();
	}

	public static String getUrl(String envi){
		if(map.containsKey(envi)){
			return map.get(envi);
		}else{
			return "http://172.31.16.167:8883/web/";
		}
	}


	public static String[] getDockerEnvironments(){
		return dockerEnvironments;
	}

	public static String[] getDockerProjectJobTypes(){
		return dockerProjectJobTypes;
	}

}