Examples of PSMLDocument


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();
            //PortletContainer.aggregate(portlets);
            return new JetspeedClearElement("XXX Under Construction :)");
        }
        catch (Exception e)
        {
View Full Code Here

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

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

            assertTrue( "profile does not implement ProfileLocator", false);
        }
       

        // Verify we have a Document
        PSMLDocument psmlDoc = profile.getDocument();
        assertNotNull( "Got psmlDocument", psmlDoc);

        System.out.println("DocumentName = " + profile.getDocument().getName());

        // Get and populate the context
View Full Code Here

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

        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());

        // this only works with the default configuration (Castor/Filebased)
        File file = new File(doc.getName());
        assertTrue(file.exists());
        //file.delete();

        TurbineTestUtilities.generatePage(rundata);
        TurbineTestUtilities.outputPage(rundata);
View Full Code Here

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

            profile.setName(resource.toString());

            // LANGUAGE
            getLanguageSettings(profile, rundata);

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

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

     * @param locator The locator containing criteria describing the profile.
     * @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

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

            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

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

        if (logger.isDebugEnabled())
        {
            logger.debug("Profiler: fallback called with: " + locator);
        }

        PSMLDocument doc = PsmlManager.getDocument(locator);
        if (null != doc)
            return doc;

        // remove country
        if (null != locator.getCountry()
View Full Code Here

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

        {
            portlets = new PsmlPortlets();
        }

        Profile profile = createProfile(locator);
        PSMLDocument doc = new BasePSMLDocument(null, portlets);
        profile.setDocument(doc);
        doc = PsmlManager.createDocument(profile);
        profile.setDocument(doc);
        return profile;
    }
View Full Code Here

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

                {
                    locator.setUser(JetspeedSecurity.getUser(from));
                }

                locator.setMediaType(contentType);
                PSMLDocument doc = fallback(locator);

                if (doc != null)
                {
                    PSMLDocument clonedDoc =
                        (PSMLDocument) SerializationUtils.clone(doc);
                    org.apache.jetspeed.util.PortletUtils.regenerateIds(
                        clonedDoc.getPortlets());
                    profile.setDocument(clonedDoc);
                }

                profile.setName(resourceDefault + resourceExt);

            }
            catch (Exception e)
            {
                logger.error("Error creating profile", e);
                throw new ProfileException(e.toString());
            }
        }

        try
        {
            profile.setMediaType(contentType);

            PSMLDocument doc = PsmlManager.createDocument(profile);
            Profile newProfile = (Profile) profile.clone();
            newProfile.setDocument(doc);

            return newProfile;
        }
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.