Package org.apache.cocoon.portal.event

Examples of org.apache.cocoon.portal.event.Publisher


        } catch (Exception ignore) {
        } finally {
            this.manager.release(service);
        }
        if ( instances != null ) {
            Publisher publisher = null;
            EventManager eventManager = null;
            try {
                eventManager = (EventManager) this.manager.lookup(EventManager.ROLE);
                publisher = eventManager.getPublisher();
            } catch (Exception ignore) {
            } finally {
                this.manager.release(eventManager);
            }

            if ( publisher != null ) {
                if ( e instanceof ChangeCopletsJXPathEvent ) {
                    final String path = ((ChangeCopletsJXPathEvent)e).getPath();
                    final Object value = ((ChangeCopletsJXPathEvent)e).getValue();
                   
                    Iterator i = instances.iterator();
                    while ( i.hasNext() ) {
                        CopletInstanceData current = (CopletInstanceData) i.next();
                        Event event = new CopletJXPathEvent(current, path, value);
                        publisher.publish(event);
                    }
                }
            }
        }
    }
View Full Code Here


        EventConverter converter = null;
        PortalService service = null;
        try {
            service = (PortalService)this.manager.lookup(PortalService.ROLE);
            converter = (EventConverter) this.manager.lookup(EventConverter.ROLE);
            Publisher publisher = this.getPublisher();

            converter.start();
           
            // Invoke aspects
            context.setEventPublisher( publisher );
View Full Code Here

        EventConverter converter = null;
        PortalService service = null;
        try {
            service = (PortalService)this.manager.lookup(PortalService.ROLE);
            converter = (EventConverter) this.manager.lookup(EventConverter.ROLE);
            Publisher publisher = this.getPublisher();

            converter.start();
           
            // Invoke aspects
            context.setEventPublisher( publisher );
View Full Code Here

  public void process(EventAspectContext context, PortalService service) {
        final String requestParameterName = FullScreenCopletEvent.REQUEST_PARAMETER_NAME;
        final Request request = ObjectModelHelper.getRequest( context.getObjectModel() );
        String[] values = request.getParameterValues( requestParameterName );
        if ( values != null ) {
            final Publisher publisher = context.getEventPublisher();
            for(int i=0; i<values.length; i++) {
                final String current = values[i];
                Event e = context.getEventConverter().decode(current);
                if ( null != e ) {
                    publisher.publish(e);
                    FullScreenCopletEvent fsce = (FullScreenCopletEvent)e;
                    if ( fsce.getLayout() != null) {
                        service.getLinkService().addEventToLink( e );
                    }
                }
View Full Code Here

        // FIXME Configure more than one parameter name
        final String requestParameterName = config.getParameter("parameter-name", LinkService.DEFAULT_REQUEST_EVENT_PARAMETER_NAME);
        final Request request = ObjectModelHelper.getRequest( context.getObjectModel() );
        String[] values = request.getParameterValues( requestParameterName );
        if ( values != null ) {
            final Publisher publisher = context.getEventPublisher();
            for(int i=0; i<values.length; i++) {
                final String current = values[i];
                final Event e = context.getEventConverter().decode(current);
                if ( null != e) {
                    publisher.publish(e);
                }
            }
        }
        context.invokeNext( service );       
  }
View Full Code Here

    public void process(EventAspectContext context, PortalService service) {
        final String requestParameterName = FrameSourceEvent.URI_PARAMETER;
        final Request request = ObjectModelHelper.getRequest(context.getObjectModel());
        String[] values = request.getParameterValues(requestParameterName);
        if (values != null) {
            final Publisher publisher = context.getEventPublisher();
            for (int i = 0; i < values.length; i++) {
                final String value = values[i];
                Event e = null;
                try {
                    e = context.getEventConverter().decode(value);
                    if (null != e) {
                        publisher.publish(e);
                        service.getLinkService().addEventToLink(e);
                    }
                } catch (Exception ignore) {
                }
                if (e == null) {
                    // Use '|' character as delimiter between ID and URI
                    int index = value.indexOf('|');
                    if (index != -1) {
                        String id = value.substring(0, index);
                        String uri = null;
                        if (index != (value.length() - 1)) {
                            uri = value.substring(index + 1);
                        }
                        e = new FrameSourceEvent(id, uri);
                        publisher.publish(e);
                        if (uri != null) {
                            service.getLinkService().addEventToLink(e);
                        }
                    }
                }
View Full Code Here

  public void process(EventAspectContext context, PortalService service) {
        final String requestParameterName = FullScreenCopletEvent.REQUEST_PARAMETER_NAME;
        final Request request = ObjectModelHelper.getRequest( context.getObjectModel() );
        String[] values = request.getParameterValues( requestParameterName );
        if ( values != null ) {
            final Publisher publisher = context.getEventPublisher();
            for(int i=0; i<values.length; i++) {
                final String current = values[i];
                Event e = context.getEventConverter().decode(current);
                if ( null != e ) {
                    publisher.publish(e);
                    FullScreenCopletEvent fsce = (FullScreenCopletEvent)e;
                    if ( fsce.getLayout() != null) {
                        service.getComponentManager().getLinkService().addEventToLink( e );
                    }
                }
View Full Code Here

        EventConverter converter = null;
        PortalService service = null;
        try {
            service = (PortalService)this.manager.lookup(PortalService.ROLE);
            converter = (EventConverter) this.manager.lookup(EventConverter.ROLE);
            Publisher publisher = this.getPublisher();

            converter.start();
           
            // Invoke aspects
            context.setEventPublisher( publisher );
View Full Code Here

        EventConverter converter = null;
        PortalService service = null;
        try {
            service = (PortalService)this.manager.lookup(PortalService.ROLE);
            converter = (EventConverter) this.manager.lookup(EventConverter.ROLE);
            Publisher publisher = this.getPublisher();

            converter.start();

            // Invoke aspects
            context.setEventPublisher( publisher );
View Full Code Here

  public void process(EventAspectContext context, PortalService service) {
        final String requestParameterName = FullScreenCopletEvent.REQUEST_PARAMETER_NAME;
        final Request request = ObjectModelHelper.getRequest( context.getObjectModel() );
        String[] values = request.getParameterValues( requestParameterName );
        if ( values != null ) {
            final Publisher publisher = context.getEventPublisher();
            for(int i=0; i<values.length; i++) {
                final String current = values[i];
                Event e = context.getEventConverter().decode(current);
                if ( null != e ) {
                    publisher.publish(e);
                    FullScreenCopletEvent fsce = (FullScreenCopletEvent)e;
                    if ( fsce.getLayout() != null) {
                        service.getComponentManager().getLinkService().addEventToLink( e );
                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.event.Publisher

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.