|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.util.defaults.DefaultsBuilder
A utility class that provides support for the establishment of a set of installation properties.
Constructor Summary | |
DefaultsBuilder(String key,
File work)
|
Method Summary | |
Properties |
getConsolidatedProperties(Properties defaults,
String[] keys)
Return a consolidated set of properties. |
Properties |
getConsolidatedProperties(Properties defaults,
String[] keys,
String[] sequence)
Return a consolidated set of properties. |
Properties |
getDirProperties()
Return the application specific properties from the current working directory. |
File |
getHomeDirectory()
Return the application home directory. |
static File |
getHomeDirectory(String key)
Return a home directory taking into account a supplied env symbol, a property key and a fallback directory. |
Properties |
getHomeProperties()
Return the application properties. |
static Properties |
getHomeProperties(File home,
String key,
boolean flag)
Create a installation properties object. |
static Properties |
getProperties(ClassLoader classloader,
String path)
|
static Properties |
getProperties(File file)
Create a properties object from the supplied file. |
static Properties |
getProperties(File dir,
String key)
Create a dir properties object. |
Properties |
getUserProperties()
Return the application specific properties from the users home directory. |
static Properties |
getUserProperties(String key)
Create a user properties object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultsBuilder(String key, File work) throws IOException
Method Detail |
public static File getHomeDirectory(String key) throws IOException
key
- an application key such as 'merlin'
IOException
public static Properties getHomeProperties(File home, String key, boolean flag) throws IOException
home
- the home directorykey
- the application keyflag
- if TRUE set the property '[key].home' to the home directory
IOException
public static Properties getUserProperties(String key) throws IOException
key
- the application key
IOException
public static Properties getProperties(File dir, String key) throws IOException
dir
- the base directorykey
- the application key
IOException
public static Properties getProperties(File file) throws IOException
file
- the properties file
IOException
public static Properties getProperties(ClassLoader classloader, String path) throws IOException
IOException
public File getHomeDirectory()
public Properties getHomeProperties()
public Properties getUserProperties()
public Properties getDirProperties()
public Properties getConsolidatedProperties(Properties defaults, String[] keys) throws IOException
defaults
- the source propertieskeys
- the simple property keys
IOException
public Properties getConsolidatedProperties(Properties defaults, String[] keys, String[] sequence) throws IOException
defaults
- the source propertieskeys
- the simple property keyssequence
- the sequence property keys
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |