Package org.apache.cocoon.portal.event

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


  implements EventAspect, ThreadSafe {

    protected void process(EventAspectContext context, Request request, String parameterName) {
        String[] values = request.getParameterValues( parameterName );
        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);
                }
            }
        }
    }
View Full Code Here


     */
    public void process(EventAspectContext context, PortalService service) {
        final Request request = ObjectModelHelper.getRequest(context.getObjectModel());
        String[] values = request.getParameterValues(this.getRequestParameterName());
        if (values != null) {
            final Publisher publisher = context.getEventPublisher();
            for (int i = 0; i < values.length; i++) {
                // first try to make an event out of the value of the parameter
                final String value = values[i];
                Event e = null;
                try {
                    e = context.getEventConverter().decode(value);
                    if (null != e) {
                        publisher.publish(e);
                    }
                } catch (Exception ignore) {
                }
                // the event could not be generated, so try different approach
                if (e == null) {
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

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.