package com.duiba.tuia.youtui.web.tool;

/**
 * 
 * ClassName: Environment <br/>
 * date: 2016年12月5日 下午7:45:07 <br/>
 *
 * @version 
 * @since JDK 1.6
 */
public class Environment {

	public static final String ONLINE="online";
	public static final String PREPUB="prepub";
	public static final String DAILY="daily";
	public static final String DEV="dev";

	public static final String PlaceBaiduyun="baiduyun";
	public static final String PlaceAliyun="aliyun";
	
	private static String place;//云服务器环境
	
	private static String env;
	
	private static boolean junitEnv=false;
	public static boolean isJunitEnv(){
		return junitEnv;
	}
	
	public static void setJunitEnv(boolean yes){
		junitEnv=yes;
	}
	
	public static void setEnv(String env){
		Environment.env=env;
	}
	
	public static void setPlace(String p){
		place=p;
	}
	
	/**
	 * 
	 * isDaily:(这里用一句话描述这个方法的作用). <br/>
	 * @return
	 * @since JDK 1.6
	 */
	public static boolean isDaily(){
		if(DAILY.equalsIgnoreCase(env)){
			return true;
		}
		return false;
	}
	
	/**
	 * 
	 * isDev:(这里用一句话描述这个方法的作用). <br/>
	 * @return
	 * @since JDK 1.6
	 */
	public static boolean isDev(){
		if(DEV.equalsIgnoreCase(env)){
			return true;
		}
		return false;
	}

	/**
	 * 
	 * isPrepub:(这里用一句话描述这个方法的作用). <br/>
	 * @return
	 * @since JDK 1.6
	 */
	public static boolean isPrepub(){
		if(PREPUB.equalsIgnoreCase(env)){
			return true;
		}
		return false;
	}
	
	/**
	 * 
	 * isOnline:(这里用一句话描述这个方法的作用). <br/>
	 * @return
	 * @since JDK 1.6
	 */
	public static boolean isOnline(){
		if(ONLINE.equalsIgnoreCase(env)){
			return true;
		}
		return false;
	}
	
	public static String getPlace(){
		return place;
	}
}
