Package org.apache.cocoon.portal.layout

Examples of org.apache.cocoon.portal.layout.Layout


                    ContentHandler handler)
  throws SAXException {
       
        CopletInstanceData cid = ((CopletLayout)layout).getCopletInstanceData();

        Layout fullScreenLayout = (Layout)service.getTemporaryAttribute("DEFAULT_LAYOUT");
        if ( fullScreenLayout != null && fullScreenLayout.getId().equals( layout.getId() )) {
            FullScreenCopletEvent event = new FullScreenCopletEvent( cid, null );
            XMLUtils.createElement(handler, "fullscreen-uri", service.getLinkService().getRefreshLinkURI());
        } else {
            FullScreenCopletEvent event = new FullScreenCopletEvent( cid, layout );
            XMLUtils.createElement(handler, "fullscreen-uri", service.getLinkService().getLinkURI(event));
View Full Code Here


            }
           
            final String layoutAttributeKey = "Layout:" + layoutKey;
            final String layoutObjectsAttributeKey = "Layout-Map:" + layoutKey;
           
            Layout layout = (Layout)service.getAttribute(layoutAttributeKey);
            if (layout == null) {
                layout = this.loadProfile(layoutKey, service, copletFactory, factory, adapterSelector);
            }
           
            if ( layoutID != null ) {
View Full Code Here

        parameters.put(ProfileLS.PARAMETER_PROFILETYPE,
                       ProfileLS.PROFILETYPE_LAYOUT);       
        parameters.put(ProfileLS.PARAMETER_OBJECTMAP,
                       profile.getCopletInstanceDatas());
        try {
            Layout l = (Layout)loader.loadProfile(key, parameters);
            this.prepareObject(l, service);
            profile.setRootLayout(l);

            return true;
        } catch (Exception e) {
View Full Code Here

        service.setAttribute("CopletInstanceData:" + layoutKey, copletInstanceDataManager);
               
        // load layout
        parameters.put("profiletype", "layout");
        parameters.put("objectmap", copletInstanceDataManager.getCopletInstanceData());
        Layout layout = (Layout)this.getOrCreateProfile(layoutKey, parameters, service, layoutFactory);
        service.setAttribute("Layout:" + layoutKey, layout);
               
        // now invoke login on each instance
        Iterator iter =  copletInstanceDataManager.getCopletInstanceData().values().iterator();
        while ( iter.hasNext() ) {
View Full Code Here

            parameters.put("config", state.getApplicationConfiguration().getConfiguration("portal").getChild("profiles"));
            parameters.put("handler", handler);
            parameters.put("profiletype", "layout");

            final Map key = this.buildKey(service, parameters, layoutKey, false);
            final Layout layout = (Layout)service.getAttribute("Layout:" + layoutKey);
            adapter.saveProfile(key, parameters, layout);
           
        } catch (Exception e) {
            // TODO
            throw new CascadingRuntimeException("Exception during save profile", e);
View Full Code Here

            int valid = SourceValidity.INVALID;
            SourceValidity sourceValidity = null;
            if (objects != null) {
                sourceValidity = (SourceValidity) objects[1];
                valid = sourceValidity.isValid();
                Layout layout = null;
                if (valid == SourceValidity.VALID)
                    layout = (Layout) ((Map) objects[0]).get(layoutID);
                if (layout != null)
                    return layout;
            }

            CopletInstanceDataManager copletInstanceDataManager = getCopletInstanceDataManager(service);

            Map parameters = new HashMap();
            parameters.put("profiletype", "layout");
            parameters.put("objectmap", copletInstanceDataManager.getCopletInstanceData());

            Map map = new LinkedMap();
            map.put("base", this.profilesPath);
            map.put("portalname", service.getPortalName());
            map.put("profile", "layout");
            map.put("groupKey", layoutKey);

            adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
            SourceValidity newValidity = adapter.getValidity(map, parameters);
            if (valid == SourceValidity.UNKNOWN) {
                if (sourceValidity.isValid(newValidity) == SourceValidity.VALID) {
                    return (Layout) ((Map) objects[0]).get(layoutID);
                }
            }

            // get Layout specified in the map
            Layout layout = (Layout) adapter.loadProfile(map, parameters);
            Map layouts = new HashMap();

            layouts.put(null, layout); //save root with null as key
            cacheLayouts(layouts, layout);
View Full Code Here

                    ContentHandler handler)
  throws SAXException {
       
        CopletInstanceData cid = ((CopletLayout)layout).getCopletInstanceData();

        final Layout fullScreenLayout = service.getComponentManager().getProfileManager().getEntryLayout();
        if ( fullScreenLayout != null && fullScreenLayout.equals( layout )) {
            FullScreenCopletEvent event = new FullScreenCopletEvent( cid, null );
            XMLUtils.createElement(handler, "fullscreen-uri", service.getComponentManager().getLinkService().getLinkURI(event));
        } else {
            FullScreenCopletEvent event = new FullScreenCopletEvent( cid, layout );
            XMLUtils.createElement(handler, "fullscreen-uri", service.getComponentManager().getLinkService().getLinkURI(event));
View Full Code Here

           
            if ( null == layoutKey ) {
                layoutKey = this.getDefaultLayoutKey();
            }
            // FIXME actually this is a hack for full screen
            Layout l = (Layout) service.getTemporaryAttribute("DEFAULT_LAYOUT:" + layoutKey);
            if ( null != l) {
                return l;
            }
           
            final String layoutAttributeKey = "Layout:" + layoutKey;
            final String layoutObjectsAttributeKey = "Layout-Map:" + layoutKey;
           
            Layout layout = (Layout)service.getAttribute(layoutAttributeKey);
            if (layout == null) {
                layout = this.loadProfile(layoutKey, service, copletFactory, factory, adapterSelector);
            }
           
            if ( layoutID != null ) {
View Full Code Here

                    url.clearParameters();
                    url.setWindowState(WindowState.NORMAL);
                    XMLUtils.createElement(contenthandler, "maximize-uri", url.toString(event));
                }

                final Layout fullScreenLayout = service.getComponentManager().getProfileManager().getEntryLayout();
                if ( fullScreenLayout != null && fullScreenLayout.equals( layout )) {
                    event = new FullScreenCopletEvent( copletInstanceData, null );
                    PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
                    url.clearParameters();
                    url.setWindowState(WindowState.NORMAL);
                    XMLUtils.createElement(contenthandler, "fullscreen-uri", url.toString(event));
View Full Code Here

        service.setAttribute("CopletInstanceData:" + layoutKey, copletInstanceDataManager);
               
        // load layout
        parameters.put("profiletype", "layout");
        parameters.put("objectmap", copletInstanceDataManager.getCopletInstanceData());
        Layout layout = (Layout)this.getOrCreateProfile(layoutKey, parameters, service, layoutFactory);
        service.setAttribute("Layout:" + layoutKey, layout);
               
        // now invoke login on each instance
        Iterator iter =  copletInstanceDataManager.getCopletInstanceData().values().iterator();
        while ( iter.hasNext() ) {
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.layout.Layout

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.