Package org.apache.pluto.om.portlet

Examples of org.apache.pluto.om.portlet.PortletDefinition


       
        verifyDemoAppCreated(TEST_PORTLET_APP_NAME, demoApp);
       
        MutablePortletApplication app = portletRegistry.getPortletApplication(TEST_PORTLET_APP_NAME);
       
        PortletDefinition portlet = (PortletDefinition) app.getPortletDefinitionList().iterator().next();
       
        MutablePortletEntity entity = entityAccess.newPortletEntityInstance(portlet);
        entity.setId("testEnity");
       
        entityAccess.storePortletEntity(entity);
View Full Code Here


    public ServletRequestImpl( HttpServletRequest servletRequest, PortletWindow window )
    {
        super(servletRequest);
        nameSpaceMapper = NamespaceMapperAccess.getNamespaceMapper();
        this.portletWindow = window;       
        PortletDefinition portletDef = portletWindow.getPortletEntity().getPortletDefinition();
        if(portletDef != null)
        {
            webAppId = portletDef.getPortletApplicationDefinition().getWebApplicationDefinition().getId();
        }
        else
        {
            // This happens when an entity is referencing a non-existent portlet
            webAppId = window.getId();
View Full Code Here

        SecurityRoleSet roles = webApp.getSecurityRoles();
        Collection portlets = portletApp.getPortletDefinitions();
        Iterator portletIterator = portlets.iterator();
        while (portletIterator.hasNext())
        {
            PortletDefinition portlet = (PortletDefinition) portletIterator.next();
            SecurityRoleRefSet securityRoleRefs = portlet.getInitSecurityRoleRefSet();
            Iterator roleRefsIterator = securityRoleRefs.iterator();
            while (roleRefsIterator.hasNext())
            {
                SecurityRoleRef roleRef = (SecurityRoleRef) roleRefsIterator.next();
                String roleName = roleRef.getRoleLink();
                if (roleName == null || roleName.length() == 0)
                {
                    roleName = roleRef.getRoleName();
                }
                if (roles.get(roleName) == null)
                {
                    String errorMsg = "Undefined security role " + roleName + " referenced from portlet "
                            + portlet.getName();
                    throw new PortletApplicationException(errorMsg);
                }
            }
        }
    }
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) {
              log.warn("Expriation cache \""+value+"\" must be an integer in window "+window+". " +
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) {
        // 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);
       
View Full Code Here

    /* (non-Javadoc)
     * @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

            this.registry.add( portletApp );

            // fill portletsKeyObjectId
            final Iterator portlets = portletApp.getPortletDefinitionList().iterator();
            while (portlets.hasNext()) {
                final PortletDefinition portlet = (PortletDefinition)portlets.next();
                portletsKeyObjectId.put(portlet.getId(), portlet);
               
                if (this.contextName.equals(webModule)) {
                    ((PortletDefinitionImpl)portlet).setLocalPortlet(true);
                }
View Full Code Here

    public PortletDefinition get(ObjectID objectId)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            PortletDefinition portletDefinition = (PortletDefinition)iterator.next();
            if (portletDefinition.getId().equals(objectId)) {
                return portletDefinition;
            }
        }
        return null;
    }
View Full Code Here

        PortletApplicationDefinition portletApplication = (PortletApplicationDefinition)structure.get(0);
        Map servletMap = (Map)structure.get(1);

        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            PortletDefinition portlet = (PortletDefinition)iterator.next();

            ((Support)portlet).preBuild(portletApplication);

            ServletDefinition servlet = null;
            if (servletMap != null) {
                servlet = (ServletDefinition)servletMap.get(portlet.getId().toString());
            }

            ((Support)portlet).postBuild(servlet);

        }
View Full Code Here

    public PortletDefinition get(String objectId)
    {
        Iterator iterator = this.iterator();
        while (iterator.hasNext()) {
            PortletDefinition portletDefinition = (PortletDefinition)iterator.next();
            if (portletDefinition.getId().toString().equals(objectId)) {
                return portletDefinition;
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.portlet.PortletDefinition

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.