Package org.apache.jetspeed.om.profile

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


            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

        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

                            while(i.hasNext())
                            {
                                String locator = (String)i.next();

                                // do refresh for the locator
                                PSMLDocument doc =
                                            refresh(stringToLocator(locator));

                                // over write the existing document in cache
                                psmlCache.put(locator, doc);
                            }
View Full Code Here

            ProfileLocator locator = Profiler.createLocator();
            locator.createFromPath(path);
            Profile profile = Profiler.getProfile(locator);
            if (profile != null)
            {
                PSMLDocument doc = profile.getDocument();
                if (doc != null)
                {
                    Portlets rootSet = doc.getPortlets();
                    /*
                    There is no way to do a check on a Portlets element, only a Entry element.
                    This can easily be added, but Im just under a release right now and it
                    could be perceived as too destabilizing -- david
                   
View Full Code Here

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

            //
            // create a new profile
            //
            if(baseProfile != null)
            {
                PSMLDocument doc = baseProfile.getDocument();
                if(doc != null)
                {
                    Portlets portlets = doc.getPortlets();
                    profile = Profiler.createProfile(locator, portlets);
                }
                else
                {
                    profile = Profiler.createProfile(locator, null);
View Full Code Here

            //
            // Export profile
            //
            if(baseProfile != null)
            {
                PSMLDocument doc = baseProfile.getDocument();
                if(doc != null)
                {
                    if (!this.saveDocument(copyTo,doc))
                        throw new Exception("Failed to save PSML document");
                    rundata.addMessage("Profile [" + copyFrom + "] has been saved to disk in [" + copyTo + "]<br>");
View Full Code Here

            //
            Iterator i = Profiler.query(new QueryLocator(QueryLocator.QUERY_ALL));
            while (i.hasNext())
            {
                Profile profile = (Profile) i.next();
                PSMLDocument doc = profile.getDocument();
                if(doc != null)
                {
                    // Build the fully qualified file name
                    StringBuffer copyToFile = new StringBuffer(copyTo);
                    copyToFile.append(File.separator);
View Full Code Here

            }

            //
            // Retrieve the document to import
            //
            PSMLDocument doc = this.loadDocument(copyFrom);

            //
            // create a new profile
            //
            if(doc != null)
            {
                Portlets portlets = doc.getPortlets();
                //
                // Profiler does not provide update capability - must remove before replacing
                //
                if (PsmlManager.getDocument(locator) != null)
                {
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.