|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlab.coda.afecs.sqldb.Db2Cool
public class Db2Cool
JSA: Thomas Jefferson National Accelerator Facility
This software was developed under a United States Government license,
described in the NOTICE file included as part of this distribution.
Copyright (c), Oct 1, 2009
Field Summary | |
---|---|
java.lang.String |
coolHome
|
java.lang.String |
expid
|
boolean |
isConnected
|
Constructor Summary | |
---|---|
Db2Cool()
Constructor |
Method Summary | |
---|---|
void |
closeDbConnection()
Closes connection to the database |
void |
generateComponentDescriptionFile(java.lang.String cnf,
DbComponent dc)
Generates .rf cool files describing components of the control |
void |
generateControl(java.lang.String cnf,
java.util.ArrayList<DbComponent> components,
DbOption opt)
Generates .rf cool file describing control |
void |
generateCool(java.lang.String cnf)
Creates cool file. |
void |
generateOptionDescriptionFile(java.lang.String cnf,
DbOption opt)
|
void |
generateProcessDescriptionFile(java.lang.String cnf,
java.lang.String dcname,
java.lang.String pp,
java.lang.String statename,
java.lang.String prcommand,
int pnum)
|
void |
generateSupervisorDescriptionFile(java.lang.String cnf,
DbComponent dc)
Generates .rf cool files describing supervisor of the control |
java.util.ArrayList<DbComponent> |
getDbComponents(java.lang.String cnf)
Returns arraylist of components described in the configuration(runtype) table. |
void |
getDbConnection()
Creats connection objaect to the database. |
DbOption |
getDbOption(java.lang.String cnf)
Get options table for the specified configuration. |
java.util.ArrayList<java.lang.String> |
getDbRuntypes()
Reads the coda db runtypes table and returns all the runtype( configuration) names. |
java.util.ArrayList<java.lang.String> |
getDbSessions()
Reads the coda db sessions table and returns all sessions names. |
static void |
main(java.lang.String[] args)
The main method of the class |
ASessionInfo |
translateDbSession(java.lang.String sessionName)
Reads the db sessions table and creates ASessionInfo object |
void |
translateToCool(java.lang.String tmpruntype)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public java.lang.String coolHome
public java.lang.String expid
public boolean isConnected
Constructor Detail |
---|
public Db2Cool()
Method Detail |
---|
public void getDbConnection()
public void closeDbConnection()
public java.util.ArrayList<java.lang.String> getDbRuntypes()
public java.util.ArrayList<java.lang.String> getDbSessions()
public ASessionInfo translateDbSession(java.lang.String sessionName)
ASessionInfo
objectpublic java.util.ArrayList<DbComponent> getDbComponents(java.lang.String cnf)
cnf
- The name of the configuration
DbComponent
objectspublic DbOption getDbOption(java.lang.String cnf)
cnf
- configuration(runtype) name
DbOption
objectpublic static void main(java.lang.String[] args)
args
- array of argumentspublic void translateToCool(java.lang.String tmpruntype)
public void generateControl(java.lang.String cnf, java.util.ArrayList<DbComponent> components, DbOption opt)
cnf
- control name ( the same as db runtype name)components
- arraylist of DbComponent
objectsopt
- DbOption
objectpublic void generateComponentDescriptionFile(java.lang.String cnf, DbComponent dc)
cnf
- the name of the configurationdc
- DbComponent
objectspublic void generateSupervisorDescriptionFile(java.lang.String cnf, DbComponent dc)
cnf
- the name of the configurationdc
- DbComponent
objectspublic void generateProcessDescriptionFile(java.lang.String cnf, java.lang.String dcname, java.lang.String pp, java.lang.String statename, java.lang.String prcommand, int pnum)
cnf
- the name of the configurationdcname
- component namepp
- "pre" or "post" if pre execute process before the statestatename
- state nameprcommand
- command stringpnum
- number of the process attached to this component and transitionpublic void generateOptionDescriptionFile(java.lang.String cnf, DbOption opt)
cnf
- the name of the configurationopt
- DbOption
objectpublic void generateCool(java.lang.String cnf)
cnf
- cool configuration name = db runtype name.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |