Package de.xima.fc.audit.internal
Class AuditServiceImpl
- java.lang.Object
-
- de.xima.fc.audit.internal.AuditServiceImpl
-
- All Implemented Interfaces:
AuditService
@ApplicationScoped public class AuditServiceImpl extends Object implements AuditService
Default implementation of theAuditService. Runs on both the master and the frontend server and delegates everyrecordoverload to the correspondingly named method of theRPC handler, which executes it on the master.- Since:
- 8.5.6
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditEntryHandlerecord(FormRecordAuditEntry entry, User user)Writes an informational form-record protocol entry.AuditEntryHandlerecord(FormVersionAuditEntry entry, User user)Writes a tenant-scoped protocol entry tied to a form version.AuditEntryHandlerecord(SystemAuditEntry entry, User user)Writes a system protocol entry.AuditEntryHandlerecord(TenantAuditEntry entry, User user)Writes a tenant-scoped protocol entry.
-
-
-
Method Detail
-
record
public AuditEntryHandle record(SystemAuditEntry entry, User user) throws FcAuditException
Description copied from interface:AuditServiceWrites a system protocol entry.- Specified by:
recordin interfaceAuditService- Parameters:
entry- the entry to write. Must not benulland must carry a non-blank message.user- the acting user the entry is attributed to. Must not benull.- Returns:
- a handle to the created entry.
- Throws:
FcAuditException- if persistence fails.
-
record
public AuditEntryHandle record(TenantAuditEntry entry, User user) throws FcAuditException
Description copied from interface:AuditServiceWrites a tenant-scoped protocol entry.- Specified by:
recordin interfaceAuditService- Parameters:
entry- the entry to write. Must not benulland must carry a tenant UUID and a non-blank message.user- the acting user the entry is attributed to. Must not benull.- Returns:
- a handle to the created entry.
- Throws:
FcAuditException- if the tenant does not exist (AuditErrorType.NOT_FOUND) or persistence fails.
-
record
public AuditEntryHandle record(FormVersionAuditEntry entry, User user) throws FcAuditException
Description copied from interface:AuditServiceWrites a tenant-scoped protocol entry tied to a form version. The owning tenant is resolved from the form version.- Specified by:
recordin interfaceAuditService- Parameters:
entry- the entry to write. Must not benulland must carry a non-blank message.user- the acting user the entry is attributed to. Must not benull.- Returns:
- a handle to the created entry.
- Throws:
FcAuditException- if the form version does not exist (AuditErrorType.NOT_FOUND) or persistence fails.
-
record
public AuditEntryHandle record(FormRecordAuditEntry entry, User user) throws FcAuditException
Description copied from interface:AuditServiceWrites an informational form-record protocol entry. The form record, its project and owning tenant are resolved from the entry's process id.- Specified by:
recordin interfaceAuditService- Parameters:
entry- the entry to write. Must not benulland must carry a non-blank process id and message.user- the acting user the entry is attributed to. Must not benull.- Returns:
- a handle to the created entry.
- Throws:
FcAuditException- if no form record exists for the process id (AuditErrorType.NOT_FOUND) or persistence fails.
-
-