Package org.apache.jetspeed.om.profile

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


        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

        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

        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

            profile.setName( resource.toString() );

            // LANGUAGE
            getLanguageSettings(profile, rundata);

            PSMLDocument doc = fallback( profile );
            if (null != doc)
            {
                profile.setDocument( doc );
                return profile;
            }
View Full Code Here

     * @return a new Profile object
     */
    public Profile getProfile(ProfileLocator locator)
        throws ProfileException
    {
        PSMLDocument doc =  fallback(locator);
        Profile profile = createProfile(locator);
        profile.setDocument(doc);
        return profile;
    }
View Full Code Here

            else if (null != original.getUser())
            {
                locator.setUser(null);
                locators.add( locator.clone() );
            }
            PSMLDocument doc = PsmlManager.getDocument( locators );
            return doc;

        }
        catch (CloneNotSupportedException e)
        {
View Full Code Here

        String id = locator.getId();

        try
        {
            Profile profile = Profiler.getProfile(locator);
            PSMLDocument doc = profile.getDocument();
            if (doc == null)
            {
                return null;
            }
            Portlets portlets = doc.getPortlets();
            return portlets;
        }
        catch (Exception e)
        {
            Log.error(e);
View Full Code Here

                if ((name == null) ||  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)
            {
                Log.warn("JetspeedTool.getPane: problem getting: "
View Full Code Here

                    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 = new  StringElement("not implemented - PortletElement");
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.profile.PSMLDocument

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.