Nuxeo Enterprise Platform 5.4

org.nuxeo.common
Class Environment

java.lang.Object
  extended by org.nuxeo.common.Environment

public class Environment
extends Object

Author:
Bogdan Stefanescu

Field Summary
static String BUNDLES
           
static String BUNDLES_DIR
          The application layout (optional): directory containing nuxeo runtime osgi bundles.
static String CONFIG_DIR
          Deprecated. never defined
static String DATA_DIR
          Deprecated. never defined
static String HOME_DIR
          Deprecated. never defined
static String JBOSS_HOST
          Constants that identifies possible hosts for the framework.
static String LOG_DIR
          Deprecated. never defined
static String NUXEO_CONFIG_DIR
           
static String NUXEO_DATA_DIR
           
static String NUXEO_HOME_DIR
           
static String NUXEO_LOG_DIR
           
static String NUXEO_TMP_DIR
           
static String NUXEO_WEB_DIR
           
static String NXSERVER_HOST
           
static String TOMCAT_HOST
           
static String WEB_DIR
          Deprecated. never defined
 
Constructor Summary
Environment(File home)
           
Environment(File home, Properties properties)
           
 
Method Summary
 String[] getCommandLineArguments()
           
 File getConfig()
           
 File getData()
           
static Environment getDefault()
           
 File getHome()
           
 String getHostApplicationName()
           
 String getHostApplicationVersion()
           
 File getLog()
           
 Properties getProperties()
           
 String getProperty(String key)
           
 String getProperty(String key, String defaultValue)
           
 File getTemp()
           
 File getWeb()
           
 void init()
          Initialization with System properties.
 boolean isApplicationServer()
           
 boolean isJBoss()
           
 boolean isJetty()
           
 boolean isTomcat()
           
 void loadProperties(Properties properties)
           
 void setCommandLineArguments(String[] args)
           
 void setConfig(File config)
           
 void setData(File data)
           
static void setDefault(Environment env)
           
 void setHostApplicationName(String name)
           
 void setHostApplicationVersion(String version)
           
 void setIsApplicationServer(boolean isAppServer)
           
 void setLog(File log)
           
 void setProperty(String key, String value)
           
 void setTemp(File temp)
           
 void setWeb(File web)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JBOSS_HOST

public static final String JBOSS_HOST
Constants that identifies possible hosts for the framework.

See Also:
Constant Field Values

NXSERVER_HOST

public static final String NXSERVER_HOST
See Also:
Constant Field Values

TOMCAT_HOST

public static final String TOMCAT_HOST
See Also:
Constant Field Values

NUXEO_HOME_DIR

public static final String NUXEO_HOME_DIR
See Also:
Constant Field Values

NUXEO_DATA_DIR

public static final String NUXEO_DATA_DIR
See Also:
Constant Field Values

NUXEO_LOG_DIR

public static final String NUXEO_LOG_DIR
See Also:
Constant Field Values

NUXEO_TMP_DIR

public static final String NUXEO_TMP_DIR
See Also:
Constant Field Values

NUXEO_CONFIG_DIR

public static final String NUXEO_CONFIG_DIR
See Also:
Constant Field Values

NUXEO_WEB_DIR

public static final String NUXEO_WEB_DIR
See Also:
Constant Field Values

HOME_DIR

@Deprecated
public static final String HOME_DIR
Deprecated. never defined
The home directory.

See Also:
Constant Field Values

WEB_DIR

@Deprecated
public static final String WEB_DIR
Deprecated. never defined
The web root.

See Also:
Constant Field Values

CONFIG_DIR

@Deprecated
public static final String CONFIG_DIR
Deprecated. never defined
The config directory.

See Also:
Constant Field Values

DATA_DIR

@Deprecated
public static final String DATA_DIR
Deprecated. never defined
The data directory.

See Also:
Constant Field Values

LOG_DIR

@Deprecated
public static final String LOG_DIR
Deprecated. never defined
The log directory.

See Also:
Constant Field Values

BUNDLES_DIR

public static final String BUNDLES_DIR
The application layout (optional): directory containing nuxeo runtime osgi bundles.

See Also:
Constant Field Values

BUNDLES

public static final String BUNDLES
See Also:
Constant Field Values
Constructor Detail

Environment

public Environment(File home)

Environment

public Environment(File home,
                   Properties properties)
Method Detail

setDefault

public static void setDefault(Environment env)

getDefault

public static Environment getDefault()

getHome

public File getHome()

isApplicationServer

public boolean isApplicationServer()

setIsApplicationServer

public void setIsApplicationServer(boolean isAppServer)

getHostApplicationName

public String getHostApplicationName()

getHostApplicationVersion

public String getHostApplicationVersion()

setHostApplicationName

public void setHostApplicationName(String name)

setHostApplicationVersion

public void setHostApplicationVersion(String version)

getTemp

public File getTemp()

setTemp

public void setTemp(File temp)

getConfig

public File getConfig()

setConfig

public void setConfig(File config)

getLog

public File getLog()

setLog

public void setLog(File log)

getData

public File getData()

setData

public void setData(File data)

getWeb

public File getWeb()

setWeb

public void setWeb(File web)

getCommandLineArguments

public String[] getCommandLineArguments()

setCommandLineArguments

public void setCommandLineArguments(String[] args)

getProperty

public String getProperty(String key)

getProperty

public String getProperty(String key,
                          String defaultValue)

setProperty

public void setProperty(String key,
                        String value)

getProperties

public Properties getProperties()

loadProperties

public void loadProperties(Properties properties)

isJBoss

public boolean isJBoss()

isJetty

public boolean isJetty()

isTomcat

public boolean isTomcat()

init

public void init()
Initialization with System properties. Home must be set (it is usually nuxeo runtime home, not nuxeo home).

Since:
5.4.1

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.