@Test public void returnsInputIfNotExportPage() throws ComponentLookupException { final AuditEvent e = new AuditEvent(this.user, "ip", "get", null, new DocumentReference("wiki", "PhenoTips", "ExportFamily"), Calendar.getInstance()); Assert.assertSame(e, this.mocker.getComponentUnderTest().process(e)); }
@Override public AuditEvent process(AuditEvent event) { String id = this.xcontextProvider.get().getRequest().getParameter("id"); if ("get".equals(event.getAction()) && "ExportPatient".equals(event.getEntity().getName()) && id != null) { DocumentReference patient = this.resolver.resolve(id, new EntityReference("data", EntityType.SPACE)); return new AuditEvent(event.getUser(), event.getIp(), "export", "json", patient, event.getTime()); } return event; }
PatientJsonExportAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { String id = this.xcontextProvider.get().getRequest().getParameter("id"); if ("get".equals(event.getAction()) && "ExportPatient".equals(event.getEntity().getName()) && id != null) { DocumentReference patient = this.resolver.resolve(id, new EntityReference("data", EntityType.SPACE)); return new AuditEvent(event.getUser(), event.getIp(), "export", "json", patient, event.getTime()); } return event; } }
PatientJsonExportAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { String id = this.xcontextProvider.get().getRequest().getParameter("id"); if ("get".equals(event.getAction()) && "ExportPatient".equals(event.getEntity().getName()) && id != null) { DocumentReference patient = this.resolver.resolve(id, new EntityReference("data", EntityType.SPACE)); return new AuditEvent(event.getUser(), event.getIp(), "export", "json", patient, event.getTime()); } return event; }  }
PatientJsonExportAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { String id = this.xcontextProvider.get().getRequest().getParameter("id"); if ("get".equals(event.getAction()) && "ExportPatient".equals(event.getEntity().getName()) && id != null) { DocumentReference patient = this.resolver.resolve(id, new EntityReference("data", EntityType.SPACE)); return new AuditEvent(event.getUser(), event.getIp(), "export", "json", patient, event.getTime()); } return event; }  @Override AuditEvent process(AuditEvent event); }
PatientJsonExportAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { String id = this.xcontextProvider.get().getRequest().getParameter("id"); if ("get".equals(event.getAction()) && "ExportPatient".equals(event.getEntity().getName()) && id != null) { DocumentReference patient = this.resolver.resolve(id, new EntityReference("data", EntityType.SPACE)); return new AuditEvent(event.getUser(), event.getIp(), "export", "json", patient, event.getTime()); } return event; }  @Override AuditEvent process(AuditEvent event);  }