Package org.apache.jetspeed.om.page

Examples of org.apache.jetspeed.om.page.Page


    {       
        if (pageName == null)
        {
            pageName = "/";
        }
        Page page = pageManager.getPage(pageName);
        return page;
    }       
View Full Code Here


     * @param window
     * @param request
     */
    protected void initWindow(PortletWindow window, RequestContext request)
    {
        Page page = request.getPage();
        Fragment fragment = page.getFragmentById(window.getId().toString());
        ((MutablePortletEntity)window.getPortletEntity()).setFragment(fragment);
    }
View Full Code Here

                    return success;
                }
                status = "refresh";
            }          
           
            Page page = requestContext.getPage();
            String layoutId = getActionParameter(requestContext, LAYOUTID);
            Fragment fragment = pageManager.newFragment();
            fragment.setType(Fragment.PORTLET);
            fragment.setName(portletId);
            //fragment.setLayoutColumn(iCol);
            //fragment.setLayoutRow(iRow);
           
            Fragment placeInLayoutFragment = null;
            if ( layoutId != null && layoutId.length() > 0 )
            {
                placeInLayoutFragment = page.getFragmentById( layoutId );
                if ( placeInLayoutFragment == null )
                {
                    throw new Exception( "layout id not found: " + layoutId );
                }
            }
            else
            {
                placeInLayoutFragment = page.getRootFragment();
            }

            success = placeFragment( requestContext,
                                     pageManager,
                                     batch,
View Full Code Here

   
    protected void checkForDuplicatePortlet(RequestContext requestContext, Map resultMap, String portletId)
    throws AJAXException
    {
      // Look at each portlet currently on the page
      Page page = requestContext.getPage();
     
      boolean duplicateFound = isDuplicateFragment(page.getRootFragment(), portletId);
     
      // Throw an exception if a duplicate is found
      if(duplicateFound == true) {
        throw new AJAXException(portletId + " is already on the page, duplicates are not allowed");
      }
View Full Code Here

       f.setDefaultDecorator(theme, theme_type);
       pageManager.updateFolder(f);
       Iterator pagesIter = f.getPages().iterator();
       while(pagesIter.hasNext())
       {
           Page pp = (Page) pagesIter.next();
           pp.setDefaultDecorator(theme, theme_type);
           pageManager.updatePage(pp);
       }                      
       Iterator userFoldersIter = pageManager.getFolders(f).iterator();
       while(userFoldersIter.hasNext())
       {
View Full Code Here

        }      
    }

    protected void removeFragment(String pageId, String fragmentId)
    {
        Page page = null;
        try
        {
            page = pageManager.getPage(pageId);
           
        }
        catch (Exception e)
        {
            log.error("failed to remove portlet " + fragmentId + " from page: " + pageId, e);
        }
        removeFragment(page,page.getRootFragment(), fragmentId);           
    }
View Full Code Here

        }
    }
   
    protected void addPortletToPage(String pageId, String portletId)
    {
        Page page = null;
        try
        {
            page = pageManager.getContentPage(pageId);
        }
        catch (Exception e)
        {
            log.error("failed to add portlet " + portletId + " to page: " + pageId, e);
        }
        addPortletToPage(page, page.getRootFragment(), portletId);
    }
View Full Code Here

     * @throws NodeException
     */
    public Page getPage(String name, boolean checkAccess) throws PageNotFoundException, NodeException
    {
        // get page
        Page page = (Page) getAllNodes().subset(Page.DOCUMENT_TYPE).get(name);
        if (page == null)
        {
            throw new PageNotFoundException("Jetspeed PSML page not found: " + name);
        }

        // check access
        if (checkAccess)
        {
            page.checkAccess(JetspeedActions.VIEW);
        }
        return page;
    }
View Full Code Here

                    }
                    fileType = fileExt(fileName);
                    if (fileType != null && !fileType.equals("")&& fileName != null && !fileName.equals("") && destPath != null && !destPath.equals("")) {
                        Folder folder = castorPageManager.getFolder(request.getUserPrincipal().toString());
                        if(fileType.equalsIgnoreCase("psml")){
                            Page source = folder.getPage(fileName);
                            Page page = pageManager.copyPage(source, destPath + "/" + fileName);
                            pageManager.updatePage(page);
                            success = true;
                        }else if(fileType.equalsIgnoreCase("link")){
                            Link source = folder.getLink(fileName);
                            Link page = pageManager.copyLink(source, destPath + "/" + fileName);
View Full Code Here

        dstFolder = pageManager.copyFolder(srcFolder,destination);
        pageManager.updateFolder(dstFolder);
        String newPath="";
        Iterator pages = srcFolder.getPages().iterator();
        while (pages.hasNext()) {
            Page srcPage = (Page) pages.next();
            Page dstPage = lookupPage(srcPage.getPath());
            newPath = destination+getRealPath(srcPage.getPath());
            dstPage = pageManager.copyPage(srcPage,newPath);
            pageManager.updatePage(dstPage);
        }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.om.page.Page

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.