|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.system.Module
public class Module
| Constructor Summary | |
|---|---|
Module(VfsDirectory directory)
|
|
| Method Summary | |
|---|---|
java.lang.String |
applyTemplate(java.lang.String name)
Applies the named template (a script file in the templates/ directory) and returns the result. |
java.lang.String |
applyTemplate(java.lang.String name,
Naming<java.lang.Object> variables)
Applies the named template (a script file in the templates/ directory) and returns the result. |
java.lang.String |
applyTemplate(java.lang.String name,
java.lang.Object... variables)
Applies the named template (a script file in the templates/ directory) and returns the result. |
void |
buildMapsetConfig()
Same as buildMapsetConfig, but builds the mapset config for the mapset of the same name as this module. |
VfsDirectory |
buildMapsetConfig(java.lang.String mapsetName)
Builds a config/FOO/mapsets/BAR directory structure from the defaults in this module. |
VfsDirectory |
buildModuleConfig()
Builds a config/FOO/modules/BAR directory structure from the defaults in this module (under the "default/config/" directory). |
void |
buildModuleConfigDataAndMapsets()
Builds module config, data, and all mapsets included from defaults. |
VfsDirectory |
buildModuleData()
Builds a data/FOO/ directory structure from the defaults in this module (under the "default/data/" directory). |
int |
compareTo(Module nother)
|
void |
createFileFromTemplate(java.lang.String name,
Path outputPath,
Naming<java.lang.Object> variables)
Applies the named template (a .st file in the templates/ directory) and writes the result to the file at the given path. |
void |
createFileFromTemplate(java.lang.String name,
Path outputPath,
java.lang.Object... variables)
Applies the named template (a .st file in the templates/ directory) and writes the result to the file at the given path. |
void |
createFileFromTemplate(java.lang.String name,
VfsFile outputFile,
Naming<java.lang.Object> variables)
Applies the named template (a .st file in the templates/ directory) and writes the result to the file given. |
void |
createFileFromTemplate(java.lang.String name,
VfsFile outputFile,
java.lang.Object... variables)
Applies the named template (a .st file in the templates/ directory) and writes the result to the given file. |
SqlDatabase |
databaseNamed(java.lang.String databaseName)
Returns the configured SqlDatabase stored with the same name (plus .xml extension) in the databases/ subdirectory of the module. |
ScriptKeeper |
getAppScripts()
|
VfsDirectory |
getConfigDirectory()
The directory containing configuration associated with the module, generally PARTNERINSTALL/config/CONFIGLEVEL/modules/MODULENAME |
ConfigLevel |
getConfigLevel()
Returns the config level this module is at (i.e. |
ScriptKeeper |
getControlScripts()
|
VfsDirectory |
getDataDirectory()
The directory containing user data associated with the module, generally PARTNERINSTALL/data/MODULENAME |
VfsDirectory |
getDirectory()
The directory containing the module's code and resources, generally modules/CONFIGLEVEL/MODULENAME |
ScriptKeeper |
getEventScripts()
|
VfsDirectory |
getLogDirectory()
The directory containing any module-specific logs. |
java.lang.String |
getName()
|
Naming<java.lang.Object> |
getProfile()
Returns the module's profile from modules/FOO/THISMODULE/profile.xml. |
CogSchema |
getSchema()
|
ScriptKeeper |
getScripts()
|
Naming<java.lang.Object> |
getSettings()
Returns the settings from config/FOO/modules/THISMODULE/settings.xml. |
VfsDirectory |
getTempDirectory()
The directory containing temporary or cache data associated with the module, generally PARTNERINSTALL/temp/MODULENAME |
ScriptKeeper |
getTemplateScripts()
|
Naming<java.lang.Object> |
getVariables()
Module-level variables. |
Version |
getVersion()
|
ScriptKeeper |
getWorkbenchScripts()
|
void |
initialize()
Initializes the module by running all scripts (must be .bsh) in control/initialize. |
boolean |
isWatchingForNewFiles()
|
java.util.List<java.lang.String> |
listApps()
Returns a list of named apps supplied by this module. |
java.util.List<Dependency> |
listDependencies()
Returns a list of Dependency objects representing other modules this one depends on. |
java.util.List<VfsFile> |
listJars()
List jar files in this module, including native ones in os/FOO/jars. |
java.util.List<VfsDirectory> |
listMapsets()
Returns a list of available mapset definition directories. |
java.util.List<VfsDirectory> |
listNativeLibs()
List native library directories in this module. |
java.util.List<VfsDirectory> |
listScriptLibs(java.lang.String language)
Lists the script libraries in this module, for the given scripting language name (e.g. |
VfsDirectory |
mapsetNamed(java.lang.String name)
Returns the directory for the named mapset definition, or null if there is none by that name in this module. |
Cog |
readCogFrom(Path path)
Loads a Cog from a Cog format XML file given by the path. |
Cog |
readCogFrom(java.lang.String pathString)
Loads a Cog from a Cog format XML file given by the named path. |
Cog |
readCogFrom(VfsFile file)
Loads a Cog from a Cog format XML file. |
java.lang.Object |
readObjectFrom(Path path)
Loads an object from a Cog format XML file given by the path. |
java.lang.Object |
readObjectFrom(java.lang.String pathString)
Loads an object from a Cog format XML file given by the named path. |
java.lang.Object |
readObjectFrom(VfsFile file)
Loads an object from a Cog format XML file. |
void |
reloadScripts()
Completely reloads the scripts and script keepers. |
void |
runAppScript(java.lang.String name)
Runs the named app script. |
void |
runAppScriptAndThrowException(java.lang.String name)
Runs the named app script. |
void |
runEventScripts(java.lang.String sourceModule,
java.lang.String event,
Naming<java.lang.Object> variables)
Runs all event scripts. |
void |
runEventScripts(java.lang.String sourceModule,
java.lang.String event,
java.lang.Object... variables)
Runs all event scripts. |
void |
runScript(java.lang.String name)
Runs the named general script. |
void |
runScript(java.lang.String name,
Naming<java.lang.Object> variables)
Runs the named general script. |
void |
runScript(java.lang.String name,
java.lang.Object... variables)
Runs the named general script. |
Script |
scriptFor(java.lang.String name)
Runs the named general script. |
void |
setVersion(Version newValue)
|
void |
setWatchingForNewFiles(boolean watchingForNewFiles)
|
void |
shutdown()
Shuts down the module by running all scripts in control/shutdown. |
void |
startup()
Starts the module by running all scripts in control/startup. |
java.lang.String |
toString()
|
boolean |
validate()
Runs a validation check, logs any problems, and returns true if the check passed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Module(VfsDirectory directory)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void reloadScripts()
public java.util.List<VfsFile> listJars()
public java.util.List<VfsDirectory> listNativeLibs()
public java.util.List<VfsDirectory> listScriptLibs(java.lang.String language)
public java.util.List<Dependency> listDependencies()
public java.util.List<java.lang.String> listApps()
public java.util.List<VfsDirectory> listMapsets()
public VfsDirectory mapsetNamed(java.lang.String name)
public void buildMapsetConfig()
throws java.io.IOException
java.io.IOException
public VfsDirectory buildMapsetConfig(java.lang.String mapsetName)
throws java.io.IOException
java.io.IOException
public VfsDirectory buildModuleConfig()
throws java.io.IOException
java.io.IOException
public VfsDirectory buildModuleData()
throws java.io.IOException
java.io.IOException
public void buildModuleConfigDataAndMapsets()
throws java.io.IOException
java.io.IOExceptionpublic boolean validate()
public void initialize()
public void startup()
public void shutdown()
public void runEventScripts(java.lang.String sourceModule,
java.lang.String event,
Naming<java.lang.Object> variables)
public void runEventScripts(java.lang.String sourceModule,
java.lang.String event,
java.lang.Object... variables)
public void runAppScript(java.lang.String name)
public void runScript(java.lang.String name)
public void runScript(java.lang.String name,
Naming<java.lang.Object> variables)
public void runScript(java.lang.String name,
java.lang.Object... variables)
public Script scriptFor(java.lang.String name)
public void runAppScriptAndThrowException(java.lang.String name)
throws java.lang.Throwable
java.lang.Throwable
public java.lang.String applyTemplate(java.lang.String name,
Naming<java.lang.Object> variables)
public java.lang.String applyTemplate(java.lang.String name)
public java.lang.String applyTemplate(java.lang.String name,
java.lang.Object... variables)
public void createFileFromTemplate(java.lang.String name,
Path outputPath,
Naming<java.lang.Object> variables)
public void createFileFromTemplate(java.lang.String name,
VfsFile outputFile,
Naming<java.lang.Object> variables)
public void createFileFromTemplate(java.lang.String name,
VfsFile outputFile,
java.lang.Object... variables)
public void createFileFromTemplate(java.lang.String name,
Path outputPath,
java.lang.Object... variables)
public int compareTo(Module nother)
compareTo in interface java.lang.Comparable<Module>public java.lang.String toString()
toString in class java.lang.Objectpublic Naming<java.lang.Object> getProfile()
public Naming<java.lang.Object> getSettings()
public java.lang.Object readObjectFrom(java.lang.String pathString)
throws java.io.IOException
java.io.IOException
public java.lang.Object readObjectFrom(Path path)
throws java.io.IOException
java.io.IOException
public java.lang.Object readObjectFrom(VfsFile file)
throws java.io.IOException
java.io.IOException
public Cog readCogFrom(java.lang.String pathString)
throws java.io.IOException
java.io.IOException
public Cog readCogFrom(Path path)
throws java.io.IOException
java.io.IOException
public Cog readCogFrom(VfsFile file)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getName()
public VfsDirectory getDirectory()
public VfsDirectory getTempDirectory()
public VfsDirectory getLogDirectory()
public VfsDirectory getDataDirectory()
public VfsDirectory getConfigDirectory()
public Version getVersion()
public void setVersion(Version newValue)
public Naming<java.lang.Object> getVariables()
public ConfigLevel getConfigLevel()
public ScriptKeeper getControlScripts()
public ScriptKeeper getEventScripts()
public ScriptKeeper getTemplateScripts()
public ScriptKeeper getAppScripts()
public ScriptKeeper getScripts()
public ScriptKeeper getWorkbenchScripts()
public CogSchema getSchema()
public SqlDatabase databaseNamed(java.lang.String databaseName)
throws java.io.IOException
databaseName -
java.io.IOExceptionpublic boolean isWatchingForNewFiles()
public void setWatchingForNewFiles(boolean watchingForNewFiles)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||