package org.jerrymouse.gaes.mavenPlugin.install;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public abstract class Environment {

	public static String LINUX = "Linux";
	public static String Windows = "Windows";

	Log log = LogFactory.getLog(getClass());

	public static String whichOS() {
		String osName = System.getProperty("os.name");
		return osName;
	}

	public static Environment newInstance() {
		if (whichOS().equals(LINUX)) {
			return new LinuxEnvironment();
		}
		return null;
	}

	public String getEnv(String key) {
		return System.getenv(key);
	}

	public abstract boolean setEnv(String key, String prop);

}
