alma::acs::logging::archive::zoom::ZoomManager Class Reference

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

List of all members.

Public Member Functions

 ZoomManager ()
 ZoomManager (String folder, LogTypeHelper min, LogTypeHelper max) throws ZoomException
boolean isAvailable ()
void setFilesRepository (String folder) throws ZoomException
void setLevels (LogTypeHelper min, LogTypeHelper max)
String getRepository ()
LogTypeHelper getMinLevel ()
LogTypeHelper getMaxLevel ()
void zoom (String startDate, String endDate, ACSRemoteLogListener logListener, ZoomProgressListener zoomListener, ACSRemoteErrorListener errorListener) throws FileNotFoundException, ZoomException
boolean isLoadingLogs ()
void stopZoom ()

Static Public Attributes

static final String MIN_LEVEL_PROPERTY_NAME = "jlog.archive.zoom.MinLevel"
static final String MAX_LEVEL_PROPERTY_NAME = "jlog.archive.zoom.MaxLevel"
static final String FILES_LOCATION_PROPERTY_NAME = "jlog.archive.zoom.filesFolder"

Private Attributes

FilesManager filesManager = null
LogTypeHelper minLevel = LogTypeHelper.values()[0]
LogTypeHelper maxLevel = LogTypeHelper.DEBUG
volatile boolean loadingLogs = false

Detailed Description

The manager of the zoom feature.

A ZoomManager objects is the entity that perform the zooming by delegating to other classes of the zoom package.

The min and max levels, if not passed in the constructor, are initialized from java properties and if those properties does not exist from default values.

Note: only one loading operation is possible at the same time.

Author:
acaproni

Constructor & Destructor Documentation

alma::acs::logging::archive::zoom::ZoomManager::ZoomManager (  )  [inline]

Constructor.

The folder is retrieved from a java property and the levels are set to defaults.

See also:
FilesManager

References FILES_LOCATION_PROPERTY_NAME, filesManager, MAX_LEVEL_PROPERTY_NAME, maxLevel, MIN_LEVEL_PROPERTY_NAME, and minLevel.

alma::acs::logging::archive::zoom::ZoomManager::ZoomManager ( String  folder,
LogTypeHelper  min,
LogTypeHelper  max 
) throws ZoomException [inline]

Constructor

Parameters:
folder The folder with XML files of logs
min The min log level of logs to read
max The max log level of logs to read
Exceptions:
ZoomException If the folder or the levels are invalid

References filesManager, and setLevels().


Member Function Documentation

LogTypeHelper alma::acs::logging::archive::zoom::ZoomManager::getMaxLevel (  )  [inline]
Returns:
The max level for zoomin

References maxLevel.

Referenced by alma::acs::logging::archive::zoom::ZoomPrefsDlg::initialize().

LogTypeHelper alma::acs::logging::archive::zoom::ZoomManager::getMinLevel (  )  [inline]
Returns:
The min level for zoomin

References minLevel.

Referenced by alma::acs::logging::archive::zoom::ZoomPrefsDlg::initialize().

String alma::acs::logging::archive::zoom::ZoomManager::getRepository (  )  [inline]

Return the path of the folder containing XML log files.

If the folder is invalid

Returns:
The repository of XML files of logs; null if no folder (or an invalid one) is in use

References alma::acs::logging::archive::zoom::FilesManager::filesFolder, and filesManager.

Referenced by alma::acs::logging::archive::zoom::ZoomPrefsDlg::ZoomPrefsDlg().

boolean alma::acs::logging::archive::zoom::ZoomManager::isAvailable (  )  [inline]

Check if the zoom feature is available.

The zoom is available if the files manager and the levels are valid. In particular, the files manager must have a valid folder with a valid set of XML files. The folder is valid if there are XML files to read.

Returns:
true if the zoom is available; false otherwise.

References filesManager, alma::acs::logging::archive::zoom::FilesManager::isOperational(), maxLevel, and minLevel.

Referenced by com::cosylab::logging::LoggingClient::EventHandler::actionPerformed(), com::cosylab::logging::LoggingClient::initialize(), alma::acs::logging::table::LogEntryTable::TableMouseAdapter::mousePressed(), alma::acs::logging::archive::zoom::ZoomPrefsDlg::okPressed(), alma::acs::logging::archive::zoom::ManualZoomDlg::run(), alma::acs::logging::table::TablePopupMenu::show(), and zoom().

boolean alma::acs::logging::archive::zoom::ZoomManager::isLoadingLogs (  )  [inline]

Return true if a loading is in progress.

Returns:
true if a loading is in progress

References loadingLogs.

Referenced by alma::acs::logging::archive::zoom::ManualZoomDlg::run().

void alma::acs::logging::archive::zoom::ZoomManager::setFilesRepository ( String  folder  )  throws ZoomException [inline]

Set the folder to read XML files of logs from.

Parameters:
folder The folder of XML files of logs
Exceptions:
ZoomException If the folder is invalid.

References filesManager.

Referenced by alma::acs::logging::archive::zoom::ZoomPrefsDlg::okPressed().

void alma::acs::logging::archive::zoom::ZoomManager::setLevels ( LogTypeHelper  min,
LogTypeHelper  max 
) [inline]

Set the levels of the logs to read while zooming

Parameters:
min The minimum log level (can be null)
max The max log level (must be greater then the min; can't be null)

References maxLevel, and minLevel.

Referenced by alma::acs::logging::archive::zoom::ZoomPrefsDlg::okPressed(), and ZoomManager().

void alma::acs::logging::archive::zoom::ZoomManager::stopZoom (  )  [inline]
void alma::acs::logging::archive::zoom::ZoomManager::zoom ( String  startDate,
String  endDate,
ACSRemoteLogListener  logListener,
ZoomProgressListener  zoomListener,
ACSRemoteErrorListener  errorListener 
) throws FileNotFoundException, ZoomException [inline]

Member Data Documentation

final String alma::acs::logging::archive::zoom::ZoomManager::FILES_LOCATION_PROPERTY_NAME = "jlog.archive.zoom.filesFolder" [static]

The name of the property containing the folder where ARCHIVES writes files into.

Note: this way of getting the folder could change in further releases.

Referenced by ZoomManager().

The files manager to get logs from a set of XML files

Referenced by getRepository(), isAvailable(), setFilesRepository(), stopZoom(), zoom(), and ZoomManager().

Signal if a loading is in progress

Referenced by isLoadingLogs(), and zoom().

final String alma::acs::logging::archive::zoom::ZoomManager::MAX_LEVEL_PROPERTY_NAME = "jlog.archive.zoom.MaxLevel" [static]

The name of the property of the min log level of the zoom

Referenced by ZoomManager().

LogTypeHelper alma::acs::logging::archive::zoom::ZoomManager::maxLevel = LogTypeHelper.DEBUG [private]

The maximum level of logs to read from files

Referenced by getMaxLevel(), isAvailable(), setLevels(), zoom(), and ZoomManager().

final String alma::acs::logging::archive::zoom::ZoomManager::MIN_LEVEL_PROPERTY_NAME = "jlog.archive.zoom.MinLevel" [static]

The name of the property of the min log level of the zoom

Referenced by ZoomManager().

LogTypeHelper alma::acs::logging::archive::zoom::ZoomManager::minLevel = LogTypeHelper.values()[0] [private]

The minimum level of logs to read from files

Referenced by getMinLevel(), isAvailable(), setLevels(), zoom(), and ZoomManager().


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

Generated by  doxygen 1.6.2