|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.application.Application
public final class Application
This class manages the name and root directory of an application.
Because other parts of the framework and applications built on top
of it rely on this setting, the class should be initialized by
a call to initialize() as soon as possible.
| Field Summary | |
|---|---|
static java.lang.String |
ROOTDIR_PROVIDER
Root directory name |
static java.lang.String |
SYSTEM_PROVIDER
System provider name |
| Method Summary | |
|---|---|
static void |
defineRootDirSettingName(java.lang.String name)
Defines one of the names under which the root directory should appear in the SettingUtil. |
static java.lang.String |
getAppName()
Deprecated. Application name functionality has been removed |
static java.lang.String[] |
getArguments()
Gets the command line arguments. |
static java.lang.String |
getRootDir()
Gets the root dir. |
static void |
initialize()
Sets resource and Log4j property file locations according to the application name and root dir. |
protected static void |
initializeRootDir()
Initializes the root directory from the argument list or the system properties if not set yet. |
protected static void |
initializeSettingProvidersAndLogger()
Sets up the default providers of the setting manager. |
static void |
registerPropertyResource(java.lang.String resourceName,
int priority,
boolean writeable)
Registers a property file resource. |
static void |
setAppName(java.lang.String appNameArg)
Deprecated. Application name functionality has been removed |
static void |
setArguments(java.lang.String[] argumentsArg)
Sets the command line arguments. |
static void |
setNameAndArguments(java.lang.String name,
java.lang.String[] args)
Deprecated. Application name functionality has been removed; use setArguments(java.lang.String[]) instead |
static void |
setRootDir(java.lang.String rd)
Sets the default root dir of the application. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String SYSTEM_PROVIDER
public static final java.lang.String ROOTDIR_PROVIDER
| Method Detail |
|---|
public static void setNameAndArguments(java.lang.String name,
java.lang.String[] args)
setArguments(java.lang.String[]) instead
name - Name of the application (defines resource sub directory)args - Command line argumentspublic static void initialize()
protected static void initializeRootDir()
protected static void initializeSettingProvidersAndLogger()
SystemPropertyProvider using the name "system" and priority 100
and an PropertyFileProvider that accesses the specified property file as read-only provider
using the name "core" and priority 90.
public static void registerPropertyResource(java.lang.String resourceName,
int priority,
boolean writeable)
resourceName - Resource namepriority - Setting resource provider priority to usewriteable - true if this is a writable resource; In this case, the properties will be saved back to the property resource if changed.
Note that the resource must be writable (i. e. a property file).public static java.lang.String getAppName()
public static void setAppName(java.lang.String appNameArg)
public static java.lang.String[] getArguments()
public static void setArguments(java.lang.String[] argumentsArg)
public static java.lang.String getRootDir()
public static void setRootDir(java.lang.String rd)
rd - Root directorypublic static void defineRootDirSettingName(java.lang.String name)
initialize()().
name - Name to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||