BEAST
eu.baltrad.beast.log.message.LogMessageRepository Class Reference
Inheritance diagram for eu.baltrad.beast.log.message.LogMessageRepository:
eu.baltrad.beast.log.message.ILogMessageRepository

Public Member Functions

 LogMessageRepository ()
 Default constructor.
 
 LogMessageRepository (String[] filenames)
 Constructor.
 
 LogMessageRepository (Map< String, LogMessage > messages)
 Constructor.
 
synchronized LogMessage getMessage (String ecode)
 Returns the message for this error code.
 
synchronized String getModule (String ecode)
 Returns the module this error code belongs to.
 
synchronized List< LogMessagegetModuleMessages ()
 Returns all messages belonging to a specific module type.
 
String getMessage (String code, String message, Object... args)
 
synchronized void add (LogMessage message)
 Adds a log message to this repository.
 
synchronized void remove (String ecode)
 Removes the log message with specified error code.
 
String[] getFilenames ()
 
void setFilenames (String[] filenames)
 
synchronized void afterPropertiesSet () throws Exception
 

Protected Member Functions

synchronized void load (String filename)
 Loads a message file.
 
synchronized void load (String[] filenames)
 Loads several message files.
 
MessageSeverity strToSeverity (String str)
 

Detailed Description

Author
Anders Henja

Constructor & Destructor Documentation

◆ LogMessageRepository() [1/3]

eu.baltrad.beast.log.message.LogMessageRepository.LogMessageRepository ( )
inline

Default constructor.

◆ LogMessageRepository() [2/3]

eu.baltrad.beast.log.message.LogMessageRepository.LogMessageRepository ( String[] filenames)
inline

Constructor.

Parameters
filenamesa list of filenames containing log messages

◆ LogMessageRepository() [3/3]

eu.baltrad.beast.log.message.LogMessageRepository.LogMessageRepository ( Map< String, LogMessage > messages)
inline

Constructor.

Parameters
messagesthe log messages

Member Function Documentation

◆ add()

synchronized void eu.baltrad.beast.log.message.LogMessageRepository.add ( LogMessage message)
inline

Adds a log message to this repository.

Parameters
messagethe message to add

◆ afterPropertiesSet()

synchronized void eu.baltrad.beast.log.message.LogMessageRepository.afterPropertiesSet ( ) throws Exception
inline
See also
org.springframework.beans.factory.InitializingBean.afterPropertiesSet()

◆ getFilenames()

String[] eu.baltrad.beast.log.message.LogMessageRepository.getFilenames ( )
inline
Returns
the filename

◆ getMessage() [1/2]

String eu.baltrad.beast.log.message.LogMessageRepository.getMessage ( String code,
String message,
Object... args )
inline
See also
eu.baltrad.beast.log.ILogMessageRepository.getMessage(String, String, String, Object...)

Implements eu.baltrad.beast.log.message.ILogMessageRepository.

◆ getMessage() [2/2]

synchronized LogMessage eu.baltrad.beast.log.message.LogMessageRepository.getMessage ( String ecode)
inline

Returns the message for this error code.

Parameters
modulethe module
ecodethe error code
Returns
the log message

Implements eu.baltrad.beast.log.message.ILogMessageRepository.

◆ getModule()

synchronized String eu.baltrad.beast.log.message.LogMessageRepository.getModule ( String ecode)
inline

Returns the module this error code belongs to.

Parameters
ecodethe error code
Returns
the module or null if error code not could be found

Implements eu.baltrad.beast.log.message.ILogMessageRepository.

◆ getModuleMessages()

synchronized List< LogMessage > eu.baltrad.beast.log.message.LogMessageRepository.getModuleMessages ( )
inline

Returns all messages belonging to a specific module type.

Parameters
modulethe module name
Returns
the messages

Implements eu.baltrad.beast.log.message.ILogMessageRepository.

◆ load() [1/2]

synchronized void eu.baltrad.beast.log.message.LogMessageRepository.load ( String filename)
inlineprotected

Loads a message file.

Parameters
filenamethe filename

◆ load() [2/2]

synchronized void eu.baltrad.beast.log.message.LogMessageRepository.load ( String[] filenames)
inlineprotected

Loads several message files.

Parameters
filenamesthe filenames

◆ remove()

synchronized void eu.baltrad.beast.log.message.LogMessageRepository.remove ( String ecode)
inline

Removes the log message with specified error code.

Parameters
ecodethe error code

◆ setFilenames()

void eu.baltrad.beast.log.message.LogMessageRepository.setFilenames ( String[] filenames)
inline
Parameters
filenamesthe filenames to set

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