public class DummyAuditService extends Object implements AuditService, DebugDumpable
MAX_MESSAGE_SIZE
INDENT_STRING
Constructor and Description |
---|
DummyAuditService() |
Modifier and Type | Method and Description |
---|---|
void |
assertAnyRequestDeltas() |
void |
assertExecutionDeltaAdd() |
void |
assertExecutionDeltas(int expectedNumber) |
void |
assertExecutionDeltas(int index,
int expectedNumber) |
void |
assertExecutionMessage() |
void |
assertExecutionMessage(int index) |
void |
assertExecutionOutcome(int index,
OperationResultStatus expectedStatus) |
void |
assertExecutionOutcome(OperationResultStatus expectedStatus) |
void |
assertExecutionSuccess() |
void |
assertFailedLogin(String expectedChannel) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(ChangeType expectedChangeType,
Class<O> expectedClass) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(ChangeType expectedChangeType,
Class<O> expectedClass,
OperationResultStatus expextedResult) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(int index,
ChangeType expectedChangeType,
Class<O> expectedClass) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(int index,
ChangeType expectedChangeType,
Class<O> expectedClass,
OperationResultStatus expextedResult) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(String message,
int index,
ChangeType expectedChangeType,
Class<O> expectedClass) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
assertHasDelta(String message,
int index,
ChangeType expectedChangeType,
Class<O> expectedClass,
OperationResultStatus expextedResult) |
void |
assertLoginLogout()
Checks that the first record is login and the last is logout.
|
void |
assertLoginLogout(String expectedChannel)
Checks that the first record is login and the last is logout.
|
void |
assertNoRecord() |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
assertOldValue(ChangeType expectedChangeType,
Class<O> expectedClass,
ItemPath propPath,
T expectedValue) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
assertOldValue(ChangeType expectedChangeType,
Class<O> expectedClass,
QName attrName,
T expectedValue) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
assertOldValue(int index,
ChangeType expectedChangeType,
Class<O> expectedClass,
ItemPath propPath,
T expectedValue) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> |
assertOldValue(String message,
int index,
ChangeType expectedChangeType,
Class<O> expectedClass,
ItemPath propPath,
T... expectedValues) |
void |
assertRecords(AuditEventType type,
int expectedNumber) |
void |
assertRecords(int expectedNumber) |
void |
assertSimpleRecordSanity()
Asserts that there is a request message followed by execution message.
|
void |
assertTarget(String expectedOid) |
void |
assertTarget(String expectedOid,
AuditEventStage stage) |
void |
audit(AuditEventRecord record,
Task task) |
void |
cleanupAudit(com.evolveum.midpoint.xml.ns._public.common.common_3.CleanupPolicyType policy,
OperationResult parentResult)
Clean up audit records that are older than specified.
|
void |
clear() |
String |
debugDump()
Show the content of the object intended for diagnostics by system administrator.
|
String |
debugDump(int indent) |
ObjectDeltaOperation<?> |
getExecutionDelta(int index) |
<O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getExecutionDelta(int index,
ChangeType changeType,
Class<O> typeClass) |
Collection<ObjectDeltaOperation<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> |
getExecutionDeltas() |
Collection<ObjectDeltaOperation<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> |
getExecutionDeltas(int index) |
AuditEventRecord |
getExecutionRecord(int index) |
List<AuditEventRecord> |
getExecutionRecords() |
static DummyAuditService |
getInstance() |
List<AuditEventRecord> |
getRecords() |
List<AuditEventRecord> |
getRecordsOfType(AuditEventType type) |
AuditEventRecord |
getRequestRecord() |
List<AuditEventRecord> |
listRecords(String query,
Map<String,Object> params) |
String |
toString() |
public static DummyAuditService getInstance()
public void audit(AuditEventRecord record, Task task)
audit
in interface AuditService
public void cleanupAudit(com.evolveum.midpoint.xml.ns._public.common.common_3.CleanupPolicyType policy, OperationResult parentResult)
AuditService
cleanupAudit
in interface AuditService
policy
- Records will be deleted base on this policy.public List<AuditEventRecord> getRecords()
public void clear()
public void assertSimpleRecordSanity()
public void assertRecords(int expectedNumber)
public List<AuditEventRecord> getRecordsOfType(AuditEventType type)
public void assertRecords(AuditEventType type, int expectedNumber)
public AuditEventRecord getRequestRecord()
public AuditEventRecord getExecutionRecord(int index)
public List<AuditEventRecord> getExecutionRecords()
public void assertAnyRequestDeltas()
public Collection<ObjectDeltaOperation<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> getExecutionDeltas()
public Collection<ObjectDeltaOperation<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType>> getExecutionDeltas(int index)
public ObjectDeltaOperation<?> getExecutionDelta(int index)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> getExecutionDelta(int index, ChangeType changeType, Class<O> typeClass)
public void assertExecutionDeltaAdd()
public void assertExecutionSuccess()
public void assertExecutionOutcome(OperationResultStatus expectedStatus)
public void assertExecutionOutcome(int index, OperationResultStatus expectedStatus)
public void assertExecutionMessage()
public void assertExecutionMessage(int index)
public void assertNoRecord()
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(ChangeType expectedChangeType, Class<O> expectedClass)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(ChangeType expectedChangeType, Class<O> expectedClass, OperationResultStatus expextedResult)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(int index, ChangeType expectedChangeType, Class<O> expectedClass)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(int index, ChangeType expectedChangeType, Class<O> expectedClass, OperationResultStatus expextedResult)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(String message, int index, ChangeType expectedChangeType, Class<O> expectedClass)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> ObjectDeltaOperation<O> assertHasDelta(String message, int index, ChangeType expectedChangeType, Class<O> expectedClass, OperationResultStatus expextedResult)
public void assertExecutionDeltas(int expectedNumber)
public void assertExecutionDeltas(int index, int expectedNumber)
public void assertTarget(String expectedOid, AuditEventStage stage)
public void assertTarget(String expectedOid)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> void assertOldValue(ChangeType expectedChangeType, Class<O> expectedClass, QName attrName, T expectedValue)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> void assertOldValue(ChangeType expectedChangeType, Class<O> expectedClass, ItemPath propPath, T expectedValue)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> void assertOldValue(int index, ChangeType expectedChangeType, Class<O> expectedClass, ItemPath propPath, T expectedValue)
public <O extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType,T> void assertOldValue(String message, int index, ChangeType expectedChangeType, Class<O> expectedClass, ItemPath propPath, T... expectedValues)
public void assertLoginLogout()
public void assertLoginLogout(String expectedChannel)
public void assertFailedLogin(String expectedChannel)
public String debugDump()
DebugDumpable
debugDump
in interface DebugDumpable
public String debugDump(int indent)
debugDump
in interface DebugDumpable
public List<AuditEventRecord> listRecords(String query, Map<String,Object> params)
listRecords
in interface AuditService
Copyright © 2016 evolveum. All rights reserved.