alma::acs::logging::archive::ArchiveConnectionManager Class Reference

Collaboration diagram for alma::acs::logging::archive::ArchiveConnectionManager:
Collaboration graph
[legend]

List of all members.

Public Types

enum  DBState { DATABASE_OK = ("/databaseLink.png"), DATABASE_NOP = ("/databaseNOP.png"), DATABASE_WORKING = ("/databaseBusy.png") }

Public Member Functions

 ArchiveConnectionManager (LoggingClient loggingClient)
DBState getDBStatus ()
Collection getLogs (String from, String to, short minType, short maxType, String routine, String source, String process, int maxRows) throws Exception

Private Member Functions

Object loadArchiveClass ()
Method getMethod (Object obj)
void showDBStatus (String msg)

Private Attributes

final String ARCHIVE_CLASS_NAME = "alma.archive.logging.ArchiveLoggingQuery"
final String METHOD_NAME = "getLog"
DBState status
Object archive = null
Method getLogMethod
LoggingClient logging

Detailed Description

A class to connect and interact with the archive

The connection with the database is not always available. There are 2 possibilities: 1. the code to connect to the DB is not available (it comes from a module in ARCHIVE) 2. the code is available but for some reason something in the communication with the DB doesn't work as expected

Author:
acaproni

Member Enumeration Documentation

The possible states of the database

Author:
acaproni
Enumerator:
DATABASE_OK 
DATABASE_NOP 
DATABASE_WORKING 

Constructor & Destructor Documentation

alma::acs::logging::archive::ArchiveConnectionManager::ArchiveConnectionManager ( LoggingClient  loggingClient  )  [inline]

Constructor

Parameters:
loggingClient The logging client

References archive, getLogMethod, getMethod(), loadArchiveClass(), logging, showDBStatus(), and status.


Member Function Documentation

DBState alma::acs::logging::archive::ArchiveConnectionManager::getDBStatus (  )  [inline]
Collection alma::acs::logging::archive::ArchiveConnectionManager::getLogs ( String  from,
String  to,
short  minType,
short  maxType,
String  routine,
String  source,
String  process,
int  maxRows 
) throws Exception [inline]

Get the logs from the archive

Parameters:
from Start time
to End time
minType Minimum log type
maxType Maximum log type
routine The routine name
source The source
process The process
maxRows Max number of logs to read from the database
Returns:
The logs read from the database
Exceptions:
Exception 

References archive, getLogMethod, showDBStatus(), and status.

Referenced by alma::acs::logging::archive::QueryDlg::submitQuery().

Method alma::acs::logging::archive::ArchiveConnectionManager::getMethod ( Object  obj  )  [inline, private]

Get the method to retrieve log from the database

Parameters:
obj The object containing the method
Returns:
The getLog method of the object

References ARCHIVE_CLASS_NAME, and METHOD_NAME.

Referenced by ArchiveConnectionManager().

Object alma::acs::logging::archive::ArchiveConnectionManager::loadArchiveClass (  )  [inline, private]

Load the class to talk with the archive

Returns:
An object to submit wueries to the database null if something went wrong loading the class

References ARCHIVE_CLASS_NAME.

Referenced by ArchiveConnectionManager().

void alma::acs::logging::archive::ArchiveConnectionManager::showDBStatus ( String  msg  )  [inline, private]

Notify the LoggingClient about the status of the connection with the database

The icon in the LC is set depending on the actual state of the connection. The tooltip of the icon is set equal to the msg parameter

Parameters:
msg A message to show as tool tip in the icon of the status of the DB connection

References logging, com::cosylab::logging::LoggingClient::showDBStatus(), and status.

Referenced by ArchiveConnectionManager(), and getLogs().


Member Data Documentation

The class to talk to the archive

Referenced by ArchiveConnectionManager(), and getLogs().

final String alma::acs::logging::archive::ArchiveConnectionManager::ARCHIVE_CLASS_NAME = "alma.archive.logging.ArchiveLoggingQuery" [private]

The name of the class, the method and so on to load.

Generated by ARCHIVE and could not be present at run time

Referenced by getMethod(), and loadArchiveClass().

The method to get logs from the database

Referenced by ArchiveConnectionManager(), and getLogs().

The application

Referenced by ArchiveConnectionManager(), getDBStatus(), and showDBStatus().

The name of the method to read logs from the database

Generated by ARCHIVE and could not be present at run time

Referenced by getMethod().

The status of the connection with the DB

Referenced by ArchiveConnectionManager(), getDBStatus(), getLogs(), and showDBStatus().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2