|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.system.Config
public class Config
Global configuration store. Config is primarily concerned with listing and loading Cog XML files, but has some methods that are useful for querying other types of files.
| Constructor Summary | |
|---|---|
Config()
|
|
| Method Summary | |
|---|---|
static VFS |
getBase()
|
static Naming |
list(java.lang.String path)
Lists the available names under the given path. |
static Naming |
list(java.lang.String path,
java.lang.String extension)
Lists the available names under the given path. |
static Naming |
pathwiseList(java.lang.String subPath)
Does a listing for the given subPath under each of the available config paths. |
static Naming |
pathwiseMergeNaming(java.lang.String subPath)
Combines namings from config files in the order from least to most specific. |
static java.lang.Object |
pathwiseRetrieve(java.lang.String subPath)
First does a pathwise search, then retrieves the most specific object for the given subpath. |
static java.lang.String |
pathwiseSearch(java.lang.String subPath)
Finds the most specific instance of subPath from the available config paths. |
static java.lang.Object |
retrieve(java.lang.String path)
Retrieve a configuration object. |
static Cog |
retrieveCog(java.lang.String path)
|
static Naming |
retrieveFilesAsNaming(java.lang.String subPath)
Retrieves a naming by loading all cog xml files in the given path, setting the cog property "name" for each to its file name. |
static Naming |
retrieveNaming(java.lang.String path)
Retrieve a configuration object as a naming. |
static java.lang.Object |
retrieveOrDefault(java.lang.String path,
java.lang.Object defaultObject)
Retrieve a configuration object. |
static java.lang.Object |
retrievePreferences(java.lang.String path)
|
static Naming |
retrieveScriptsAsNaming(java.lang.String path,
java.util.ArrayList scriptLibDirs)
Takes a directory full of Groovy scripts and turns them into a Naming, indexed by the file name. |
static void |
setBase(VFS newVFS)
Sets the VFS base for the Config store. |
static void |
store(java.lang.String path,
java.lang.Object data)
Stores the object at the given path. |
static void |
storeCog(java.lang.String path,
Cog data)
|
static void |
storeNamingAsFiles(java.lang.String path,
Naming naming)
Stores the given naming by splitting up each entry into separate cog XMLs, using the entry's name as the file name. |
static void |
storePreferences(java.lang.String path,
java.lang.Object data)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Config()
| Method Detail |
|---|
public static Naming list(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static Naming list(java.lang.String path,
java.lang.String extension)
throws java.io.IOException
java.io.IOException
public static Naming pathwiseList(java.lang.String subPath)
throws java.io.IOException
java.io.IOException
public static Naming pathwiseMergeNaming(java.lang.String subPath)
throws java.io.IOException
java.io.IOException
public static java.lang.String pathwiseSearch(java.lang.String subPath)
throws java.io.IOException
java.io.IOException
public static java.lang.Object retrieve(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static Naming retrieveNaming(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static java.lang.Object retrieveOrDefault(java.lang.String path,
java.lang.Object defaultObject)
throws java.io.IOException
java.io.IOException
public static java.lang.Object pathwiseRetrieve(java.lang.String subPath)
throws java.io.IOException
java.io.IOException
public static Naming retrieveFilesAsNaming(java.lang.String subPath)
throws java.io.IOException
java.io.IOException
public static Naming retrieveScriptsAsNaming(java.lang.String path,
java.util.ArrayList scriptLibDirs)
throws java.io.IOException
java.io.IOException
public static void store(java.lang.String path,
java.lang.Object data)
throws java.io.IOException
java.io.IOException
public static void storeNamingAsFiles(java.lang.String path,
Naming naming)
throws java.io.IOException
java.io.IOExceptionpublic static void setBase(VFS newVFS)
public static VFS getBase()
public static Cog retrieveCog(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static void storeCog(java.lang.String path,
Cog data)
throws java.io.IOException
java.io.IOException
public static java.lang.Object retrievePreferences(java.lang.String path)
throws java.io.IOException
java.io.IOException
public static void storePreferences(java.lang.String path,
java.lang.Object data)
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||