Adempiere 3.5.2a

org.compiere.util
Class Ini

java.lang.Object
  extended by 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 Adempiere.startup Settings activated in ALogin.getIni

Change log:

Version:
$Id$
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static String ADEMPIERE_HOME
          System Property Value of ADEMPIERE_HOME
static String ADEMPIERE_PROPERTY_FILE
          Property file name
static String DEFAULT_LOAD_TAB_META_DATA_BG
           
static boolean DEFAULT_OPEN_WINDOW_MAXIMIZED
           
static String DEFAULT_SERVER_VALIDATE_SECURITY_TOKEN
           
static boolean DEFAULT_SINGLE_INSTANCE_PER_WINDOW
           
static String ENV_PREFIX
          System environment prefix
static String P_A_COMMIT
          Auto Save
static String P_A_LOGIN
          Auto Login
static String P_A_NEW
          Auto New Record
static String P_ADEMPIERESYS
          Dictionary Maintenance
static String P_CACHE_WINDOW
          Cache Windows
static String P_CHARSET
          Charset
static String P_CLIENT
          Client Name
static String P_CONNECTION
          Connection Details
static String P_CONTEXT
          Data Source
static String P_INI
          Ini File Name
static String P_LANGUAGE
          Language
static String P_LOAD_TAB_META_DATA_BG
          Load tab fields meta data using backgrond thread
static String P_LOGMIGRATIONSCRIPT
          Log Migration Script
static String P_OPEN_WINDOW_MAXIMIZED
          Open new windows as maximized
static String P_ORG
          Org Name
static String P_PRINTER
          Printer Name
static String P_PRINTPREVIEW
          Print Preview
static String P_PWD
          Apps Password
static String P_ROLE
          Role
static String P_SERVER_VALIDATE_SECURITY_TOKEN
          Apply wan security protection
static String P_SHOW_ACCT
          Show Acct Tabs
static String P_SHOW_ADVANCED
          Show Advanced Tabs
static String P_SHOW_TRL
          Show Translation Tabs
static String P_SINGLE_INSTANCE_PER_WINDOW
          Single instance per window id
static String P_STORE_PWD
          Store Password
static String P_TEMP_DIR
          Temp Directory
static String P_TODAY
          Current Date
static String P_TRACEFILE
          Trace to File
static String P_TRACELEVEL
          Trace Level
static String P_UI_LOOK
          Look & Feel
static String P_UI_THEME
          UI Theme
static String P_UID
          Apps User ID
static String P_VALIDATE_CONNECTION_ON_STARTUP
          Validate connection on startup
static String P_WAREHOUSE
          Warehouse Name
 
Constructor Summary
Ini()
           
 
Method Summary
static void deletePropertyFile()
          Delete Property file
static String findAdempiereHome()
          Find Adempiere Home
static String getAdempiereHome()
          Get Adempiere Home from Environment
static String getAsString()
          toString
static Charset[] getAvailableCharsets()
          Get Available Encoding Charsets
static Charset getCharset()
          Get current charset
static URL getCodeBase()
          Get JNLP CodeBase
static int getDividerLocation()
          Get Divider Location
static Properties getProperties()
          Get Properties
static String getProperty(String key)
          Get Propery
static String getPropertyFileName()
           
static Dimension getWindowDimension(int AD_Window_ID)
          Get Window Dimension
static Point getWindowLocation(int AD_Window_ID)
          Get Window Location
static boolean isCacheWindow()
          Cache Windows
static boolean isClient()
          Are we in Client Mode ?
static boolean isLoaded()
          Are the properties loaded?
static boolean isPropertyBool(String key)
          Get Propery as Boolean
static boolean isServerValidateSecurityToken()
           
static boolean isShowLicenseDialog()
          Is show license dialog for new setup
static boolean isWebStartClient()
           
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 setAdempiereHome(String AdempiereHome)
          Set Adempiere Home
static void setClient(boolean client)
          Set Client Mode
static void setDividerLocation(int dividerLocation)
          Set Divider Location
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
static void setShowLicenseDialog(boolean b)
          Set show license dialog for new setup
