public class AuditorLogger extends Object implements IAuditorLogger
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
auditorLogger
Logger
|
| Modifier and Type | Method and Description |
|---|---|
String |
createSqlStatement(String sqlString,
Vector sqlValues)
This method returns a string formed by the prepared SQL query and a
Vector of values used in it.
|
org.slf4j.Logger |
getAuditorLogger()
Returns the auditorLogger (Use it form logger methods)
|
static IAuditorLogger |
getInstance()
Returns the instance of auditor logger
|
void |
succesfulAccessSQL(String action,
String user,
String entity,
String sqlString,
Vector sqlValues)
Create a debug log in auditorLogger for a successful access to register
in DB, with the next pattern:
"Date: {} - Action: {} - User: {} - Entity: {} - Access: SUCCESFULLY - Statement: {}"
The "Stament: {}" is the SQL query, formed by the prepared statement and
its values (sqlString and sqlValues).
|
void |
unsuccesfulAccessSQL(String action,
String user,
String entity)
Create a debug log in auditorLogger for a unsuccessful access to register
in DB, with the next pattern:
Date: {} - Action: {} - User: {} - Entity: {} - Access: UNSUCCESFULLY"
|
public static IAuditorLogger getInstance()
public org.slf4j.Logger getAuditorLogger()
getAuditorLogger in interface IAuditorLoggerpublic void unsuccesfulAccessSQL(String action, String user, String entity)
unsuccesfulAccessSQL in interface IAuditorLoggeraction - String that indicates what action is performs the operation:
"QUERY", "UPDATE", "INSERT", "DELETE"user - String that represent the user who is running the queryentity - String that represent the entity which executes the methodpublic void succesfulAccessSQL(String action, String user, String entity, String sqlString, Vector sqlValues)
createSqlStatement(java.lang.String, java.util.Vector)succesfulAccessSQL in interface IAuditorLoggeraction - String that indicates what action is performs the operation:
"QUERY", "UPDATE", "INSERT", "DELETE"user - String that represent the user who is running the queryentity - String that represent the entity which executes the methodsqlString - String that represents a prepared statementsqlValues - Vector that contains the values which to be used in the
prepared statementpublic String createSqlStatement(String sqlString, Vector sqlValues)
createSqlStatement in interface IAuditorLoggersqlString - String that represents a prepared statementsqlValues - Vector that contains the values which to be used in the
prepared statementCopyright © 2016 Imatia Innovation S.L.. All rights reserved.