Package org.jasig.portal.events.support

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


            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);
            }
       
       
            PortalEvent[] events = new PortalEvent[50];
View Full Code Here


    if (session != null) {
        // Record that an authenticated user is requesting to log out
        try {
            IPerson person = PersonManagerFactory.getPersonManagerInstance().getPerson(request);
            if (person != null && person.getSecurityContext().isAuthenticated()) {
              EventPublisherLocator.getApplicationEventPublisher().publishEvent(new UserLoggedOutPortalEvent(this, person));
            }
        } catch (Exception e) {
            log.error("Exception recording logout " +
                    "associated with request " + request, e);
        }
View Full Code Here

        assertEquals(0, this.countRowsInTable("STATS_CHANNEL"));
        assertEquals(0, this.countRowsInTable("STATS_FOLDER"));
        assertEquals(0, this.countRowsInTable("STATS_RENDER_TIME"));
       
       
        portalEvent = new UserLoggedOutPortalEvent(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

        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"));
        assertEquals(3, this.countRowsInTable("STATS_EVENT"));
        assertEquals(2, this.countRowsInTable("STATS_EVENT_TYPE"));
       
       
        loggedOutPortalEvent = new UserLoggedOutPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(loggedOutPortalEvent);
        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.UserLoggedOutPortalEvent

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.