Class QueriableLoggerImpl
- java.lang.Object
-
- org.bonitasoft.engine.services.impl.QueriableLoggerImpl
-
- All Implemented Interfaces:
QueriableLoggerService
public class QueriableLoggerImpl extends java.lang.Object implements QueriableLoggerService
- Author:
- Elias Ricken de Medeiros, Bole Zhang, Matthieu Chaffotte, Celine Souchet
-
-
Constructor Summary
Constructors Constructor Description QueriableLoggerImpl(PersistenceService persistenceService, TransactionService transactionService, QueriableLoggerStrategy loggerStrategy, QueriableLogSessionProvider sessionProvider, PlatformService platformService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SQueriableLoggetLog(long logId)Get the queriable log from its id.java.util.List<SQueriableLog>getLogs(int startIndex, int maxResults, java.lang.String field, OrderByType order)Get the queriable logs having the given value for the given int indexlonggetNumberOfLogs()Get total number of queriable logslonggetNumberOfLogs(QueryOptions searchOptions)Gets the queriable logs number matching to the given QueryOptions.booleanisLoggable(java.lang.String actionType, SQueriableLogSeverity severity)Verify if the given action type and severity are loggablevoidlog(java.lang.String callerClassName, java.lang.String callerMethodName, SQueriableLog... queriableLogs)Log the given queriable logs.java.util.List<SQueriableLog>searchLogs(QueryOptions searchOptions)Gets the queriable logs matching to the given searchOptions.
-
-
-
Constructor Detail
-
QueriableLoggerImpl
public QueriableLoggerImpl(PersistenceService persistenceService, TransactionService transactionService, QueriableLoggerStrategy loggerStrategy, QueriableLogSessionProvider sessionProvider, PlatformService platformService)
-
-
Method Detail
-
getNumberOfLogs
public long getNumberOfLogs() throws SBonitaReadExceptionDescription copied from interface:QueriableLoggerServiceGet total number of queriable logs- Specified by:
getNumberOfLogsin interfaceQueriableLoggerService- Returns:
- the number of queriable logs
- Throws:
SBonitaReadException
-
getLogs
public java.util.List<SQueriableLog> getLogs(int startIndex, int maxResults, java.lang.String field, OrderByType order) throws SBonitaReadException
Description copied from interface:QueriableLoggerServiceGet the queriable logs having the given value for the given int index- Specified by:
getLogsin interfaceQueriableLoggerService- Returns:
- the queriable logs having the given value for the given int index
- Throws:
SBonitaReadException
-
getNumberOfLogs
public long getNumberOfLogs(QueryOptions searchOptions) throws SBonitaReadException
Description copied from interface:QueriableLoggerServiceGets the queriable logs number matching to the given QueryOptions.- Specified by:
getNumberOfLogsin interfaceQueriableLoggerService- Returns:
- queriable logs number matching to the given searchOptions.
- Throws:
SBonitaReadException
-
searchLogs
public java.util.List<SQueriableLog> searchLogs(QueryOptions searchOptions) throws SBonitaReadException
Description copied from interface:QueriableLoggerServiceGets the queriable logs matching to the given searchOptions.- Specified by:
searchLogsin interfaceQueriableLoggerService- Parameters:
searchOptions- The criterion used to search sQueriableLog- Returns:
- logs list matching to the given searchOptions.
- Throws:
SBonitaReadException
-
log
public void log(java.lang.String callerClassName, java.lang.String callerMethodName, SQueriableLog... queriableLogs)Description copied from interface:QueriableLoggerServiceLog the given queriable logs. Only logs having the action type and the severity configured to as loggable will be logged- Specified by:
login interfaceQueriableLoggerService
-
isLoggable
public boolean isLoggable(java.lang.String actionType, SQueriableLogSeverity severity)Description copied from interface:QueriableLoggerServiceVerify if the given action type and severity are loggable- Specified by:
isLoggablein interfaceQueriableLoggerService- Parameters:
actionType- the action typeseverity- the severity- Returns:
- true if the log is active for the given action type and severity; false otherwise
-
getLog
public SQueriableLog getLog(long logId) throws SQueriableLogNotFoundException, SBonitaReadException
Description copied from interface:QueriableLoggerServiceGet the queriable log from its id.- Specified by:
getLogin interfaceQueriableLoggerService- Returns:
- the queriable log
- Throws:
SQueriableLogNotFoundExceptionSBonitaReadException
-
-