T - Any Object that Extents AuditModel.public abstract class AuditService<T extends AuditModel> extends Object
| Constructor and Description |
|---|
AuditService() |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(T auditModel)
Sets date and persist the Audit in the repository.
|
protected abstract void |
deleteAudits(List<String> auditId)
Deletes all audits where its it is in the given List.
|
abstract T |
getAuditLog(String id)
Gets the audit log for its Id.
|
abstract List<T> |
getAuditLogs(Date from)
Returns all Audits starting the given date.
|
abstract List<T> |
getAuditLogs(Date from,
Date to)
Returns all Audits where logged date is between the given dates.
|
protected abstract void |
persistAudit(T auditModel)
Defines the actual save of the audit to the given audit repository.
|
public void audit(T auditModel)
auditModel - Audit to be save.public abstract T getAuditLog(String id)
id - It of the audit log.protected abstract void persistAudit(T auditModel)
auditModel - Audit to be save.protected abstract void deleteAudits(List<String> auditId)
auditId - List of audits id to delete.public abstract List<T> getAuditLogs(Date from)
from - Date when the Audit was logged.public abstract List<T> getAuditLogs(Date from, Date to)
from - Start Date range.(including)to - End of Date range.(including)Copyright © 2017 CrafterCMS. All Rights Reserved.