public class ScriptObject
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private DbHelper |
_dbHelper
The _db helper.
|
private java.lang.String |
_dbName
The _db name.
|
private java.lang.String |
_driverName
The _driver name.
|
private java.lang.String |
_hostName
The _host name.
|
protected static org.apache.log4j.Logger |
_logger
The _logger.
|
private java.lang.String |
_passwordString
The _password string.
|
private java.util.Properties |
_props
The _props.
|
private PublishSupportObject |
_pso
The _pso.
|
protected static java.util.HashMap<java.lang.String,ScriptEntity> |
_scriptEntityMap
The _script entity map.
|
protected static ScriptFacades |
_scriptFacades
The _script facades.
|
private java.lang.String |
_userName
The _user name.
|
Constructor and Description |
---|
ScriptObject()
Instantiates a new script object.
|
Modifier and Type | Method and Description |
---|---|
void |
addAlert(java.lang.String source,
java.lang.String target,
java.lang.String description)
manually add an alert.
|
void |
deletePublishedPage(java.lang.String fullName)
Delete published page.
|
java.util.List<AlertInfoObject> |
getAlertList()
Gets the alert list.
|
java.lang.String[] |
getFacadeMethodList()
Gets the facade method list.
|
java.util.List<java.lang.String> |
getFullNameList()
Gets the list of fullNames
|
java.lang.String |
getInfo()
Get info about this class.
|
java.lang.String[] |
getLegalDbNames()
Get a list of all the databases that we can access.
|
PublishDataObject |
getPublishedPage(java.lang.String fullName)
Gets the published page.
|
java.lang.String |
getPublishedPageInfo()
Gets the published page info.
|
java.util.List<PublishDataObject> |
getPublishedPageList()
Gets the published page list.
|
SQLResult |
getSavedSQLs()
Returns a list of all the queries in the SQL table.
|
protected static ScriptEntity |
getScriptEntity(java.lang.String name)
Find the ScriptEntity by name.
|
ScriptResultObject |
getScriptResultObject(java.lang.String name)
Get the output of the script without running it.
|
java.lang.String |
getScriptSchedule(java.lang.String name)
Gets the script schedule.
|
java.lang.String[] |
getStoredScripts()
Get a list of all the scripts in the table_scripts
|
static void |
main(java.lang.String[] args)
The main method.
|
void |
removeScript(java.lang.String name)
Removes the script.
|
java.util.List<ScriptResultObject> |
runPeriodicScripts()
Run all the scripts that need to be run since the last time we called.
|
SQLResult |
runSQLStrings(java.lang.String databaseName,
java.lang.String sqlStrings,
java.lang.String variablesXML)
Run sql strings.
|
java.lang.Boolean |
saveMacrosXML(java.lang.String queryName,
java.lang.String xml)
Saves XML that contains variable names and values.
|
java.lang.Boolean |
saveSQLs(java.lang.String queryName,
java.lang.String databaseName,
java.lang.String SQLs,
java.lang.String xml)
Add or update a query in table_queries.
|
ScriptResultObject |
scriptRunner(java.lang.String name,
java.lang.String desc,
java.lang.String script)
Run the provided script in the given namespace.
|
void |
setScriptSchedule(java.lang.String name,
java.lang.String startDateTime,
int period)
Sets the script schedule.
|
private void |
setup()
Setup the database access.
|
void |
storeScript(java.lang.String name,
java.lang.String description,
byte[] bytes)
Store script.
|
private java.util.Properties _props
private DbHelper _dbHelper
private java.lang.String _hostName
private java.lang.String _dbName
private java.lang.String _driverName
private java.lang.String _userName
private java.lang.String _passwordString
private PublishSupportObject _pso
protected static org.apache.log4j.Logger _logger
protected static java.util.HashMap<java.lang.String,ScriptEntity> _scriptEntityMap
protected static ScriptFacades _scriptFacades
private void setup()
protected static ScriptEntity getScriptEntity(java.lang.String name)
name
- the namepublic java.lang.String getInfo()
public void addAlert(java.lang.String source, java.lang.String target, java.lang.String description)
source
- of the alerttarget(s)
- the alertdescription
- the description of the alertpublic java.util.List<AlertInfoObject> getAlertList()
public java.lang.String[] getLegalDbNames()
public java.lang.String[] getFacadeMethodList()
public java.lang.String getPublishedPageInfo()
public java.util.List<PublishDataObject> getPublishedPageList()
public PublishDataObject getPublishedPage(java.lang.String fullName)
fullName
- the full name we're matchingpublic java.util.List<java.lang.String> getFullNameList()
public void deletePublishedPage(java.lang.String fullName)
fullName
- the fullName we're matching onpublic java.lang.String[] getStoredScripts()
public ScriptResultObject scriptRunner(java.lang.String name, java.lang.String desc, java.lang.String script)
name
- the name of the script (generally the search key in the db)desc
- - descriptionscript
- - jython scriptpublic ScriptResultObject getScriptResultObject(java.lang.String name)
name
- the name of the script (generally the search key in the db)public java.lang.String getScriptSchedule(java.lang.String name)
name
- ScriptResultObjectpublic void setScriptSchedule(java.lang.String name, java.lang.String startDateTime, int period)
name
- the name of the script (generally the search key in the db)startDateTime
- the start dateTimeperiod
- the period (in minutes)public java.util.List<ScriptResultObject> runPeriodicScripts()
public void storeScript(java.lang.String name, java.lang.String description, byte[] bytes)
name
- the name to call the scriptdescription
- the description of what the script doesbytes
- the script as a binary objectpublic void removeScript(java.lang.String name)
name
- the name of the script to removepublic SQLResult runSQLStrings(java.lang.String databaseName, java.lang.String sqlStrings, java.lang.String variablesXML)
databaseName
- the database namesqlStrings
- the sql commands/queries to runvariablesXML
- the variables to embed in the sqlpublic java.lang.Boolean saveSQLs(java.lang.String queryName, java.lang.String databaseName, java.lang.String SQLs, java.lang.String xml)
queryName
- the query namedatabaseName
- the database nameSQLs
- the SQL queryxml
- macro xmlpublic SQLResult getSavedSQLs()
public java.lang.Boolean saveMacrosXML(java.lang.String queryName, java.lang.String xml)
queryName
- - the name that's stored in the query dbxml
- - the xml shown abovepublic static void main(java.lang.String[] args)
args
- the arguments