Examples of Portlets


Examples of org.apache.jetspeed.om.profile.Portlets

        {
            return portlets;
        }

        // we need to recurse in the children
        Portlets result = null;
       
        for (Iterator it2 = portlets.getPortletsIterator(); it2.hasNext(); )
        {
            Portlets p = (Portlets) it2.next();
            count++;
            result = getPortlets(p, position, count);

            if (result != null) break;
        }
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

            }
        }

        for (Iterator it2 = portlets.getPortletsIterator(); it2.hasNext(); )
        {
            Portlets p = (Portlets) it2.next();

            if (removeEntryById(p, entryId) == true)
                return true;
        }
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

            if (portlet != null)
                id = portlet.getID();
        }
        else
        {
           Portlets entry = data.getProfile().getDocument().getPortlets(panel);
           if (entry != null)
               id = entry.getId();
         }
        return addPathInfo(JetspeedResources.PATH_PANEID_KEY, id);
    }
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

            if (doc == null)
            {
                return null;
            }
            Portlets portlets = doc.getPortlets();
            PortletSet ps = PortalToolkit.getSet(portlets);
            return ps.getContent(rundata);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

    // Andreas Kempf, Siemens ICM S CP PE, Munich
    // ---------------------------------------------------------------------
    public static List getPortletList (RunData rundata)
    {
      Profile profile = ((JetspeedRunData)rundata).getCustomizedProfile();
      Portlets allPortlets = profile.getDocument().getPortletsById(((PortletSet)((JetspeedRunData)rundata).getCustomized()).getID());

     
      List installed = new ArrayList ();
      Entry iPortlet;


      if (allPortlets != null)
      {
        for (int ii = 0; ii < allPortlets.getEntryCount(); ii++)
        {
          iPortlet = (Entry) allPortlets.getEntry (ii);
          installed.add (iPortlet);
        }
      }
     
      return installed;
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

   
    public PSMLDocument getDocumentFromPath(String psmlFile)
    {
        print("Loading portlets from PSML file "+psmlFile);
     
        Portlets rootset = null;
           
        PSMLDocument doc = PsmlManager.getDocument(psmlFile);       
        rootset = doc.getPortlets();
       
         return doc;
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

        Mapping mapping = null;
        String mapFile = getProfileMappingFileName();
        print("Locating PSML file "+mapFile+"...");
        File map = new File(mapFile);
        print("PSML file exists????: "+map.exists());
        Portlets rootset = null;
        FileReader reader = null;
        if (map.exists() && map.isFile() && map.canRead())
        {
               
                try
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

     *
     * @throws Exception
     */
    public void testCreateTestPSML() throws Exception
    {
        Portlets rootPortletSet = null;
        ProfileLocator currentLocator = null;
        ProfileLocator newLocator = null;
        PsmlController controller = null;
        PsmlPortlets portlets = null;
        PsmlSkin skin = null;

        // Create the RunData object to be used during testing.
        rundata = RunDataFactory.getRunData( request, response, config );
        assertNotNull( "Got rundata", rundata);

        TurbineTestUtilities.setupRunData(rundata);
        // Verify we have a profile
        Profile profile = Profiler.getProfile(rundata);
        assertNotNull( "Got profile from Profiler", profile);

        // Verify the profile location information in the profile
        if (profile instanceof ProfileLocator)
        {
            currentLocator = (ProfileLocator) profile;
        }

        newLocator = Profiler.createLocator();
        newLocator.setGroupByName(TEST_GROUP);
        newLocator.setMediaType(currentLocator.getMediaType());
        newLocator.setName(TEST_SECURITY_PAGE);

        // Create portlet set
        portlets = new PsmlPortlets();
        controller = new PsmlController();
        controller.setName("RowController");
        portlets.setController(controller);
        skin = new PsmlSkin();
        skin.setName("orange-red");
        portlets.setSkin(skin);
        rootPortletSet = portlets;

        portlets = new PsmlPortlets();
        // Add entries
        portlets.addEntry( createEntry(ALL_PORTLET, "ST_01.all"));
        portlets.addEntry( createEntry(USER_PORTLET, "ST_01.user"));
        portlets.addEntry( createEntry(ADMIN_PORTLET, "ST_01.admin"));
        rootPortletSet.addPortlets(portlets);

        Profile newProfile = Profiler.createProfile(newLocator, rootPortletSet);
        PSMLDocument doc = newProfile.getDocument();
        System.out.println("doc = " + doc.getName());

View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

        String columnClasses = controller.getConfig().getInitParameter("col_classes");
        context.put("col_classes", getCellClasses(columnClasses));

        columns = (List[]) customizationState.getAttribute("customize-columns");
        PortletSet customizedSet = (PortletSet) jdata.getCustomized();
        Portlets set = jdata.getCustomizedProfile()
                            .getDocument()
                            .getPortletsById(customizedSet.getID());

        if ( logger.isDebugEnabled() ) {
            logger.debug("MultiCol: columns " + columns + " set " + set);
        }

        if ((columns != null) && (columns.length == colNum))
        {
            int eCount = 0;
            for (int i = 0; i < columns.length; i++)
            {
                eCount += columns[i].size();
            }

            if ( logger.isDebugEnabled() ) {
                logger.debug("MultiCol: eCount " + eCount + " setCount" + set.getEntryCount() + set.getPortletsCount());
            }
            if (eCount != set.getEntryCount() + set.getPortletsCount())
            {
                if ( logger.isDebugEnabled() ) {
                    logger.debug("MultiCol: rebuilding columns ");
                }
                columns = buildColumns(set, colNum);
View Full Code Here

Examples of org.apache.jetspeed.om.profile.Portlets

            try
            {
                IdentityElement identityElement = (IdentityElement) columns[col].get(row);
                columns[col].remove(row);

                Portlets portlets = jdata.getCustomizedProfile()
                                          .getDocument()
                                          .getPortletsById(customizedSet.getID());

                if (portlets != null)
                {
                    if (identityElement instanceof Entry)
                    {
                        for (int i = 0; i < portlets.getEntryCount(); i++)
                        {
                            if (portlets.getEntry(i) == identityElement)
                            {
                                portlets.removeEntry(i);
                            }
                        }
                    }
                    else if (identityElement instanceof Reference)
                    {
                        for (int i = 0; i < portlets.getReferenceCount(); i++)
                        {
                            if (portlets.getReference(i) == identityElement)
                            {
                                customizationState.setAttribute(REFERENCES_REMOVED, "true");
                                portlets.removeReference(i);
                            }
                        }
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.