|
|||||||||
| Home >> All >> evt >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
evt.gui
Class JspmEvtDbMySql

java.lang.Objectevt.gui.JspmEvtDbMySql
- All Implemented Interfaces:
- JspmEvtDb
- public class JspmEvtDbMySql
- extends java.lang.Object
- implements JspmEvtDb
- extends java.lang.Object
This class defines the connection to the event management database. It includes all the methods to create/delete/update events in the JSPM event management database.
- Version:
- 0.0.8
| Field Summary | |
(package private) java.sql.Connection |
con
The database connection used to connect to the SQL database |
private static int |
debugLevel
The debug level. |
private static java.lang.String |
JSPM_HOME
The JSPM home directory. |
private com.jdk.JspmLogWriter |
logWriter
The log writer class |
| Constructor Summary | |
JspmEvtDbMySql()
Constructor. |
|
JspmEvtDbMySql(com.jdk.JspmLogWriter lw)
Constructor. |
|
| Method Summary | |
void |
addAction(int msgid,
java.lang.String group,
int sequence,
int fcolor,
int bcolor,
int attr,
int sev,
int act,
java.lang.String text)
Adds a action to the action table |
void |
addEvent(java.lang.String source,
java.lang.String node,
int type,
java.lang.String data)
This method adds an event to the event management database. |
void |
addMessage(int id,
java.lang.String token,
java.lang.String text,
java.lang.String dsc,
java.lang.String group,
java.lang.String owner,
java.lang.String node,
java.lang.String source)
Adds a message to the message table |
void |
close()
Closes the connection to the JSPMEVT database. |
boolean |
connect()
Connects to the local database. |
boolean |
connect(java.lang.String host,
java.lang.String user,
java.lang.String passwd)
Connects to the local database using the specified user/passwd |
int |
deleteActionByGroup(java.lang.String group)
Delete action by group |
int |
deleteActionByMsgid(int msgid)
Delete action by msgid |
void |
deleteEvent(int id)
This method adds an event to the event management database. |
int |
deleteMessageByGroup(java.lang.String group)
Delete message by token |
int |
deleteMessageById(int id)
Delete message by id |
int |
deleteMessageByToken(java.lang.String token)
Delete message by token |
void |
delKeep(java.lang.String token)
This deletes a sendkeep message |
java.util.Vector |
findAction(int msgid)
This find the action belonging to a specified message. |
java.util.Vector |
findMessage(java.lang.String data)
This method gets a list messages which meat the spcified pattern. |
java.sql.Connection |
getConnection()
This method returns the connection to the JSPMEVT database. |
int |
getDbType()
This method returns the database type. |
int |
getLastEventId()
Returns the id of the last row |
int |
getLastMessageId()
Returns the id of the last row in the message table |
private java.lang.String |
getLocalHost()
This method return the name of the local host. |
java.util.Vector |
getServer()
This method gets a list of all event management server. |
void |
sendKeep(int id,
boolean keep)
This sets the hold flag for the specified event. |
void |
setAck(int id,
boolean ack)
This sets the hold flag for the specified event. |
void |
setAttributes(int id,
int bcolor,
int fcolor,
int attr,
int sev)
This set the attributes back_color, fore_color, attr and severity. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
JSPM_HOME
private static java.lang.String JSPM_HOME
- The JSPM home directory. It is taken from the environment variable
JSPM_HOME, supplied with the executing batch file.
debugLevel
private static int debugLevel
- The debug level. Only events with a severity higher than the debug
level are written to the log stream.
logWriter
private com.jdk.JspmLogWriter logWriter
- The log writer class
con
java.sql.Connection con
- The database connection used to connect to the SQL database
| Constructor Detail |
JspmEvtDbMySql
public JspmEvtDbMySql()
- Constructor.
JspmEvtDbMySql
public JspmEvtDbMySql(com.jdk.JspmLogWriter lw)
- Constructor.
| Method Detail |
connect
public boolean connect()
- Connects to the local database. The user and password will be provided by the
DB login dialog.
connect
public boolean connect(java.lang.String host, java.lang.String user, java.lang.String passwd)
- Connects to the local database using the specified user/passwd
getLocalHost
private java.lang.String getLocalHost()
- This method return the name of the local host.
getConnection
public java.sql.Connection getConnection()
- This method returns the connection to the JSPMEVT database.
- Specified by:
getConnectionin interfaceJspmEvtDb
getDbType
public int getDbType()
close
public void close()
getServer
public java.util.Vector getServer()
- This method gets a list of all event management server.
addEvent
public void addEvent(java.lang.String source, java.lang.String node, int type, java.lang.String data)
- This method adds an event to the event management database.
deleteEvent
public void deleteEvent(int id)
- This method adds an event to the event management database.
- Specified by:
deleteEventin interfaceJspmEvtDb
findMessage
public java.util.Vector findMessage(java.lang.String data)
- This method gets a list messages which meat the spcified pattern.
- Specified by:
findMessagein interfaceJspmEvtDb
findAction
public java.util.Vector findAction(int msgid)
- This find the action belonging to a specified message.
- Specified by:
findActionin interfaceJspmEvtDb
setAttributes
public void setAttributes(int id,
int bcolor,
int fcolor,
int attr,
int sev)
- This set the attributes back_color, fore_color, attr and severity.
- Specified by:
setAttributesin interfaceJspmEvtDb
sendKeep
public void sendKeep(int id,
boolean keep)
delKeep
public void delKeep(java.lang.String token)
setAck
public void setAck(int id,
boolean ack)
- This sets the hold flag for the specified event.
getLastEventId
public int getLastEventId()
- Returns the id of the last row
- Specified by:
getLastEventIdin interfaceJspmEvtDb
getLastMessageId
public int getLastMessageId()
- Returns the id of the last row in the message table
- Specified by:
getLastMessageIdin interfaceJspmEvtDb
addMessage
public void addMessage(int id,
java.lang.String token,
java.lang.String text,
java.lang.String dsc,
java.lang.String group,
java.lang.String owner,
java.lang.String node,
java.lang.String source)
- Adds a message to the message table
- Specified by:
addMessagein interfaceJspmEvtDb
deleteMessageById
public int deleteMessageById(int id)
- Delete message by id
- Specified by:
deleteMessageByIdin interfaceJspmEvtDb
deleteMessageByToken
public int deleteMessageByToken(java.lang.String token)
- Delete message by token
- Specified by:
deleteMessageByTokenin interfaceJspmEvtDb
deleteMessageByGroup
public int deleteMessageByGroup(java.lang.String group)
- Delete message by token
- Specified by:
deleteMessageByGroupin interfaceJspmEvtDb
addAction
public void addAction(int msgid,
java.lang.String group,
int sequence,
int fcolor,
int bcolor,
int attr,
int sev,
int act,
java.lang.String text)
deleteActionByMsgid
public int deleteActionByMsgid(int msgid)
- Delete action by msgid
- Specified by:
deleteActionByMsgidin interfaceJspmEvtDb
deleteActionByGroup
public int deleteActionByGroup(java.lang.String group)
- Delete action by group
- Specified by:
deleteActionByGroupin interfaceJspmEvtDb
|
|||||||||
| Home >> All >> evt >> [ gui overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
evt.gui.JspmEvtDbMySql