it.eng.spagobi.monitoring.dao
Class AuditManager

java.lang.Object
  extended by it.eng.spagobi.monitoring.dao.AuditManager

public class AuditManager
extends java.lang.Object


Field Summary
static java.lang.String AUDIT_ID
           
static java.lang.String ERROR_CODE
           
static java.lang.String ERROR_MESSAGE
           
static java.lang.String EXECUTION_END
           
static java.lang.String EXECUTION_START
           
static java.lang.String EXECUTION_STATE
           
static java.lang.String MODULE_NAME
           
 
Method Summary
static AuditManager getInstance()
          Gets the single instance of AuditManager.
 SbiAudit getLastExecution(java.lang.Integer objId)
          Gets the last execution.
 java.lang.Double getMediumExecTime(java.lang.Integer objId)
          Gets the medium exec time.
 java.util.List getMostPopular(it.eng.spago.security.IEngUserProfile profile, int limit)
          Gets the most popular.
 java.util.List getMyRecentlyUsed(it.eng.spago.security.IEngUserProfile profile, int limit)
          Gets the my recently used.
 java.lang.Integer insertAudit(BIObject obj, SubObject subObj, it.eng.spago.security.IEngUserProfile profile, java.lang.String role, java.lang.String modality)
          Inserts a record on the audit log.
 SbiAudit loadAudit(java.lang.Integer id)
          Load audit.
 void updateAudit(java.lang.Integer auditId, java.lang.Long startTime, java.lang.Long endTime, java.lang.String executionState, java.lang.String errorMessage, java.lang.String errorCode)
          Update audit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODULE_NAME

public static final java.lang.String MODULE_NAME
See Also:
Constant Field Values

AUDIT_ID

public static final java.lang.String AUDIT_ID
See Also:
Constant Field Values

EXECUTION_START

public static final java.lang.String EXECUTION_START
See Also:
Constant Field Values

EXECUTION_END

public static final java.lang.String EXECUTION_END
See Also:
Constant Field Values

EXECUTION_STATE

public static final java.lang.String EXECUTION_STATE
See Also:
Constant Field Values

ERROR_MESSAGE

public static final java.lang.String ERROR_MESSAGE
See Also:
Constant Field Values

ERROR_CODE

public static final java.lang.String ERROR_CODE
See Also:
Constant Field Values
Method Detail

getInstance

public static AuditManager getInstance()
Gets the single instance of AuditManager.

Returns:
single instance of AuditManager

loadAudit

public SbiAudit loadAudit(java.lang.Integer id)
                   throws it.eng.spago.error.EMFUserError
Load audit.

Parameters:
id - the id
Returns:
the sbi audit
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

insertAudit

public java.lang.Integer insertAudit(BIObject obj,
                                     SubObject subObj,
                                     it.eng.spago.security.IEngUserProfile profile,
                                     java.lang.String role,
                                     java.lang.String modality)
Inserts a record on the audit log.

Parameters:
obj - The BIObject being executed
profile - The user profile
role - The execution role
modality - The execution modality
subObj - the sub obj
Returns:
The Integer representing the execution id

updateAudit

public void updateAudit(java.lang.Integer auditId,
                        java.lang.Long startTime,
                        java.lang.Long endTime,
                        java.lang.String executionState,
                        java.lang.String errorMessage,
                        java.lang.String errorCode)
Update audit.

Parameters:
auditId - the audit id
startTime - the start time
endTime - the end time
executionState - the execution state
errorMessage - the error message
errorCode - the error code

getMostPopular

public java.util.List getMostPopular(it.eng.spago.security.IEngUserProfile profile,
                                     int limit)
Gets the most popular.

Parameters:
profile - the profile
limit - the limit
Returns:
the most popular

getMyRecentlyUsed

public java.util.List getMyRecentlyUsed(it.eng.spago.security.IEngUserProfile profile,
                                        int limit)
Gets the my recently used.

Parameters:
profile - the profile
limit - the limit
Returns:
the my recently used

getLastExecution

public SbiAudit getLastExecution(java.lang.Integer objId)
Gets the last execution.

Parameters:
objId - the obj id
Returns:
the last execution

getMediumExecTime

public java.lang.Double getMediumExecTime(java.lang.Integer objId)
Gets the medium exec time.

Parameters:
objId - the obj id
Returns:
the medium exec time