Package org.apache.cocoon.portal.event.impl

Examples of org.apache.cocoon.portal.event.impl.ChangeCopletInstanceAspectDataEvent


            newAttrs.setAttributes(attr);
            newAttrs.removeAttribute("format");

            if ( attr.getValue("href") != null ) {
                final CopletInstanceData cid = this.getCopletInstanceData();
                ChangeCopletInstanceAspectDataEvent event = new ChangeCopletInstanceAspectDataEvent(cid, null, null);

                String value = linkService.getLinkURI(event);
                if (value.indexOf('?') == -1) {
                    value = value + '?' + attr.getValue("href");
                } else {
View Full Code Here


        super.setAspectData(owner, aspectName, data);

        // create persistence
        ChangeAspectDataEvent e;
        if ( owner instanceof CopletInstanceData) {
            e = new ChangeCopletInstanceAspectDataEvent((CopletInstanceData)owner, aspectName, data);
        } else {
            e = new ChangeAspectDataEvent( owner, aspectName, data );
        }
        if ( this.requestParameterName != null ) {
            e.setRequestParameterName( this.requestParameterName );
View Full Code Here

            size = (Integer)cid.getAspectData("size");
            if ( size == null ) {
                size = SizingStatus.STATUS_MAXIMIZED;
            }

            ChangeCopletInstanceAspectDataEvent event;   

            if ( size.equals(SizingStatus.STATUS_MAXIMIZED) ) {
                event = new ChangeCopletInstanceAspectDataEvent(cid, "size", SizingStatus.STATUS_MINIMIZED);
                XMLUtils.createElement(handler, "minimize-uri", service.getComponentManager().getLinkService().getLinkURI(event));
            }

            if ( size.equals(SizingStatus.STATUS_MINIMIZED)) {
                event = new ChangeCopletInstanceAspectDataEvent(cid, "size", SizingStatus.STATUS_MAXIMIZED);
                XMLUtils.createElement(handler, "maximize-uri", service.getComponentManager().getLinkService().getLinkURI(event));
            }
           
            if (size.equals(SizingStatus.STATUS_MINIMIZED)) {
                showContent = false;
View Full Code Here

    public void setAspectData(Aspectalizable owner, String aspectName, Object data) {
        this.getMap(owner).put(aspectName, data);
        // create persistence
        ChangeAspectDataEvent e;
        if ( owner instanceof CopletInstanceData) {
            e = new ChangeCopletInstanceAspectDataEvent((CopletInstanceData)owner, aspectName, data);
        } else {
            e = new ChangeAspectDataEvent( owner, aspectName, data );
        }
        if ( this.requestParameterName != null ) {
            e.setRequestParameterName( this.requestParameterName );
View Full Code Here

            size = (Integer)cid.getAspectData("size");
            if ( size == null ) {
                size = SizingStatus.STATUS_MAXIMIZED;
            }

            ChangeCopletInstanceAspectDataEvent event;   

            if ( size.equals(SizingStatus.STATUS_MAXIMIZED) ) {
                event = new ChangeCopletInstanceAspectDataEvent(cid, "size", SizingStatus.STATUS_MINIMIZED);
                XMLUtils.createElement(handler, "minimize-uri", service.getComponentManager().getLinkService().getLinkURI(event));
            }

            if ( size.equals(SizingStatus.STATUS_MINIMIZED)) {
                event = new ChangeCopletInstanceAspectDataEvent(cid, "size", SizingStatus.STATUS_MAXIMIZED);
                XMLUtils.createElement(handler, "maximize-uri", service.getComponentManager().getLinkService().getLinkURI(event));
            }
           
            if (size == SizingStatus.STATUS_MINIMIZED) {
                showContent = false;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
     */
    public void inform(Event e) {
        ChangeCopletInstanceAspectDataEvent event = (ChangeCopletInstanceAspectDataEvent)e;
        PortalService service = null;
        try {
            service = (PortalService)this.manager.lookup(PortalService.ROLE);
            List list = (List)service.getTemporaryAttribute(URICopletAdapter.class.getName());
            if ( list == null ) {
                list = new ArrayList();
            }
            list.add(event.getTarget());
            service.setTemporaryAttribute(URICopletAdapter.class.getName(), list);
        } catch (ComponentException ignore ) {           
        } finally {
            this.manager.release(service);
        }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.event.impl.ChangeCopletInstanceAspectDataEvent

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.