Package org.apache.cocoon.portal.coplet

Examples of org.apache.cocoon.portal.coplet.CopletInstanceData


                    Layout layout,
                    PortalService service,
                    ContentHandler handler)
  throws SAXException {
       
        CopletInstanceData cid = ((CopletLayout)layout).getCopletInstanceData();

        Boolean supportsFullScreen = (Boolean)cid.getCopletData().getAspectData("full-screen");
        if ( supportsFullScreen == null || supportsFullScreen.equals(Boolean.TRUE) ) {
            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));
View Full Code Here


    /* (non-Javadoc)
     * @see org.apache.pluto.services.information.DynamicInformationProvider#getPortletMode(org.apache.pluto.om.window.PortletWindow)
     */
    public PortletMode getPortletMode(PortletWindow portletWindow) {
        final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
        PortletMode pm = (PortletMode) cid.getAttribute("portlet-mode");
        if ( pm == null ) {
            pm = PortletMode.VIEW;
        }
        return pm;
    }
View Full Code Here

        if ( o == null ) {
            throw new ProcessingException("CopletDescription with name " + name + " not found.");
        }
        DefaultCopletDescription copletDescription = (DefaultCopletDescription)o[0];
       
        CopletInstanceData instance = new CopletInstanceData();
       
        String id = null;
        if ( copletDescription.createId() ) {
            // TODO - create unique id
            id = name + '-' + System.currentTimeMillis();
        }
        instance.initialize( name, id );
       
        instance.setDescription( copletDescription );
        instance.setAspectDataHandler((AspectDataHandler)o[2]);
        instance.setCopletData(copletData);
       
        // now lookup the adapter
        final String adapterName = copletData.getCopletBaseData().getCopletAdapterName();
        CopletAdapter adapter = null;
        ServiceSelector adapterSelector = null;
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.pluto.services.information.DynamicInformationProvider#getPreviousPortletMode(org.apache.pluto.om.window.PortletWindow)
     */
    public PortletMode getPreviousPortletMode(PortletWindow portletWindow) {
        final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
        PortletMode pm = (PortletMode) cid.getAttribute("previous-portlet-mode");
        return pm;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.pluto.services.information.DynamicInformationProvider#getWindowState(org.apache.pluto.om.window.PortletWindow)
     */
    public WindowState getWindowState(PortletWindow portletWindow) {
        final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
        WindowState ws = (WindowState) cid.getAttribute("window-state");
        if ( ws == null ) {
            ws = WindowState.NORMAL;
        }
        return ws;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.apache.pluto.services.information.DynamicInformationProvider#getPreviousWindowState(org.apache.pluto.om.window.PortletWindow)
     */
    public WindowState getPreviousWindowState(PortletWindow portletWindow) {
        final CopletInstanceData cid = ((PortletEntityImpl)portletWindow.getPortletEntity()).getCopletInstanceData();
        WindowState ws = (WindowState) cid.getAttribute("previous-window-state");       
        return ws;
    }
View Full Code Here

            final Map context = (Map)objectModel.get(ObjectModelHelper.PARENT_CONTEXT);
           
            String copletId = (String)context.get(Constants.COPLET_ID_KEY);

            CopletInstanceData object = portalService.getComponentManager().getProfileManager().getCopletInstanceData( copletId );
               
            if (object == null) {
                throw new SAXException("Could not find coplet instance data for " + copletId);
            }
               
View Full Code Here

        boolean streamed = false;
        SAXParser parser = null;
        try {
            parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
            if ( this.attributeName != null ) {
                CopletInstanceData cid = this.getCopletInstanceData();
                byte[] content = (byte[])cid.getAttribute(this.attributeName);
                if ( content == null ) {
                    this.xmlConsumer.startDocument();
                    XMLUtils.createElement(this.xmlConsumer, "p");
                    this.xmlConsumer.endDocument();
                    return;
View Full Code Here

        if ( this.generatedURL == null ) {
            final PortletWindowImpl impl = (PortletWindowImpl)this.portletWindow;
            final CopletLayout cl = impl.getLayout();
            Event sizingEvent = null;
            if ( cl != null ) {
                final CopletInstanceData cid = cl.getCopletInstanceData();
                WindowState oldState = (WindowState)cid.getAttribute("window-state");
                if ( oldState == null ) {
                    oldState = WindowState.NORMAL;
                }
                if ( this.state != null && !this.state.equals(oldState) ) {
                    if ( oldState.equals(WindowState.MAXIMIZED) ) {
View Full Code Here

    public PortletEntity add(PortletApplicationEntity appEntity, String definitionId) {
        // FIXME
        PortletDefinitionRegistry registry = null;
        PortletDefinition pd = registry.getPortletDefinition(ObjectIDImpl.createFromString(definitionId));
        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        CopletInstanceData coplet = null;
        PortletEntity portletEntity = new PortletEntityImpl(pae, coplet, pd);
        this.portlets.put(portletEntity.getId(), portletEntity);
       
        return portletEntity;
    }
View Full Code Here

TOP

Related Classes of org.apache.cocoon.portal.coplet.CopletInstanceData

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.