static void setWindowDimension(int AD_Window_ID, Dimension windowDimension)
          Set Window Dimension
static void setWindowLocation(int AD_Window_ID, Point windowLocation)
          Set Window Location
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADEMPIERE_PROPERTY_FILE

public static final String ADEMPIERE_PROPERTY_FILE
Property file name

See Also:
Constant Field Values

P_UID

public static final String P_UID
Apps User ID

See Also:
Constant Field Values

P_PWD

public static final String P_PWD
Apps Password

See Also:
Constant Field Values

P_STORE_PWD

public static final String P_STORE_PWD
Store Password

See Also:
Constant Field Values

P_TRACELEVEL

public static final String P_TRACELEVEL
Trace Level

See Also:
Constant Field Values

P_TRACEFILE

public static final String P_TRACEFILE
Trace to File

See Also:
Constant Field Values

P_LANGUAGE

public static final String P_LANGUAGE
Language

See Also:
Constant Field Values

P_INI

public static final String P_INI
Ini File Name

See Also:
Constant Field Values

P_CONNECTION

public static final String P_CONNECTION
Connection Details

See Also:
Constant Field Values

P_CONTEXT

public static final String P_CONTEXT
Data Source

See Also:
Constant Field Values

P_UI_LOOK

public static final String P_UI_LOOK
Look & Feel

See Also:
Constant Field Values

P_UI_THEME

public static final String P_UI_THEME
UI Theme

See Also:
Constant Field Values

P_A_COMMIT

public static final String P_A_COMMIT
Auto Save

See Also:
Constant Field Values

P_A_LOGIN

public static final String P_A_LOGIN
Auto Login

See Also:
Constant Field Values

P_A_NEW

public static final String P_A_NEW
Auto New Record

See Also:
Constant Field Values

P_ADEMPIERESYS

public static final String P_ADEMPIERESYS
Dictionary Maintenance

See Also:
Constant Field Values

P_LOGMIGRATIONSCRIPT

public static final String P_LOGMIGRATIONSCRIPT
Log Migration Script

See Also:
Constant Field Values

P_SHOW_ACCT

public static final String P_SHOW_ACCT
Show Acct Tabs

See Also:
Constant Field Values

P_SHOW_ADVANCED

public static final String P_SHOW_ADVANCED
Show Advanced Tabs

See Also:
Constant Field Values

P_SHOW_TRL

public static final String P_SHOW_TRL
Show Translation Tabs

See Also:
Constant Field Values

P_CACHE_WINDOW

public static final String P_CACHE_WINDOW
Cache Windows

See Also:
Constant Field Values

P_TEMP_DIR

public static final String P_TEMP_DIR
Temp Directory

See Also:
Constant Field Values

P_ROLE

public static final String P_ROLE
Role

See Also:
Constant Field Values

P_CLIENT

public static final String P_CLIENT
Client Name

See Also:
Constant Field Values

P_ORG

public static final String P_ORG
Org Name

See Also:
Constant Field Values

P_PRINTER

public static final String P_PRINTER
Printer Name

See Also:
Constant Field Values

P_WAREHOUSE

public static final String P_WAREHOUSE
Warehouse Name

See Also:
Constant Field Values

P_TODAY

public static final String P_TODAY
Current Date

See Also:
Constant Field Values

P_PRINTPREVIEW

public static final String P_PRINTPREVIEW
Print Preview

See Also:
Constant Field Values

P_VALIDATE_CONNECTION_ON_STARTUP

public static final String P_VALIDATE_CONNECTION_ON_STARTUP
Validate connection on startup

See Also:
Constant Field Values

P_SINGLE_INSTANCE_PER_WINDOW

public static final String P_SINGLE_INSTANCE_PER_WINDOW
Single instance per window id

See Also:
Constant Field Values

DEFAULT_SINGLE_INSTANCE_PER_WINDOW

public static final boolean DEFAULT_SINGLE_INSTANCE_PER_WINDOW
See Also:
Constant Field Values

P_OPEN_WINDOW_MAXIMIZED

