Package org.apache.pluto.om.entity

Examples of org.apache.pluto.om.entity.PortletEntity


     * @throws InconsistentWindowStateException
     */
    protected void validateWindow( Fragment fragment, PortletWindow portletWindow ) throws FailedToRetrievePortletWindow
    {
        // make sure the window has the most up-to-date portlet entity
        PortletEntity portletEntity = entityAccessor.getPortletEntityForFragment(fragment);
        if(portletEntity != null)
        {
            ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
        }
        else
View Full Code Here


            if (portletWindow == null)
            {
                throw new FailedToRetrievePortletWindow("Portlet Window creation failed for fragment: "
                        + fragment.getId() + ", " + fragment.getName());
            }
            PortletEntity portletEntity = portletWindow.getPortletEntity();

            return portletWindow;

    }
View Full Code Here

       
        //Make sure the EXPIRATION_CACHE property is set to whatever the current
        //cache timeout for the portlet is. This is not a required property
        final String[] exprTime = (String[])properties.get(RenderResponse.EXPIRATION_CACHE);
        if (exprTime == null) {
            final PortletEntity pe = window.getPortletEntity();
            final PortletDefinition pd = pe.getPortletDefinition();
            String value = pd.getExpirationCache();
            try {
                Integer.parseInt(value);
            }
            catch (NumberFormatException e) {
View Full Code Here

        // 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

     * @see org.apache.pluto.om.entity.PortletEntityListCtrl#add(org.apache.pluto.om.entity.PortletApplicationEntity, java.lang.String)
     */
    public PortletEntity add(PortletApplicationEntity appEntity, String definitionId,
                             CopletInstanceData coplet, PortletDefinitionRegistry registry) {
        PortletDefinition pd = registry.getPortletDefinition(ObjectIDImpl.createFromString(definitionId));
        PortletEntity portletEntity = new PortletEntityImpl(appEntity, coplet, pd);
        this.portlets.put(portletEntity.getId(), portletEntity);
       
        return portletEntity;
    }
View Full Code Here

        PortletDefinitionRegistry registry = (PortletDefinitionRegistry) environment.getContainerService(PortletDefinitionRegistry.class);
       
        final String portletEntityId = (String) getConfiguration(coplet, "portlet");  
       
        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);
       
        if ( portletEntity.getPortletDefinition() != null ) {
            // create the window
            PortletWindow portletWindow = new PortletWindowImpl(portletEntityId);               
            ((PortletWindowCtrl)portletWindow).setId(coplet.getId());
            ((PortletWindowCtrl)portletWindow).setPortletEntity(portletEntity);
            PortletWindowList windowList = portletEntity.getPortletWindowList();       
            ((PortletWindowListCtrl)windowList).add(portletWindow);   
            coplet.setAttribute("window", portletWindow);
           
            // load the portlet
            final Map objectModel = ContextHelper.getObjectModel(this.context);
View Full Code Here

                    if (null == portletDef)
                    {
                        log.error("Could not find portlet definition in registry for " + registryKey);
                        continue;
                    }
                    PortletEntity entity = entityAccess.newPortletEntityInstance(portletDef);
                    try
                    {
                        entityAccess.storePortletEntity(entity);                   
                        param = new PsmlParameter();
                        param.setName(J2_ENTITY);
                        param.setValue(entity.getId().toString());
                        entry.addParameter(param);
                        count++;                       
                    }
                    catch (Exception e)
                    {
View Full Code Here

    public PortletWindow getPortletWindow(String id, String registryKey)
    {
        PortletWindow window = windowAccessor.getPortletWindow(id);
        if (window == null)
        {
            PortletEntity entity = entityAccess.getPortletEntity(id);
            if (entity == null)
            {
                PortletDefinition portletDef = registryAccess.getPortletDefinitionByUniqueName(registryKey);
                if (null == portletDef)
                {
View Full Code Here

        PortletDefinitionRegistry registry = (PortletDefinitionRegistry) environment.getContainerService(PortletDefinitionRegistry.class);
       
        final String portletEntityId = (String) getConfiguration(coplet, "portlet");  
       
        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);
       
        if ( portletEntity.getPortletDefinition() != null ) {
            // create the window
            PortletWindow portletWindow = new PortletWindowImpl(portletEntityId);               
            ((PortletWindowCtrl)portletWindow).setId(coplet.getId());
            ((PortletWindowCtrl)portletWindow).setPortletEntity(portletEntity);
            PortletWindowList windowList = portletEntity.getPortletWindowList();       
            ((PortletWindowListCtrl)windowList).add(portletWindow);   
            coplet.setAttribute("window", portletWindow);
           
            // load the portlet
            final Map objectModel = ContextHelper.getObjectModel(this.context);
View Full Code Here

        try {
            PortletContainerServices.prepare(uniqueContainerName);
           
            final PortletWindowImpl portletWindow = (PortletWindowImpl)cd.getPortletWindow();
            final PortletEntity portletEntity = portletWindow.getPortletEntity();
            final PortletDefinition portletDef = portletEntity.getPortletDefinition();
            final HttpServletRequest baseRequest = pcs.getHttpServletRequest();

            HttpServletRequest wrappedRequest = new ServletRequestImpl(baseRequest, sd.getPerson(), portletDef.getInitSecurityRoleRefSet());
           
            //Wrap the request to scope attributes to this portlet instance
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.entity.PortletEntity

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.