Package org.apache.jetspeed.om.profile

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


        if (portlets == null)
        {
            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


            {
                ProfileLocator locator = createLocator();
                locator.setUser( JetspeedSecurity.getUser(from) );

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

                if (doc != null)
                    profile.setDocument(doc);

                profile.setName( resourceDefault + resourceExt );

            }
            catch (Exception 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

        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

    /**
     * @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

        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

            String message = "PSMLManager: Must specify a locator";
            Log.warn("DatabasePsmlManagerService.getDocument: " + message);
            throw new IllegalArgumentException(message);
        }

        PSMLDocument psmldoc = null;
        String locStr = locatorToString(locator);
        boolean inCache = false;

        if (cachingOn)
        {
View Full Code Here

     * @param page page name for this resource
     * @return PSMLDocument object for given page and portlets
     */
    private PSMLDocument getPSMLDocument(String page, Portlets portlets)
    {
        PSMLDocument psmldoc = new BasePSMLDocument();
        psmldoc.setName(page);
        psmldoc.setPortlets(portlets);
        return psmldoc;
    }
View Full Code Here

        }

        // iterate over the list and invoke getDocument(locator) method
        for (int i = 0; i < locators.size(); i++)
        {
            PSMLDocument psmldoc = getDocument((ProfileLocator)locators.get(i));
            if (psmldoc != null)
            {
                return psmldoc;
            }
        }
View Full Code Here

        Role role = locator.getRole();
        Group group = locator.getGroup();
        String tableName = null;
        List records = null;
        Portlets portlets = null;
        PSMLDocument psmldoc = null;
        String page = null;

        Connection dbCon = getDbConnection();

        try
View Full Code Here

        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

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.