Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cor.gui
Interface JspmCoreDb  view JspmCoreDb download JspmCoreDb.java

All Known Implementing Classes:
JspmCoreDbMySql

public interface JspmCoreDb

This program defines the connection to the performance management database. It includes all the methods to create/delete/update performance data records in the Jspm performance management database. Each implementation has to define all methods described in this interface.

Version:
0.0.8

Method Summary
 void addMessage(cor.gui.evt.JspmEvtMessage msg)
          Adds a message to the database.
 void close()
          Closes the DB connection.
 boolean connect(java.lang.String host, java.lang.String user, java.lang.String passwd)
          Connects to the performance managment database on the specified host.
 void deleteSponsor(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance)
          Deletes a sponsor definition.
 cor.gui.evt.JspmEvtAction getAction(int actid)
          Returns a action with a certain actid as hashtable.
 java.util.Vector getActionDefinitions()
          Return a vector of action definitions.
 java.util.Vector getActions()
          Return a vector of actions.
 java.util.Vector getActions(int msgid)
          Return a vector of actions belonginf to a specified message ID.
 java.util.Vector getActions(java.lang.String group)
          Return a vector of actions from a certain group.
 java.util.Vector getChildClasses(java.lang.String parentName)
          Returns a vector of names which are the child of the parent class.
 java.util.Vector getClassDef(java.lang.String className)
          Returns a vector of Hashtable with the class level property definitions.
 int getClassDefCount()
          Get the total number of class definitions.
 java.sql.Connection getConnection()
          Returns the actual database connection.
 java.util.Vector getDailyPerfData(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance, int diff)
          Return a vector daily performance data.
 int getDbType()
          Returns the data base type
 java.util.Vector getEvtGroups()
          Returns a vector of group names.
 java.util.Vector getIlpDef(java.lang.String className)
          Returns a vector of Hashtable with the instance level property definitions.
 java.lang.String getInstanceStorage(java.lang.String className)
          Returns the table name for the instance storage.
 cor.gui.evt.JspmEvtMessage getMessage(int msgid)
          Returns a message with a certain msgid as hashtable.
 java.util.Vector getMessages()
          Return a vector of messages.
 java.util.Vector getMessages(java.lang.String group)
          Return a vector of messages from a certain group.
 java.util.Vector getMonthlyPerfData(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance, int diff)
          Return a vector monthly performance data.
 java.util.Vector getObjectList(java.lang.String className)
          Returns a vector of Hashtable with the instance level properties of all object in a given class.
 int getObjectStatus(java.lang.String className, java.lang.String instName)
          Returns current status of a CORe object.
 java.util.Hashtable getPerfSponsor(java.lang.String host, java.lang.String resource, java.lang.String subresource, java.lang.String instance)
          Return a vector of sponsors definitions.
 java.util.Vector getPrfHosts()
          Return a vector of sponsors definitions.
 java.lang.String getPrfIcon(java.lang.String className)
          Returns the data base type
 java.util.Vector getPrfInstance(java.lang.String hostName, java.lang.String resource, java.lang.String subresource)
          Return a vector of sponsors definitions.
 java.util.Vector getPrfResource(java.lang.String hostName)
          Return a vector of sponsors definitions.
 int getPrfSponsorCount()
          Returns the total number of sponsors.
 java.util.Vector getPrfSubresource(java.lang.String hostName, java.lang.String resource)
          Return a vector of sponsors definitions.
 java.util.Vector getServer()
          Return a vector of DB servers.
 java.util.Hashtable getThresholds(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance)
          Get the thresholds for a sponsor.
 java.util.Vector getWeeklyPerfData(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance, int diff)
          Return a vector weekly performance data.
 java.util.Vector getYearlyPerfData(java.lang.String host, java.lang.String resource, java.lang.String subResource, java.lang.String instance, int diff)
          Return a vector monthly performance data.
 void saveMessages(java.io.File file, java.lang.String msggroup)
          Write a file with all messages and the corresponding actions to a file belonging to the specified message group to a file.
 void updateAction(cor.gui.evt.JspmEvtAction act)
          Updates an action in the DB
 void updateMessage(cor.gui.evt.JspmEvtMessage msg)
          Updates a message in the DB
 

Method Detail

connect

public boolean connect(java.lang.String host,
                       java.lang.String user,
                       java.lang.String passwd)
Connects to the performance managment database on the specified host.


getConnection

public java.sql.Connection getConnection()
Returns the actual database connection.


close

public void close()
Closes the DB connection.


getServer

public java.util.Vector getServer()
Return a vector of DB servers.


getDbType

public int getDbType()
Returns the data base type


getPrfSponsorCount

public int getPrfSponsorCount()
Returns the total number of sponsors.


getPrfHosts

public java.util.Vector getPrfHosts()
Return a vector of sponsors definitions.


getPrfResource

