|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.bastille.psml.PSMLConfig
public final class PSMLConfig
PSML configuration.
Field Summary | |
---|---|
static String |
BASTILLE_PSML_ROOT
The key for the root folder containing all PSML files, including config and content. |
static String |
DEFAULT_PSML_EXTENSION
The default extension used by PSML files. |
static String |
DEFAULT_PSML_ROOT
The default folder used by PSML files. |
static String |
MEDIATYPE
The media type. |
Method Summary | |
---|---|
static PSMLFile |
getConfigFile(String pathInfo)
Returns the config file from the path. |
static PSMLFile |
getContentFile(String pathInfo)
Returns the content file from the path. |
static PSMLFile |
getContentFolder(String pathInfo)
Returns the content folder from the path. |
static PSMLFile |
getFile(String pathInfo)
Returns the config file from the path. |
static PSMLFile |
getFolder(String pathInfo)
Returns the config file from the path. |
static File |
getRoot()
Returns the root folder for all files. |
static File |
getRoot(boolean create)
Returns the root folder for all files. |
static String |
load(PSMLFile psml)
Loads the specified XML file and returns it as a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MEDIATYPE
public static final String BASTILLE_PSML_ROOT
public static final String DEFAULT_PSML_ROOT
public static final String DEFAULT_PSML_EXTENSION
Method Detail |
---|
public static PSMLFile getConfigFile(String pathInfo)
pathInfo
- The path info from within the "config" folder.
public static PSMLFile getContentFile(String pathInfo)
pathInfo
- The path info from within the "content" folder.
public static PSMLFile getContentFolder(String pathInfo)
pathInfo
- The path info from within the "content" folder.
public static PSMLFile getFolder(String pathInfo)
pathInfo
- The path info from within the root folder.
public static PSMLFile getFile(String pathInfo)
pathInfo
- The path info from within the root folder.
public static File getRoot()
The PSML root folder can be defined in the config-[mode].xml
using the key
"bastille.psml.root".
public static File getRoot(boolean create)
The PSML root folder can be defined in the config-[mode].xml
using the key
"bastille.psml.root".
create
- Do create if the directory does not exist.
public static String load(PSMLFile psml) throws IOException
The XML returned is wrapped in the following XML:
<psml-file name="[filename]" base="[basedir]" status="[status]"> ... </psml-file>
psml
- The PSML file to load
IOException
- If an error occurs while trying to read or write the XML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |