Package org.jasig.portal.events

Examples of org.jasig.portal.events.PortalEvent$PortalEventBuilder


    public void onApplicationEvent(ApplicationEvent event) {
        if (!(event instanceof UserLoggedOutPortalEvent || event instanceof UserSessionDestroyedPortalEvent)) {
            return;
        }
       
        final PortalEvent portalEvent = (PortalEvent)event;
        final IPerson person = portalEvent.getPerson();
        final String userName = person.getUserName();

        for (final CachingPersonAttributeDaoImpl cachingAttributeDao : this.cachingAttributeDaos.values()) {
            cachingAttributeDao.removeUserAttributes(userName);
        }
View Full Code Here


    /* (non-Javadoc)
     * @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent)
     */
    public void onApplicationEvent(ApplicationEvent event) {
        if (event instanceof UserLoggedOutPortalEvent || event instanceof UserSessionDestroyedPortalEvent) {
            final PortalEvent portalEvent = (PortalEvent)event;
            final IPerson person = portalEvent.getPerson();
            //We don't want to clear out the guest layout
            if (person.isGuest()) {
                return;
            }
           
View Full Code Here

                }
               
                //Get an array of the events
                final PortalEvent[] flushedEvents = new PortalEvent[flushSize];
                for (int index = 0; index < flushedEvents.length; index++) {
                    final PortalEvent event = this.eventQueue.poll();
                    flushedEvents[index] = event;
                }
               
                //Decrement the event count
                this.eventCount.addAndGet(-flushedEvents.length);
View Full Code Here

            PortalEvent[] events = new PortalEvent[50];

            final long start = System.currentTimeMillis();
            while (eventQueue.size() > 0) {
                for (int i = 0; i < events.length; i++) {
                    final PortalEvent event = eventQueue.poll();
                    if (event != null) {
                        events[i] = event;
                    }
                    else {
                        PortalEvent[] lastEvents = new PortalEvent[i];
View Full Code Here

        person.setAttribute(IPerson.USERNAME, "admin");
        final Set<String> groups = Collections.emptySet();
        this.jpaPortalEventStore.addPersonGroups(person, groups);
       
       
        PortalEvent portalEvent;
       
        portalEvent = new UserLoggedInPortalEvent(this, person);
        this.jpaPortalEventStore.storePortalEvents(portalEvent);
        this.checkPoint();
       
View Full Code Here

        }

        int resultCount = 0;
        for (final ScrollableResults results = query.scroll(ScrollMode.FORWARD_ONLY); results.next(); ) {
            final PersistentPortalEvent persistentPortalEvent = (PersistentPortalEvent)results.get(0);
            final PortalEvent portalEvent;
            try {
                portalEvent = this.toPortalEvent(persistentPortalEvent.getEventData(), persistentPortalEvent.getEventType());
            }
            catch (RuntimeException e) {
                this.logger.warn("Failed to convert PersistentPortalEvent to PortalEvent: " + persistentPortalEvent, e);
View Full Code Here

            query.setMaxResults(maxEvents);
        }

        for (final ScrollableResults results = query.scroll(ScrollMode.FORWARD_ONLY); results.next(); ) {
            final PersistentPortalEvent persistentPortalEvent = (PersistentPortalEvent)results.get(0);
            final PortalEvent portalEvent = this.toPortalEvent(persistentPortalEvent.getEventData(), persistentPortalEvent.getEventType());
            handler.apply(portalEvent);
            persistentPortalEvent.setAggregated(true);
            session.evict(persistentPortalEvent);
        }
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.events.PortalEvent$PortalEventBuilder

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.