Compiere Looks 1.2.1

org.compiere.util
Class Ini

java.lang.Object
  |
  +--org.compiere.util.Ini
All Implemented Interfaces:
Serializable

public final class Ini
extends Object
implements Serializable

Load & Save INI Settings fopm property file Initiated in Compiere.startup Settings activated in ALogin.getIni

Version:
$Id: Ini.java,v 1.19 2003/01/11 05:46:34 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static String COMPIERE_HOME
          System Property Value of COMPIERE_HOME
static String COMPIERE_PROPERTY_FILE
           
static String ENV_PREFIX
          System environment prefix
static String P_A_COMMIT
           
static String P_A_LOGIN
           
static String P_CLIENT
           
static String P_COMPIERESYS
           
static String P_CONNECTION
           
static String P_CONTEXT
           
static String P_DEBUGLEVEL
           
static String P_INI
           
static String P_LANGUAGE
           
static String P_OBJECTS
           
static String P_ORG
           
static String P_PRINTER
           
static String P_PRINTPREVIEW
           
static String P_PWD
           
static String P_ROLE
           
static String P_SHOW_ACCT
           
static String P_SHOW_TRL
           
static String P_STORE_PWD
           
static String P_TEMP_DIR
           
static String P_TODAY
           
static String P_UI_LOOK
           
static String P_UI_THEME
           
static String P_UID
           
static String P_WAREHOUSE
           
 
Constructor Summary
Ini()
           
 
Method Summary
static String getAsString()
          toString
static String getCompiereHome()
          Get Compiere Home
static Properties getProperties()
          Get Properties
static String getProperty(String key)
          Get Propery
static boolean getPropertyBool(String key)
          Get Propery as Boolean
static boolean isClient()
          Are we in Client Mode ?
static boolean isLoaded()
          Are the properties loaded?
static void loadProperties(boolean reload)
          Load INI parameters from disk
static boolean loadProperties(String filename)
          Load INI parameters from filename
static void saveProperties(boolean tryUserHome)
          Save INI parameters to disk
static void setClient(boolean client)
          Set Client Mode
static void setCompiereHome(String CompiereHome)
          Set Compiere Home
static void setProperty(String key, boolean value)
          Set Property
static void setProperty(String key, int value)
          Set Property
static void setProperty(String key, String value)
          Set Property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPIERE_PROPERTY_FILE

public static final String COMPIERE_PROPERTY_FILE
See Also:
Constant Field Values

P_UID

public static final String P_UID
See Also:
Constant Field Values

P_PWD

public static final String P_PWD
See Also:
Constant Field Values

P_STORE_PWD

public static final String P_STORE_PWD
See Also:
Constant Field Values

P_DEBUGLEVEL

public static final String P_DEBUGLEVEL
See Also:
Constant Field Values

P_LANGUAGE

public static final String P_LANGUAGE
See Also:
Constant Field Values

P_INI

public static final String P_INI
See Also:
Constant Field Values

P_CONNECTION

public static final String P_CONNECTION
See Also:
Constant Field Values

P_CONTEXT

public static final String P_CONTEXT
See Also:
Constant Field Values

P_OBJECTS

public static final String P_OBJECTS
See Also:
Constant Field Values

P_UI_LOOK

public static final String P_UI_LOOK
See Also:
Constant Field Values

P_UI_THEME

public static final String P_UI_THEME
See Also:
Constant Field Values

P_A_COMMIT

public static final String P_A_COMMIT
See Also:
Constant Field Values

P_A_LOGIN

public static final String P_A_LOGIN
See Also:
Constant Field Values

P_COMPIERESYS

public static final String P_COMPIERESYS
See Also:
Constant Field Values

P_SHOW_ACCT

public static final String P_SHOW_ACCT
See Also:
Constant Field Values

P_SHOW_TRL

public static final String P_SHOW_TRL
See Also:
Constant Field Values

P_TEMP_DIR

public static final String P_TEMP_DIR
See Also:
Constant Field Values

P_ROLE

public static final String P_ROLE
See Also:
Constant Field Values

P_CLIENT

public static final String P_CLIENT
See Also:
Constant Field Values

P_ORG

public static final String P_ORG
See Also:
Constant Field Values

P_PRINTER

public static final String P_PRINTER
See Also:
Constant Field Values

P_WAREHOUSE

public static final String P_WAREHOUSE
See Also:
Constant Field Values

P_TODAY

public static final String P_TODAY
See Also:
Constant Field Values

P_PRINTPREVIEW

public static final String P_PRINTPREVIEW
See Also:
Constant Field Values

ENV_PREFIX

public static final String ENV_PREFIX
System environment prefix

See Also:
Constant Field Values

COMPIERE_HOME

public static final String COMPIERE_HOME
System Property Value of COMPIERE_HOME

See Also:
Constant Field Values
Constructor Detail

Ini

public Ini()
Method Detail

saveProperties

public static void saveProperties(boolean tryUserHome)
Save INI parameters to disk

Parameters:
tryUserHome - get user home first

loadProperties

public static void loadProperties(boolean reload)
Load INI parameters from disk

Parameters:
reload - reload

loadProperties

public static boolean loadProperties(String filename)
Load INI parameters from filename

Parameters:
filename - to load
Returns:
true if first time

setProperty

public static void setProperty(String key,
                               String value)
Set Property

Parameters:
key - Key
value - Value

setProperty

public static void setProperty(String key,
                               boolean value)
Set Property

Parameters:
key - Key
value - Value

setProperty

public static void setProperty(String key,
                               int value)
Set Property

Parameters:
key - Key
value - Value

getProperty

public static String getProperty(String key)
Get Propery

Parameters:
key - Key
Returns:
Value

getPropertyBool

public static boolean getPropertyBool(String key)
Get Propery as Boolean

Parameters:
key - Key
Returns:
Value

getProperties

public static Properties getProperties()
Get Properties

Returns:
Ini properties

getAsString

public static String getAsString()
toString

Returns:
String representation

isClient

public static boolean isClient()
Are we in Client Mode ?

Returns:
true if client

setClient

public static void setClient(boolean client)
Set Client Mode

Parameters:
client - client

isLoaded

public static boolean isLoaded()
Are the properties loaded?

Returns:
true if properties loaded.

getCompiereHome

public static String getCompiereHome()
Get Compiere Home

Returns:
CompiereHome or null

setCompiereHome

public static void setCompiereHome(String CompiereHome)
Set Compiere Home

Parameters:
CompiereHome - COMPIERE_HOME

Compiere Looks 1.2.1

Copyright (c) 1999-2003 ComPiere, Inc. - Author: Jorg Janke