public AuditLogableBase(final AuditLog auditLog) { this(auditLog.getVdsId(), auditLog.getVmId()); this.storageDomainId = auditLog.getStorageDomainId(); this.storagePoolId = auditLog.getStoragePoolId(); this.correlationId = auditLog.getCorrelationId(); this.customData = auditLog.getCustomData(); this.customEventId = auditLog.getCustomEventId(); this.eventFloodInSec = auditLog.getEventFloodInSec(); this.glusterVolumeId = auditLog.getGlusterVolumeId(); this.glusterVolumeName = auditLog.getGlusterVolumeName(); this.jobId = auditLog.getJobId(); this.userId = auditLog.getUserId(); this.userName = auditLog.getUserName(); this.clusterId = auditLog.getClusterId(); this.vdsName = auditLog.getVdsName(); this.vmName = auditLog.getVmName(); this.vmTemplateId = auditLog.getVmTemplateId(); this.vmTemplateName = auditLog.getVmTemplateName(); this.origin = auditLog.getOrigin(); this.external = auditLog.isExternal(); this.callStack = auditLog.getCallStack(); this.brickId = auditLog.getBrickId(); this.brickPath = auditLog.getBrickPath(); }
model.setFloodRate(entity.getEventFloodInSec()); if (StringUtils.isNotEmpty(entity.getCustomData())) { model.setCustomData(entity.getCustomData());
@Test public void testSaveExternalEvent() { AuditLog newExternalEvent = new AuditLog(); newExternalEvent.setLogType(AuditLogType.EXTERNAL_EVENT_NORMAL); newExternalEvent.setExternal(true); newExternalEvent.setOrigin("XYZ"); newExternalEvent.setCustomEventId(123123123); newExternalEvent.setCustomData("Some text here"); newExternalEvent.setMessage("And here"); newExternalEvent.setEventFloodInSec(100); dao.save(newExternalEvent); AuditLog result = dao.get(newExternalEvent.getAuditLogId()); assertNotNull(result); assertTrue(result.getAuditLogId() > 0); assertEquals(newExternalEvent.getOrigin(), result.getOrigin()); assertEquals(newExternalEvent.getCustomEventId(), result.getCustomEventId()); assertEquals(newExternalEvent.getCustomData(), result.getCustomData()); assertEquals(newExternalEvent.getMessage(), result.getMessage()); assertEquals(newExternalEvent.getEventFloodInSec(), result.getEventFloodInSec()); }
.addValue("custom_id", event.getCustomId()) .addValue("custom_event_id", event.getCustomEventId()) .addValue("event_flood_in_sec", event.getEventFloodInSec()) .addValue("custom_data", event.getCustomData());