Package org.apache.roller.pojos

Examples of org.apache.roller.pojos.FolderData


            WeblogTemplate page = (WeblogTemplate) iter.next();
            this.strategy.remove(page);
        }
       
        // remove folders (including bookmarks)
        FolderData rootFolder = bmgr.getRootFolder(website);
        if (null != rootFolder) {
            this.strategy.remove(rootFolder);
           
            // Still cannot get all Bookmarks cleared!
            Iterator allFolders = bmgr.getAllFolders(website).iterator();
            while (allFolders.hasNext()) {
                FolderData aFolder = (FolderData)allFolders.next();
                bmgr.removeFolderContents(aFolder);
                this.strategy.remove(aFolder);
            }
        }
       
View Full Code Here


        newWeblog.setDefaultCategory(rootCat);
       
        this.strategy.store(newWeblog);
       
        // add default bookmarks
        FolderData root = new FolderData(
                null, "root", "root", newWeblog);
        this.strategy.store(root);
       
        Integer zero = new Integer(0);
        String blogroll = RollerConfig.getProperty("newuser.blogroll");
View Full Code Here

            // Build JDOC document OPML string
            SAXBuilder builder = new SAXBuilder();
            StringReader reader = new StringReader( opml );
            Document doc = builder.build( reader );
           
            FolderData newFolder = getFolder(website, folderName);
            if (newFolder == null) {
                newFolder = new FolderData(
                        getRootFolder(website), folderName, folderName, website);
                this.strategy.store(newFolder);
            }
           
            // Iterate through children of OPML body, importing each
View Full Code Here

                // TODO: maybe this should be saving the folder?
                this.strategy.store(bd);
            }
        } else {
            // Store a folder
            FolderData fd = new FolderData(
                    parent,
                    title,
                    desc,
                    parent.getWebsite());
            this.strategy.store(fd);
View Full Code Here

        } else {
            folders = folder.getFolders().iterator();
        }
       
        while (folders.hasNext()) {
            FolderData possibleMatch = (FolderData)folders.next();
            if (possibleMatch.getName().equals(pathArray[0])) {
                if (pathArray.length == 1) {
                    return possibleMatch;
                } else {
                    String[] subpath = new String[pathArray.length - 1];
                    System.arraycopy(pathArray, 1, subpath, 0, subpath.length);
View Full Code Here

     * @see org.apache.roller.model.BookmarkManager#isDuplicateFolderName(org.apache.roller.pojos.FolderData)
     */
    public boolean isDuplicateFolderName(FolderData folder) throws RollerException {
        // ensure that no sibling folders share the same name
        boolean isNewFolder = (folder.getId() == null);
        FolderData parent =
                isNewFolder ? (FolderData)folder.getNewParent() : folder.getParent();
       
        if (null != parent) {
            List sameNames;
            try {
View Full Code Here

        RollerRequest rreq = RollerRequest.getRollerRequest(request);
        RollerSession rses = RollerSession.getRollerSession(request);
        BookmarkManager bmgr = RollerFactory.getRoller().getBookmarkManager();
        WebsiteData website = null;
               
        FolderData fd = null;
        if (null != form.getId() && !form.getId().trim().equals(""))
        {
            fd = bmgr.getFolder(form.getId());
            website = fd.getWebsite();
        }
        else
        {
            fd = new FolderData();
            String parentId = request.getParameter(RequestConstants.PARENT_ID);
            FolderData parent = bmgr.getFolder(parentId);
            website = parent.getWebsite();
            fd.setParent(parent);
            fd.setWebsite(website);
        }
       
        if (fd.getWebsite().hasUserPermissions(
View Full Code Here

       
        WebsiteData weblog = null;
        WeblogEntryData entry = null;
        WeblogCategoryData category = null;
        Template page = null;
        FolderData folder = null// don't even know how this is involved :/
        Date date = null;
        boolean isDay = false;
        boolean isMonth = false;
        String locale = null;
       
View Full Code Here

            if(cat != null) {
                weblog = cat.getWebsite();
            }
        } else if (request.getParameter(RequestConstants.FOLDER_ID) != null) {
            String folderId = request.getParameter(RequestConstants.FOLDER_ID);
            FolderData folder = roller.getBookmarkManager().getFolder(folderId);
            if(folder != null) {
                weblog = folder.getWebsite();
            }
        } else if (request.getSession().getAttribute(RequestConstants.WEBLOG_SESSION_STASH) != null) {
            String handle = (String)request.getSession().getAttribute(RequestConstants.WEBLOG_SESSION_STASH);
            weblog = roller.getUserManager().getWebsiteByHandle(handle);
        } else {
View Full Code Here

   
    //------------------------------------------------------------------------
   
    public FolderDataWrapper getFolderByPath(String path) {
        try {
            FolderData folder = mBookmarkMgr.getFolderByPath(
                    mWebsite, null, path);
           
            if(folder != null)
                return FolderDataWrapper.wrap(folder);
        } catch (RollerException e) {
View Full Code Here

TOP

Related Classes of org.apache.roller.pojos.FolderData

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.