|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mmbase.module.Module
org.mmbase.module.ProcessorModule
org.mmbase.module.Config
This module analyses the MMBase XML configuration files.
LIST functions are:
- token=SHOW
- type={builders,databases,modules}
Returns an list of arrays:
$ITEM1 = name of file
$ITEM2 = DTD-based syntax check: false, nodtd, true
and for builders and databases there is:
$ITEM3 = whether the item is active: false, true
REPLACE functions are: SHOW, CHECK and ANNOTATE
where the next argument is the directory, e.g. 'builders'
and the third the name of the file without the .xml extension.
SHOW: return a string with syntax colored XML file
CHECK: return 1 if validates ok, -1 if not
ANNOTATE: return a string with the XML file with errors listed
and pointed out visually.
Example: $MOD-CONFIG-SHOW-builders-people
Additional REPLACE function is: REPORT
which has no arguments.
| Nested Class Summary | |
class |
Config.XMLFilenameFilter
Implement a FilenameFilter for xml files |
| Constructor Summary | |
Config()
Config, a support module for servscan |
|
| Method Summary | |
protected java.lang.String |
annotateXML(java.lang.String path)
|
boolean |
builderIsActive(java.lang.String path)
|
protected java.lang.String |
checkXML(java.lang.String path)
|
protected int |
checkXMLOk(java.lang.String path)
Do validity check on XML file |
boolean |
databaseIsActive(java.lang.String path)
|
java.util.Vector |
getList(scanpage sp,
StringTagger tagger,
java.lang.String value)
Generate a list of values from a command to the processor |
java.lang.String |
getModuleInfo()
provide some info on the module |
protected java.lang.String |
htmlEntities(java.lang.String s)
|
void |
init()
Initializes the module. Init must be overridden to read the environment variables it needs. This method is called by Module.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead. |
java.util.Vector |
listConfigDirectories(java.lang.String path)
|
protected java.util.Vector |
listDirectory(java.lang.String path)
Retrieve all xml files in a directory |
void |
onload()
prepares the module when loaded. Onload must be overridden to execute methods that need to be performed when the module is loaded but before any other modules are initailized. This method is called by Module.startModules(). You should not call onload() directly. |
protected java.lang.String |
prettyPrintXML(java.lang.String path)
|
boolean |
process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
Execute the commands provided in the form values |
void |
reload()
What should this do, when is this called? (MM) |
java.lang.String |
replace(scanpage sp,
java.lang.String cmds)
Handle a $MOD command |
java.lang.String |
report(java.lang.String eol)
Temporary overall wrapper for report information |
java.lang.String |
reportBuilders(java.lang.String eol)
|
void |
shutdown()
Shuts down the module. |
void |
unload()
What should this do, when is this called? (MM) |
| Methods inherited from class org.mmbase.module.ProcessorModule |
cacheCheck, getListBuilder, getNodeList, replace |
| Methods inherited from class org.mmbase.module.Module |
getInitParameter, getInitParameters, getMaintainer, getMimeType, getMimeTypeFile, getModule, getModule, getModules, getName, getProperties, getProperty, getVersion, hasStarted, loadModulesFromDisk, maintainance, setInitParameter, setMaintainer, setName, setVersion, shutdownModules, startModule, startModules, state |
| 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 boolean builderIsActive(java.lang.String path)
public boolean databaseIsActive(java.lang.String path)
path - Relative path to database mapping file
public void init()
ProcessorModuleModule.startModule(), which makes sure it is not called
more than once. You should not call init() directly, call startModule() instead.
init in class ProcessorModulepublic void reload()
ProcessorModule
reload in class ProcessorModulepublic void onload()
ProcessorModuleModule.startModules(). You should not call onload() directly.
onload in class ProcessorModulepublic void unload()
ProcessorModule
unload in class ProcessorModulepublic void shutdown()
Module
shutdown in class Module
public java.util.Vector getList(scanpage sp,
StringTagger tagger,
java.lang.String value)
throws ParseException
getList in interface ProcessorInterfacegetList in class ProcessorModuleParseExceptionpublic java.util.Vector listConfigDirectories(java.lang.String path)
path - Path to root of configuration files
protected java.util.Vector listDirectory(java.lang.String path)
throws java.io.IOException
path - Directory path
java.io.IOException
public boolean process(scanpage sp,
java.util.Hashtable cmds,
java.util.Hashtable vars)
process in interface ProcessorInterfaceprocess in class ProcessorModulepublic java.lang.String report(java.lang.String eol)
public java.lang.String reportBuilders(java.lang.String eol)
public java.lang.String replace(scanpage sp,
java.lang.String cmds)
replace in interface ProcessorInterfacereplace in class ProcessorModulepublic java.lang.String getModuleInfo()
Module
getModuleInfo in class Moduleprotected java.lang.String prettyPrintXML(java.lang.String path)
protected int checkXMLOk(java.lang.String path)
protected java.lang.String htmlEntities(java.lang.String s)
protected java.lang.String annotateXML(java.lang.String path)
protected java.lang.String checkXML(java.lang.String path)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||