Package org.jasig.portal.events.support

Examples of org.jasig.portal.events.support.UserLoggedInPortalEvent


         }

         //TODO add IPerson cache

         // Record the successful authentication
         EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserLoggedInPortalEvent(this, person));
      }
   }
View Full Code Here


           
            final PersonImpl facStaffPerson = new PersonImpl();
            facStaffPerson.setAttribute(IPerson.USERNAME, "facStaff");
            this.jpaPortalEventStore.addPersonGroups(facStaffPerson, new HashSet<String>(Arrays.asList("faculty", "staff", "admin")));
           
            UserLoggedInPortalEvent loggedInPortalEvent;
            UserLoggedOutPortalEvent loggedOutPortalEvent;
            final Queue<PortalEvent> eventQueue = new LinkedList<PortalEvent>();
           
            while (eventQueue.size() < 500) {
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, adminPerson);
                eventQueue.offer(loggedInPortalEvent);
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, adminPerson);
                eventQueue.offer(loggedOutPortalEvent);
               
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, studentPerson);
                eventQueue.offer(loggedInPortalEvent);
               
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, adminPerson);
                eventQueue.offer(loggedInPortalEvent);
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, adminPerson);
                eventQueue.offer(loggedOutPortalEvent);
       
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, studentPerson);
                eventQueue.offer(loggedOutPortalEvent);
               
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, facStaffPerson);
                eventQueue.offer(loggedInPortalEvent);
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, facStaffPerson);
                eventQueue.offer(loggedOutPortalEvent);
               
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, facStaffPerson);
                eventQueue.offer(loggedInPortalEvent);
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, facStaffPerson);
                eventQueue.offer(loggedOutPortalEvent);
               
                loggedInPortalEvent = new UserLoggedInPortalEvent(this, studentPerson);
                eventQueue.offer(loggedInPortalEvent);
                loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, studentPerson);
                eventQueue.offer(loggedOutPortalEvent);
            }
       
View Full Code Here

        this.jpaPortalEventStore.addPersonGroups(person, groups);
       
       
        PortalEvent portalEvent;
       
        portalEvent = new UserLoggedInPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(portalEvent);
        this.checkPoint();
       
        assertEquals(1, this.countRowsInTable("STATS_SESSION"));
        assertEquals(0, this.countRowsInTable("STATS_SESSION_GROUPS"));
View Full Code Here

        person.setID(1);
        person.setAttribute(IPerson.USERNAME, "admin");
        this.jpaPortalEventStore.addPersonGroups(person, new HashSet<String>(Arrays.asList("admin", "student")));

       
        UserLoggedInPortalEvent loggedInPortalEvent = new UserLoggedInPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(loggedInPortalEvent);
        this.checkPoint();
       
        assertEquals(1, this.countRowsInTable("STATS_SESSION"));
        assertEquals(2, this.countRowsInTable("STATS_SESSION_GROUPS"));
        assertEquals(1, this.countRowsInTable("STATS_EVENT"));
        assertEquals(1, this.countRowsInTable("STATS_EVENT_TYPE"));
       
       
        UserLoggedOutPortalEvent loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(loggedOutPortalEvent);
        this.checkPoint();
       
        assertEquals(1, this.countRowsInTable("STATS_SESSION"));
        assertEquals(2, this.countRowsInTable("STATS_SESSION_GROUPS"));
        assertEquals(2, this.countRowsInTable("STATS_EVENT"));
        assertEquals(2, this.countRowsInTable("STATS_EVENT_TYPE"));
       


        person = new PersonImpl();
        person.setID(2);
        person.setAttribute(IPerson.USERNAME, "student");
        this.jpaPortalEventStore.addPersonGroups(person, new HashSet<String>(Arrays.asList("developer", "student")));
       
        loggedInPortalEvent = new UserLoggedInPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(loggedInPortalEvent);
        this.checkPoint();
       
        assertEquals(2, this.countRowsInTable("STATS_SESSION"));
        assertEquals(4, this.countRowsInTable("STATS_SESSION_GROUPS"));
View Full Code Here

TOP

Related Classes of org.jasig.portal.events.support.UserLoggedInPortalEvent

Copyright © 2018 www.massapicom. 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.