Examples of ChangeAspectDataEvent


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

    protected void publish(Publisher publisher,
                             Layout layout,
                              String[] values) {
        if (layout instanceof LinkLayout) {
            LinkLayout linkLayout = (LinkLayout) layout;
            Event e = new ChangeAspectDataEvent(linkLayout,
                                                "link-layout-key",
                                                values[2]);
            publisher.publish(e);
            e = new ChangeAspectDataEvent(linkLayout,
                                          "link-layout-id",
                                          values[3]);
            publisher.publish(e);
        } else {
            this.getLogger().warn(
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
     */
    public void inform(Event e) {
        final ChangeAspectDataEvent event = (ChangeAspectDataEvent)e;
        final Aspectalizable target = event.getAspectalizable();
        target.setAspectData(event.getAspectName(), event.getData());
    }
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
     */
    public void inform(Event e) {
        final ChangeAspectDataEvent event = (ChangeAspectDataEvent)e;
        final Aspectalizable target = event.getAspectalizable();
        target.setAspectData(event.getAspectName(), event.getData());
    }
View Full Code Here

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

   
    public void setAspectData(Aspectalizable owner, String aspectName, Object data) {
        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 );
        }
        LinkService service = null;
        try {
            service = (LinkService)this.manager.lookup(LinkService.ROLE);
            service.addEventToLink( e );
View Full Code Here

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

                    attributes.addCDATAAttribute("name", String.valueOf(((NamedItem)tab).getName()));
                }
                if (j == selected) {
                    attributes.addCDATAAttribute("selected", "true");
                } else {
                    ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, "tab", new Integer(j));
                    attributes.addCDATAAttribute("parameter", service.getComponentManager().getLinkService().getLinkURI(event));
                }
                XMLUtils.startElement(handler, "named-item", attributes);
                if (j == selected) {
                    this.processLayout(tab.getLayout(), service, handler);
View Full Code Here

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

     */
    private List populate(CompositeLayout layout, Map map, String name, List parentEvents) {
        List lhList = null;
        for (int j = 0; j < layout.getSize(); j++) {
            Item tab = layout.getItem(j);
            ChangeAspectDataEvent event =
                new ChangeAspectDataEvent(layout, this.aspectName, new Integer(j));
            StringBuffer label = new StringBuffer(name);
            if (label.length() > 0) {
                label.append(".");
            }
            label.append((tab instanceof NamedItem) ? ((NamedItem) tab).getName() :
View Full Code Here

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

    }
   
    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 );
        }
        LinkService service = null;
        try {
            service = (LinkService)this.manager.lookup(LinkService.ROLE);
            service.addEventToLink( e );
View Full Code Here

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

    /* (non-Javadoc)
     * @see org.apache.cocoon.portal.event.Subscriber#inform(org.apache.cocoon.portal.event.Event)
     */
    public void inform(Event e) {
        final ChangeAspectDataEvent event = (ChangeAspectDataEvent)e;
        final Aspectalizable target = event.getAspectalizable();
        target.setAspectData(event.getAspectName(), event.getData());
    }
View Full Code Here

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

                        ProfileManager profileManager = null;
                        try {
                            profileManager = (ProfileManager)this.manager.lookup(ProfileManager.ROLE);
                            Layout layout = profileManager.getPortalLayout( id );
                            if ( layout != null ) {
                                e = new ChangeAspectDataEvent(layout, "frame", uri);
                                publisher.publish(e);
                            }
                        } catch (ComponentException ignore) {
                        } finally {
                            this.manager.release( profileManager );
View Full Code Here

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

                    attributes.clear();
                    attributes.addCDATAAttribute("name", String.valueOf(tab.getName()));
                    if (j == selected) {
                        attributes.addCDATAAttribute("selected", "true");
                    } else {
                        ChangeAspectDataEvent event = new ChangeAspectDataEvent(tabLayout, "tab", new Integer(j));
                        attributes.addCDATAAttribute("parameter", portalService.getLinkService().getLinkURI(event));
                    }
                    XMLUtils.startElement(handler, "named-item", attributes);
                    if (j == selected) {
                        this.processLayout(tab.getLayout(), service, handler);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.