Examples of PSMLDocument


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

        printDivider();
        print("Description: No skin set in PSML ");
        print("RESULT: All portlets use the system default skin.");
        print("Checking test case 1...");
        File file = createTestProfile(prof1);
        PSMLDocument doc = getDocumentFromPath(file.getPath());
        Portlets portlets = doc.getPortlets();
        print("Portlets loaded as: " + portlets);

        // checkSkinPresence(portlets, null);

        print("Using the PortalToolkit.  All Portlets and PsmlEntries (individual portlets) ");
        print("should now be using the system default skin, " + this.defaultSkin);

        PortletSet pSet = PortalToolkit.getSet(portlets);
        assertNotNull(pSet);

        // Checking if we are at the root
        isRoot(pSet);

        checkPortletSkinValues(pSet, new HashMap(), doc);

        print("Saving test document...");
        saveDocument(doc);
        printOk();
        print("Re-run check to make sure that the default setting did not get written...");
        PSMLDocument doc2 = getDocumentFromPath(file.getPath());
        Portlets portlets2 = doc.getPortlets();
        PortletSet pSet2 = PortalToolkit.getSet(portlets2);

        checkPortletSkinValues(pSet2, new HashMap(), doc2);
View Full Code Here

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

        printDivider();
        print("Description: Skin set at root level, skin set in any children.");
        print("RESULT: All portlets use the root level skin");
        print("Checking test case 2...");
        File file = createTestProfile(prof2);
        PSMLDocument doc = getDocumentFromPath(file.getPath());
        Portlets portlets = doc.getPortlets();
        print("Portlets loaded as: " + portlets);

        print("Save and re-open document as if it were being loaded for the first time...");
        saveDocument(doc);
        // re-load everything...
        doc = null;
        doc = getDocumentFromPath(file.getPath());
        portlets = doc.getPortlets();

        print("Using the PortalToolkit.  All Portlets and PsmlEntries (individual portlets) ");

        PortletSet pSet = PortalToolkit.getSet(portlets);
        assertNotNull(pSet);
View Full Code Here

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

        print("RESULT: Un-assigned portlets get the top skin.  Assigned portlets get there assigned skin. ");
        print("Assigned PortletSets use assigned skin and so do their children.");
        print("");
        print("Checking test case 3...");
        File file = createTestProfile(prof3);
        PSMLDocument doc = getDocumentFromPath(file.getPath());
        Portlets portlets = doc.getPortlets();
        print("Portlets loaded as: " + portlets);

        print("Save and re-open document as if it were being loaded for the first time...");
        saveDocument(doc);
        // re-load everything...
        doc = null;
        doc = getDocumentFromPath(file.getPath());
        portlets = doc.getPortlets();

        print("Using the PortalToolkit.  All Portlets and PsmlEntries (individual portlets) ");

        PortletSet pSet = PortalToolkit.getSet(portlets);
        assertNotNull(pSet);
View Full Code Here

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

        print("RESULT: Un-assigned portlets use the system default skin.  Assigned portlets get there assigned skin. ");
        print("Assigned PortletSets use assigned skin and so do their children.");
        print("");
        print("Checking test case 4...");
        File file = createTestProfile(prof4);
        PSMLDocument doc = getDocumentFromPath(file.getPath());
        Portlets portlets = doc.getPortlets();
        print("Portlets loaded as: " + portlets);


        print("Save and re-open document as if it were being loaded for the first time...");
        saveDocument(doc);
        // re-load everything...
        doc = null;
        doc = getDocumentFromPath(file.getPath());
        portlets = doc.getPortlets();

        print("Using the PortalToolkit.  All Portlets and PsmlEntries (individual portlets) ");

        PortletSet pSet = PortalToolkit.getSet(portlets);
        assertNotNull(pSet);
View Full Code Here

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

        print("RESULT: Only the root is assigned the selected skin");

        print("");
        print("Checking test case 5...");
        File file = createTestProfile(prof1);
        PSMLDocument doc = getDocumentFromPath(file.getPath());
        Portlets portlets = doc.getPortlets();
        print("Portlets loaded as: " + portlets);

        print("Directly setting the rootSet to a \"grey\"...");
        Skin rootSkin = new PsmlSkin();
        rootSkin.setName("grey");
        portlets.setSkin(rootSkin);
        print("Save and re-open document as if it were being loaded for the first time...");
        saveDocument(doc);
        // re-load everything...
        doc = null;
        doc = getDocumentFromPath(file.getPath());
        portlets = doc.getPortlets();

        print("Using the PortalToolkit.  All Portlets and PsmlEntries (individual portlets) ");

        PortletSet pSet = PortalToolkit.getSet(portlets);
        assertNotNull(pSet);
View Full Code Here

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

    /**
     * @see PortalPersistenceService#getInstances(Portlet, Profile)
     */
    public List getInstances( Profile profile) throws PortletException
    {
        PSMLDocument doc = profile.getDocument();
        Portlets portlets =  doc.getPortlets();
        ArrayList pList = new ArrayList();
      
       buildAllEntries(portlets, pList, profile);
       
        return pList;
View Full Code Here

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

                    || Profiler.DEFAULT_PROFILE.equals(name)
                    || "".equals(name));
                else
                    profile.setName(name);

                PSMLDocument doc = profile.getDocument();
                if (null != doc)
                {
                    result =
                        PortalToolkit.getSet(doc.getPortlets()).getContent(
                            rundata);
                }
            }
            catch (Exception e)
            {
View Full Code Here

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

                    System.out.println("profile is null");
                    profile = Profiler.getProfile(rundata);
                    rundata.setProfile(profile);
                }

                PSMLDocument doc = profile.getDocument();
                if (null != doc)
                {
                    Entry entry = doc.getEntryById(id);
                    if (null == entry)
                    {
                        // FIXME: need to write this function
                        // Portlets ps = doc.getPortletsById(id);
                        result =
View Full Code Here

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

     */
    public Entry getEntryFromRequest() throws Exception
    {
        String jsPeid = rundata.getParameters().getString("js_peid");
        Profile profile = Profiler.getProfile(rundata);
        PSMLDocument doc = profile.getDocument();
        return doc.getEntryById(jsPeid);
    }
View Full Code Here

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

        String id = locator.getId();

        try
        {
            Profile profile = Profiler.getProfile(locator);
            PSMLDocument doc = profile.getDocument();

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