org.objectweb.telosys.common
Class TelosysProperties

java.lang.Object
  extended byorg.objectweb.telosys.common.TelosysProperties

public class TelosysProperties
extends java.lang.Object

The Telosys properties container ( contains the propertie loaded from "telosys.properties" )


Field Summary
static int CLASSPATH
           
static int FILESYSTEM
           
static java.lang.String SCREEN_CONTEXT_CONVENTION
           
static java.lang.String SERVICE_PACKAGE_CONVENTION
           
static int UNKNOWN
           
static java.lang.String UPLOAD_CHARSET
           
static java.lang.String UPLOAD_DIR
           
static java.lang.String UPLOAD_MAX_SIZE
           
static java.lang.String UPLOAD_URL
           
static int WEBAPP
           
 
Constructor Summary
protected TelosysProperties(java.util.Properties prop, java.lang.String file, int origin)
          Constructs a new properties holder
 
Method Summary
 java.lang.String getConfigFile(java.lang.String sPropertyName)
          Returns the config file name associated with the given property name
NB : if the value starts with "
 java.lang.String getFile()
          Returns the properties file name
 java.util.Date getInitDate()
          Returns the properties init date and time
 int getOrigin()
          Returns the properties origin
 java.util.Properties getProperties()
          Returns the properties
 java.lang.String getProperty(java.lang.String sPropertyName)
          Returns the value of the given property name
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UPLOAD_URL

public static final java.lang.String UPLOAD_URL
See Also:
Constant Field Values

UPLOAD_DIR

public static final java.lang.String UPLOAD_DIR
See Also:
Constant Field Values

UPLOAD_CHARSET

public static final java.lang.String UPLOAD_CHARSET
See Also:
Constant Field Values

UPLOAD_MAX_SIZE

public static final java.lang.String UPLOAD_MAX_SIZE
See Also:
Constant Field Values

SCREEN_CONTEXT_CONVENTION

public static final java.lang.String SCREEN_CONTEXT_CONVENTION
See Also:
Constant Field Values

SERVICE_PACKAGE_CONVENTION

public static final java.lang.String SERVICE_PACKAGE_CONVENTION
See Also:
Constant Field Values

UNKNOWN

public static final int UNKNOWN
See Also:
Constant Field Values

FILESYSTEM

public static final int FILESYSTEM
See Also:
Constant Field Values

WEBAPP

public static final int WEBAPP
See Also:
Constant Field Values

CLASSPATH

public static final int CLASSPATH
See Also:
Constant Field Values
Constructor Detail

TelosysProperties

protected TelosysProperties(java.util.Properties prop,
                            java.lang.String file,
                            int origin)
Constructs a new properties holder

Parameters:
prop -
file -
origin -
Method Detail

getOrigin

public int getOrigin()
Returns the properties origin

Returns:
the origin constant : FILESYSTEM or WEBAPP or CLASSPATH

getProperties

public java.util.Properties getProperties()
Returns the properties

Returns:

getFile

public java.lang.String getFile()
Returns the properties file name

Returns:

getInitDate

public java.util.Date getInitDate()
Returns the properties init date and time

Returns:

getProperty

public java.lang.String getProperty(java.lang.String sPropertyName)
Returns the value of the given property name

Parameters:
sPropertyName -
Returns:
the property value or null

getConfigFile

public java.lang.String getConfigFile(java.lang.String sPropertyName)
Returns the config file name associated with the given property name
NB : if the value starts with ".", the "." is replaced by the "telosys.properties" location
e.g. : "./myfile" --> "location/myfile"

Parameters:
sPropertyName - : e.g. "ScreensConfFile", "DbConfFile", ... ( see telosys.properties )
Returns:
the value

toString

public java.lang.String toString()