Package com.opengamma.security.auditlog

Examples of com.opengamma.security.auditlog.HibernateAuditLogger.findAll()


  @Test
  public void testLogging() throws Exception {
    try (HibernateAuditLogger logger = new HibernateAuditLogger(5, 1)) {
      logger.setSessionFactory(getDbConnector().getHibernateSessionFactory());
     
      Collection<AuditLogEntry> logEntries = logger.findAll();
      assertEquals(0, logEntries.size());
     
      logger.log("jake", "/Portfolio/XYZ123", "View", true);
      logger.log("jake", "/Portfolio/XYZ345", "Modify", "User has no Modify permission on this portfolio", false);
     
View Full Code Here


      logger.log("jake", "/Portfolio/XYZ345", "Modify", "User has no Modify permission on this portfolio", false);
     
      logger.flushCache();
      logger.flushCache();
     
      logEntries = logger.findAll();
      assertEquals(2, logEntries.size());
     
      for (AuditLogEntry entry : logEntries) {
        assertEquals("jake", entry.getUser());
        assertEquals(InetAddress.getLocalHost().getHostName(), entry.getOriginatingSystem());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.