public java.util.Vector getPrfResource(java.lang.String hostName)
Return a vector of sponsors definitions.


getPrfSubresource

public java.util.Vector getPrfSubresource(java.lang.String hostName,
                                          java.lang.String resource)
Return a vector of sponsors definitions.


getPrfInstance

public java.util.Vector getPrfInstance(java.lang.String hostName,
                                       java.lang.String resource,
                                       java.lang.String subresource)
Return a vector of sponsors definitions.


getPerfSponsor

public java.util.Hashtable getPerfSponsor(java.lang.String host,
                                          java.lang.String resource,
                                          java.lang.String subresource,
                                          java.lang.String instance)
Return a vector of sponsors definitions.


getDailyPerfData

public java.util.Vector getDailyPerfData(java.lang.String host,
                                         java.lang.String resource,
                                         java.lang.String subResource,
                                         java.lang.String instance,
                                         int diff)
Return a vector daily performance data. Each record is represented as as Hashtable.


getWeeklyPerfData

public java.util.Vector getWeeklyPerfData(java.lang.String host,
                                          java.lang.String resource,
                                          java.lang.String subResource,
                                          java.lang.String instance,
                                          int diff)
Return a vector weekly performance data. Each record is represented as as Hashtable.


getMonthlyPerfData

public java.util.Vector getMonthlyPerfData(java.lang.String host,
                                           java.lang.String resource,
                                           java.lang.String subResource,
                                           java.lang.String instance,
                                           int diff)
Return a vector monthly performance data. Each record is represented as as Hashtable.


getYearlyPerfData

public java.util.Vector getYearlyPerfData(java.lang.String host,
                                          java.lang.String resource,
                                          java.lang.String subResource,
                                          java.lang.String instance,
                                          int diff)
Return a vector monthly performance data. Each record is represented as as Hashtable.


deleteSponsor

public void deleteSponsor(java.lang.String host,
                          java.lang.String resource,
                          java.lang.String subResource,
                          java.lang.String instance)
Deletes a sponsor definition.


getThresholds

public java.util.Hashtable getThresholds(java.lang.String host,
                                         java.lang.String resource,
                                         java.lang.String subResource,
                                         java.lang.String instance)
Get the thresholds for a sponsor.


getMessages

public java.util.Vector getMessages()
Return a vector of messages. Each record is represented as as Hashtable.


getEvtGroups

public java.util.Vector getEvtGroups()
Returns a vector of group names.


getMessages

public java.util.Vector getMessages(java.lang.String group)
Return a vector of messages from a certain group. Each record is represented as as Hashtable.


getMessage

public cor.gui.evt.JspmEvtMessage getMessage(int msgid)
Returns a message with a certain msgid as hashtable.


saveMessages

public void saveMessages(java.io.File file,
                         java.lang.String msggroup)
Write a file with all messages and the corresponding actions to a file belonging to the specified message group to a file.

Since:
0.0.2

updateMessage

public void updateMessage(cor.gui.evt.JspmEvtMessage msg)
Updates a message in the DB


addMessage

public void addMessage(cor.gui.evt.JspmEvtMessage msg)
Adds a message to the database.


getActions

public java.util.Vector getActions()
Return a vector of actions. Each record is represented as as Hashtable.


getActions

public java.util.Vector getActions(java.lang.String group)
Return a vector of actions from a certain group. Each record is represented as as Hashtable.


getActions

public java.util.Vector getActions(int msgid)
Return a vector of actions belonginf to a specified message ID. Each record is represented as as Hashtable.


getAction

public cor.gui.evt.JspmEvtAction getAction(int actid)
Returns a action with a certain actid as hashtable.


updateAction

public void updateAction(cor.gui.evt.JspmEvtAction act)
Updates an action in the DB


getActionDefinitions

public java.util.Vector getActionDefinitions()
Return a vector of action definitions. Each record is represented as as Hashtable.


getPrfIcon

public java.lang.String getPrfIcon(java.lang.String className)
Returns the data base type


getObjectStatus

public int getObjectStatus(java.lang.String className,
                           java.lang.String instName)
Returns current status of a CORe object.


getClassDefCount

public int getClassDefCount()
Get the total number of class definitions.


getChildClasses

public java.util.Vector getChildClasses(java.lang.String parentName)
Returns a vector of names which are the child of the parent class.


getClassDef

public java.util.Vector getClassDef(java.lang.String className)
Returns a vector of Hashtable with the class level property definitions.


getIlpDef

public java.util.Vector getIlpDef(java.lang.String className)
Returns a vector of Hashtable with the instance level property definitions.


getInstanceStorage

public java.lang.String getInstanceStorage(java.lang.String className)
Returns the table name for the instance storage.


getObjectList

public java.util.Vector getObjectList(java.lang.String className)
Returns a vector of Hashtable with the instance level properties of all object in a given class.