public static final String P_OPEN_WINDOW_MAXIMIZED
Open new windows as maximized

See Also:
Constant Field Values

DEFAULT_OPEN_WINDOW_MAXIMIZED

public static final boolean DEFAULT_OPEN_WINDOW_MAXIMIZED
See Also:
Constant Field Values

P_CHARSET

public static final String P_CHARSET
Charset

See Also:
Constant Field Values

P_LOAD_TAB_META_DATA_BG

public static final String P_LOAD_TAB_META_DATA_BG
Load tab fields meta data using backgrond thread

See Also:
Constant Field Values

DEFAULT_LOAD_TAB_META_DATA_BG

public static final String DEFAULT_LOAD_TAB_META_DATA_BG
See Also:
Constant Field Values

P_SERVER_VALIDATE_SECURITY_TOKEN

public static final String P_SERVER_VALIDATE_SECURITY_TOKEN
Apply wan security protection

See Also:
Constant Field Values

DEFAULT_SERVER_VALIDATE_SECURITY_TOKEN

public static final String DEFAULT_SERVER_VALIDATE_SECURITY_TOKEN
See Also:
Constant Field Values

ENV_PREFIX

public static final String ENV_PREFIX
System environment prefix

See Also:
Constant Field Values

ADEMPIERE_HOME

public static final String ADEMPIERE_HOME
System Property Value of ADEMPIERE_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

getCodeBase

public static URL getCodeBase()
Get JNLP CodeBase

Returns:
code base or null

isWebStartClient

public static boolean isWebStartClient()
Returns:
True if client is started using web start

loadProperties

public static boolean loadProperties(String filename)
Load INI parameters from filename. Logger is on default level (INFO)

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

deletePropertyFile

public static void deletePropertyFile()
Delete Property file


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

isPropertyBool

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

Parameters:
key - Key
Returns:
Value

isCacheWindow

public static boolean isCacheWindow()
Cache Windows

Returns:
true if windows are cached

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

setShowLicenseDialog

public static void setShowLicenseDialog(boolean b)
Set show license dialog for new setup

Parameters:
b -

isShowLicenseDialog

public static boolean isShowLicenseDialog()
Is show license dialog for new setup

Returns:
boolean

isLoaded

public static boolean isLoaded()
Are the properties loaded?

Returns:
true if properties loaded.

getAdempiereHome

public static String getAdempiereHome()
Get Adempiere Home from Environment

Returns:
AdempiereHome or null

setAdempiereHome

public static void setAdempiereHome(String AdempiereHome)
Set Adempiere Home

Parameters:
AdempiereHome - ADEMPIERE_HOME

findAdempiereHome

public static String findAdempiereHome()
Find Adempiere Home

Returns:
adempiere home or null

getWindowDimension

public static Dimension getWindowDimension(int AD_Window_ID)
Get Window Dimension

Parameters:
AD_Window_ID - window no
Returns:
dimension or null

setWindowDimension

public static void setWindowDimension(int AD_Window_ID,
                                      Dimension windowDimension)
Set Window Dimension

Parameters:
AD_Window_ID - window
windowDimension - dimension - null to remove

getWindowLocation

public static Point getWindowLocation(int AD_Window_ID)
Get Window Location

Parameters:
AD_Window_ID - window id
Returns:
location or null

setWindowLocation

public static void setWindowLocation(int AD_Window_ID,
                                     Point windowLocation)
Set Window Location

Parameters:
AD_Window_ID - window
windowLocation - location - null to remove

getDividerLocation

public static int getDividerLocation()
Get Divider Location

Returns:
location

setDividerLocation

public static void setDividerLocation(int dividerLocation)
Set Divider Location

Parameters:
dividerLocation - location

getAvailableCharsets

public static Charset[] getAvailableCharsets()
Get Available Encoding Charsets

Returns:
array of available encoding charsets
Since:
3.1.4

getCharset

public static Charset getCharset()
Get current charset

Returns:
current charset
Since:
3.1.4

isServerValidateSecurityToken

public static boolean isServerValidateSecurityToken()

getPropertyFileName

public static String getPropertyFileName()

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.