@ThreadSafe public class SimpleAuditManager extends com.helger.photon.app.dao.AbstractPhotonWALDAO<AuditItem> implements IAuditor
| Constructor and Description |
|---|
SimpleAuditManager(String sFilename,
com.helger.security.authentication.subject.user.ICurrentUserIDProvider aCurrentUserIDProvider)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
createAuditItem(EAuditActionType eActionType,
com.helger.commons.state.ESuccess eSuccess,
com.helger.commons.type.ObjectType aActionObjectType,
String sAction,
Object... aArgs)
Create a new audit item.
|
protected com.helger.xml.microdom.IMicroDocument |
createWriteData() |
boolean |
equals(Object o) |
com.helger.commons.collection.impl.ICommonsList<IAuditItem> |
getAllAuditItems() |
int |
getAuditItemCount() |
List<IAuditItem> |
getLastAuditItems(int nMaxItems) |
int |
hashCode() |
protected com.helger.commons.state.EChange |
onRead(com.helger.xml.microdom.IMicroDocument aDoc) |
protected void |
onRecoveryCreate(AuditItem aItem) |
protected void |
onRecoveryDelete(AuditItem aElement) |
protected void |
onRecoveryUpdate(AuditItem aElement) |
String |
toString() |
convertNativeToWALString, convertWALStringToNative, getDataTypeClass, getFilenameProvider, getInitCount, getIO, getLastFilename, getLastInitDateTime, getLastReadDateTime, getLastWriteDateTime, getReadCount, getSafeFile, getWaitingTime, getWALXMLWriterSettings, getWriteCount, getXMLWriterSettings, initialRead, markAsChanged, markAsChanged, modifyWriteData, onBetweenReadAndWAL, onFilenameChange, onInit, onRecoveryErrorConvertToNative, setWaitingTime, triggerExceptionHandlersRead, triggerExceptionHandlersWrite, writeToFileOnPendingChangesbeginWithoutAutoSave, checkFileAccess, endWithoutAutoSave, exceptionHandlersRead, exceptionHandlersWrite, hasPendingChanges, internalHasPendingChanges, internalIsAutoSaveEnabled, internalSetPendingChanges, isAutoSaveEnabled, isSilentMode, setSilentModeclone, finalize, getClass, notify, notifyAll, wait, wait, waitonCreateFailure, onCreateSuccess, onDeleteFailure, onDeleteSuccess, onExecuteFailure, onExecuteFailure, onExecuteSuccess, onExecuteSuccess, onModifyFailure, onModifySuccess, onUndeleteFailure, onUndeleteSuccesspublic SimpleAuditManager(@Nullable String sFilename, @Nonnull com.helger.security.authentication.subject.user.ICurrentUserIDProvider aCurrentUserIDProvider) throws com.helger.dao.DAOException
sFilename - The filename to write the audits to. May be null to
indicate an in-memory auditor only.aCurrentUserIDProvider - The current user ID provider. May not be null.com.helger.dao.DAOException - In case reading failed@IsLocked(value=WRITE) protected void onRecoveryCreate(@Nonnull AuditItem aItem)
onRecoveryCreate in class com.helger.dao.wal.AbstractWALDAO<AuditItem>@IsLocked(value=WRITE) protected void onRecoveryUpdate(@Nonnull AuditItem aElement)
onRecoveryUpdate in class com.helger.dao.wal.AbstractWALDAO<AuditItem>@IsLocked(value=WRITE) protected void onRecoveryDelete(@Nonnull AuditItem aElement)
onRecoveryDelete in class com.helger.dao.wal.AbstractWALDAO<AuditItem>@Nonnull protected com.helger.commons.state.EChange onRead(@Nonnull com.helger.xml.microdom.IMicroDocument aDoc)
onRead in class com.helger.dao.wal.AbstractWALDAO<AuditItem>protected com.helger.xml.microdom.IMicroDocument createWriteData()
createWriteData in class com.helger.dao.wal.AbstractWALDAO<AuditItem>public void createAuditItem(@Nonnull EAuditActionType eActionType, @Nonnull com.helger.commons.state.ESuccess eSuccess, @Nullable com.helger.commons.type.ObjectType aActionObjectType, @Nullable String sAction, @Nullable Object... aArgs)
IAuditorcreateAuditItem in interface IAuditoreActionType - Action type. May not be null.eSuccess - Success or failure? May not be null.aActionObjectType - Action object type. May be null if sAction is set.sAction - The performed action. May be null if aActionObjectType
is set.aArgs - An optional array of arguments. May be null or empty.@Nonnegative public int getAuditItemCount()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<IAuditItem> getAllAuditItems()
@Nonnull @ReturnsMutableCopy public List<IAuditItem> getLastAuditItems(@Nonnegative int nMaxItems)
Copyright © 2014–2023 Philip Helger. All rights reserved.