|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlumis.portal.audit.AuditManager
public class AuditManager
Manager for Auditing.
Nested Class Summary | |
---|---|
static class |
AuditManager.AuditType
Enum of audit types used by audit actions taken. |
Field Summary |
---|
Fields inherited from interface lumis.portal.audit.IAuditManager |
---|
QUERY_CACHE_REGION |
Constructor Summary | |
---|---|
AuditManager()
|
Method Summary | |
---|---|
void |
audit(java.lang.String title,
java.lang.String description,
java.lang.String typeKey)
Register an audit entry. |
lumis.portal.audit.AuditEntry |
audit(java.lang.String title,
java.lang.String description,
java.lang.String typeKey,
boolean registerChilds,
ITransaction t)
Starts an operation for audit and add register an observer to the transaction in order to end the operation. |
lumis.portal.audit.AuditEntry |
beginAudit(java.lang.String title,
java.lang.String description,
java.lang.String typeKey,
boolean registerChilds)
Starts an operation for audit. |
void |
clearContextThreadData()
Clears the AuditContext thread data. |
void |
disableType(java.lang.String auditEntryTypeId)
Disable the AuditEntryType by it's id. |
void |
enableType(java.lang.String auditEntryTypeId)
Enable the AuditEntryType by it's id. |
void |
endAudit(lumis.portal.audit.AuditEntry auditEntry)
Ends the AuditEntry operation. |
protected void |
endContext(lumis.portal.audit.AuditEntry auditEntry)
End the audit context. |
protected AuditCategory |
findCategoryById(java.lang.String categoryId)
Find the category by it's id. |
protected AuditCategory |
findCategoryByKey(java.lang.String categoryKey)
Find the AuditCategory by it's key. |
protected AuditEntryType |
findEntryTypeByKey(java.lang.String entryTypeKey)
Find the AuditEntryType by it's key. |
protected void |
initContext(lumis.portal.audit.AuditEntry auditEntry,
boolean registerChilds)
Initializes the audit context. |
protected lumis.portal.audit.AuditEntry |
initEntry(java.lang.String userId,
java.lang.String userLogin,
java.lang.String title,
java.lang.String description,
AuditEntryType type,
boolean registerChilds)
Creates an instance of AuditEntry. |
protected void |
logEntry(lumis.portal.audit.AuditEntry auditEntry)
Log the audit entry. |
AuditConfig |
obtainConfiguration()
Obtain the audit configuration. |
protected void |
registerEntry(lumis.portal.audit.AuditEntry auditEntry,
AuditEntryState state)
Register the audit entry in database. |
void |
removeOldEntries()
Remove audit entries older than the number of days specified by the cleanInterval field in configuration. |
void |
updateCleanInterval(int cleanInterval)
Updates the time interval to clean audit entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuditManager()
Method Detail |
---|
public void audit(java.lang.String title, java.lang.String description, java.lang.String typeKey) throws PortalException
audit
in interface IAuditManager
title
- the operation title. If the title is bigger
than the allowed size, the string is truncated.description
- the operation description.typeKey
- the AuditEntryType key.
PortalException
public lumis.portal.audit.AuditEntry audit(java.lang.String title, java.lang.String description, java.lang.String typeKey, boolean registerChilds, ITransaction t) throws PortalException
title
- the operation title.description
- the operation description.categoryKey
- the AuditCategory key.typeKey
- the AuditEntryType key.registerChilds
- true if the child entries must be saved in
database, false otherwise.
PortalException
public lumis.portal.audit.AuditEntry beginAudit(java.lang.String title, java.lang.String description, java.lang.String typeKey, boolean registerChilds) throws PortalException
title
- the operation title.description
- the operation description.categoryKey
- the AuditCategory key.typeKey
- the AuditEntryType key.registerChilds
- true if the child entries must be saved in
database, false otherwise.
PortalException
public void endAudit(lumis.portal.audit.AuditEntry auditEntry) throws PortalException
auditEntry
- the AuditEntry instance.
PortalException
public void enableType(java.lang.String auditEntryTypeId) throws PortalException
AuditEntryType
by it's id.
auditEntryTypeId
- the type id.
AccessDeniedException
- if the user has not permission to use
management functions.
PortalException
public void disableType(java.lang.String auditEntryTypeId) throws PortalException
AuditEntryType
by it's id.
auditEntryTypeId
- the type id.
AccessDeniedException
- if the user has not permission to use
management functions.
PortalException
public void removeOldEntries() throws PortalException
PortalException
public void updateCleanInterval(int cleanInterval) throws PortalException
cleanInterval
- the new value for time interval in
days.
AccessDeniedException
- if the user has not permission to use
management functions.
PortalException
- if an error occur updating the time
interval.public AuditConfig obtainConfiguration() throws PortalException
AuditConfig
.
PortalException
- if an error occur retrieving the configuration.public void clearContextThreadData()
AuditContext
thread
data.
protected lumis.portal.audit.AuditEntry initEntry(java.lang.String userId, java.lang.String userLogin, java.lang.String title, java.lang.String description, AuditEntryType type, boolean registerChilds)
user
- user.title
- a title for the operation being audited.
If the title is bigger than the allowed, a
substring is created.description
- a description for the operation.type
- the AuditEntryType instance.registerChilds
- true if the child entries must be saved in
database, false otherwise.
protected AuditCategory findCategoryByKey(java.lang.String categoryKey) throws PortalException
categoryKey
- the audit category key.
PortalException
- if an error occur in audit category dao.protected AuditCategory findCategoryById(java.lang.String categoryId) throws PortalException
categoryId
- the category id.
PortalException
protected AuditEntryType findEntryTypeByKey(java.lang.String entryTypeKey) throws PortalException
entryTypeKey
- the audit entry type key.
PortalException
- if an error occur in audit entry type dao.protected void initContext(lumis.portal.audit.AuditEntry auditEntry, boolean registerChilds)
auditEntry
- the AuditEntry instance.registerChilds
- true if the child entries must be saved in
database, false otherwise.protected void endContext(lumis.portal.audit.AuditEntry auditEntry)
auditEntry
- the AuditEntry instance.protected void logEntry(lumis.portal.audit.AuditEntry auditEntry)
auditEntry
- the AuditEntry instance.protected void registerEntry(lumis.portal.audit.AuditEntry auditEntry, AuditEntryState state) throws PortalException
auditEntry
- the AuditEntry instance.state
- the state of audit entry.
PortalException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |