Package org.apache.pluto.om.portlet

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


                ((PortletWindowImpl)window).setLayout((CopletLayout)layout);
            }
           
            String title = (String) copletInstanceData.getAttribute("dynamic-title");
            if ( title == null ) {
                final PortletDefinition def = window.getPortletEntity().getPortletDefinition();
                try {
                    title = def.getDisplayName(def.getLanguageSet().getDefaultLocale()).getDisplayName();
                } catch (Exception ignore)  {
                    title = copletInstanceData.getCopletData().getTitle();
                }
            }
            XMLUtils.createElement(contenthandler, "title", title);           
View Full Code Here


                    PortletRegistry registryAccess =
                        (PortletRegistry)Jetspeed.getComponentManager().getComponent(PortletRegistry.class);
                    PortletEntityAccessComponent entityAccess =
                        (PortletEntityAccessComponent)Jetspeed.getComponentManager().getComponent(PortletEntityAccessComponent.class);
                   
                    PortletDefinition portletDef = registryAccess.getPortletDefinitionByUniqueName(registryKey);
                    if (null == portletDef)
                    {
                        log.error("Could not find portlet definition in registry for " + registryKey);
                        continue;
                    }
View Full Code Here

           
            Collection pds = app.getPortletDefinitions();
            Iterator pdsIter = pds.iterator();
            while (pdsIter.hasNext())
            {
                PortletDefinition pdef = (PortletDefinition) pdsIter.next();
                PortletEntry entry = createPortletEntry(app.getName(), pdef);
                               
                Registry.saveEntry(Registry.PORTLET, entry);
                System.out.println("Writing registry: " + entry.getName());
            }
View Full Code Here

           
            Collection pds = pa.getPortletDefinitions();
            Iterator pdsIter = pds.iterator();
            while (pdsIter.hasNext())
            {
                PortletDefinition pdef = (PortletDefinition) pdsIter.next();
                String name = pdef.getName();               
                Registry.removeEntry(Registry.PORTLET, name);               

                // remove PSML refs               
                if (purgeEntityInfo)
                {
View Full Code Here

        }

        MutablePortletApplication pac = registry.getPortletApplication("jetspeed");
        if (pac != null)
        {
            PortletDefinition portlet = pac.getPortletDefinitionByName("VelocityTwoColumns");
            if (portlet != null)
            {
                System.out.println("REGISTRY TEST [READ PORTLET] ENTRY. Name[jetspeed] sucessful!");
            }
            else
View Full Code Here

        return result;
    }
   
    private String mapRoleRefToRole(String roleName)
    {
        PortletDefinition portletDefinition = portletWindow.getPortletEntity().getPortletDefinition();
        SecurityRoleRefSet roleRefSet = portletDefinition.getInitSecurityRoleRefSet();
        SecurityRoleSet roleSet = portletDefinition.getPortletApplicationDefinition().getWebApplicationDefinition()
                .getSecurityRoles();

        Iterator roleRefIter = roleRefSet.iterator();
        while (roleRefIter.hasNext())
        {
View Full Code Here

        if (window == null)
        {
            PortletEntity entity = entityAccess.getPortletEntity(id);
            if (entity == null)
            {
                PortletDefinition portletDef = registryAccess.getPortletDefinitionByUniqueName(registryKey);
                if (null == portletDef)
                {
                    // can't get the portlet either, give up
                    return null;
                }
View Full Code Here

        if (supportsMode == null)
        {
            String pa = getPortletConfig().getInitParameter(PORTLET_APPLICATION_NAME, null);
            String pd = getPortletConfig().getInitParameter(PORTLET_DEFINITION_NAME, null);
            String registryKey = pa + "::" + pd;
            PortletDefinition pdef = registryAccess.getPortletDefinitionByUniqueName(registryKey);
            boolean supports = pdef.getContentTypeSet().supportsPortletMode(mode);
            PortletSessionState.setAttribute(this, rundata, modeType, new Boolean(supports));
            return supports;
        }
        else
        {
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

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.