@Test public void addsXPagePresent() throws ComponentLookupException { final AuditEvent e = new AuditEvent(this.user, "ip", "get", null, this.doc, Calendar.getInstance()); final AuditEvent result = this.mocker.getComponentUnderTest().process(e); Assert.assertSame(e.getUser(), result.getUser()); Assert.assertSame(e.getIp(), result.getIp()); Assert.assertSame(e.getAction(), result.getAction()); Assert.assertEquals("plain", result.getExtraInformation()); Assert.assertSame(e.getEntity(), result.getEntity()); Assert.assertSame(e.getTime(), result.getTime()); }
@Override public AuditEvent process(AuditEvent event) { if ("get".equals(event.getAction()) && event.getExtraInformation() == null) { String xpage = this.xcontextProvider.get().getRequest().getParameter("xpage"); if ("xpart".equals(xpage)) { xpage = this.xcontextProvider.get().getRequest().getParameter("vm"); } return new AuditEvent(event.getUser(), event.getIp(), event.getAction(), xpage, event.getEntity(), event.getTime()); } return event; }
GetXPageAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { if ("get".equals(event.getAction()) && event.getExtraInformation() == null) { String xpage = this.xcontextProvider.get().getRequest().getParameter("xpage"); if ("xpart".equals(xpage)) { xpage = this.xcontextProvider.get().getRequest().getParameter("vm"); } return new AuditEvent(event.getUser(), event.getIp(), event.getAction(), xpage, event.getEntity(), event.getTime()); } return event; } }
GetXPageAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { if ("get".equals(event.getAction()) && event.getExtraInformation() == null) { String xpage = this.xcontextProvider.get().getRequest().getParameter("xpage"); if ("xpart".equals(xpage)) { xpage = this.xcontextProvider.get().getRequest().getParameter("vm"); } return new AuditEvent(event.getUser(), event.getIp(), event.getAction(), xpage, event.getEntity(), event.getTime()); } return event; }  }
GetXPageAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { if ("get".equals(event.getAction()) && event.getExtraInformation() == null) { String xpage = this.xcontextProvider.get().getRequest().getParameter("xpage"); if ("xpart".equals(xpage)) { xpage = this.xcontextProvider.get().getRequest().getParameter("vm"); } return new AuditEvent(event.getUser(), event.getIp(), event.getAction(), xpage, event.getEntity(), event.getTime()); } return event; }  @Override AuditEvent process(AuditEvent event); }
GetXPageAuditEventProcessor implements AuditEventProcessor { @Override public AuditEvent process(AuditEvent event) { if ("get".equals(event.getAction()) && event.getExtraInformation() == null) { String xpage = this.xcontextProvider.get().getRequest().getParameter("xpage"); if ("xpart".equals(xpage)) { xpage = this.xcontextProvider.get().getRequest().getParameter("vm"); } return new AuditEvent(event.getUser(), event.getIp(), event.getAction(), xpage, event.getEntity(), event.getTime()); } return event; }  @Override AuditEvent process(AuditEvent event);  }