Package org.apache.jetspeed.page.document

Examples of org.apache.jetspeed.page.document.NodeException


            }
            catch (Exception e)
            {
                // reset page security in folder
                folderImpl.resetPageSecurity(null, true);
                throw new NodeException("Unable to access page security for folder " + folder.getPath() + ".");
            }
        }
        else
        {
            // cache page security in folder
View Full Code Here


            System.out.println("Adding first page");
            this.updatePage(pages[0]);
            System.out.println("Adding second page");
            this.updatePage(pages[1]);
            System.out.println("About to throw ex");
            throw new NodeException("Its gonna blow captain!");
        }
        for (int ix = 0; ix < pages.length; ix++)
        {
            this.updatePage(pages[ix]);
        }
View Full Code Here

    }
   
    public int addPages(Page[] pages)
    throws NodeException
    {
        throw new NodeException("not impl");
    }
View Full Code Here

        Principal principal = SecurityHelper.getBestPrincipal(subject, UserPrincipal.class);
        if (principal == null)
        {
            String errorMessage = "Could not create user home for null principal";
            log.error(errorMessage);
            throw new NodeException(errorMessage);
        }
        try
        {
            String userName = principal.getName();           
            // get user home
            Folder newUserFolder;
            if (pageManager.userFolderExists(userName))
            {
                newUserFolder = pageManager.getUserFolder(userName);
            }
            else
            {
                newUserFolder = pageManager.newFolder(Folder.USER_FOLDER + userName);
                SecurityConstraints constraints = pageManager.newSecurityConstraints();
                newUserFolder.setSecurityConstraints(constraints);
                newUserFolder.getSecurityConstraints().setOwner(userName);
                pageManager.updateFolder(newUserFolder);               
            }           
            // for each role for a user, deep copy the folder contents for that role
            // into the user's home
            // TODO: this algorithm could actually merge pages on dups
            Iterator roles = SecurityHelper.getPrincipals(subject, RolePrincipal.class).iterator();
            while (roles.hasNext())
            {                           
                RolePrincipal role = (RolePrincipal)roles.next();
                if (pageManager.folderExists(Folder.ROLE_FOLDER + role.getName()))
                {
                    Folder roleFolder = pageManager.getFolder(Folder.ROLE_FOLDER + role.getName());                   
                    deepMergeFolder(pageManager, roleFolder, Folder.USER_FOLDER + newUserFolder.getName(), userName, role.getName());
                }
            }
        }
        catch (Exception e)
        {
            String errorMessage = "createUserHomePagesFromRoles failed: " + e.getMessage();
            log.error(errorMessage, e);
            throw new NodeException(errorMessage, e);
        }
    }
View Full Code Here

        {
            found = false;
        }
        if (found)
        {
            throw new NodeException("Destination already exists");
        }
        Folder dstFolder = pageManager.copyFolder(srcFolder, destinationPath);
        if (owner != null)
        {
            SecurityConstraints constraints = dstFolder.getSecurityConstraints();
View Full Code Here

                notifyUpdatedNode(page);
            }
        }
        catch (FolderNotFoundException fnfe)
        {
            throw new NodeException(fnfe.getMessage());
        }
    }
View Full Code Here

            // notify page manager listeners
            notifyRemovedNode(page);
        }
        catch (FolderNotFoundException fnfe)
        {
            throw new NodeException(fnfe.getMessage());
        }
        catch (DocumentNotFoundException dnfe)
        {
            throw new NodeException(dnfe.getMessage());
        }
    }
View Full Code Here

                notifyUpdatedNode(link);
            }
        }
        catch (FolderNotFoundException fnfe)
        {
            throw new NodeException(fnfe.getMessage());
        }
    }
View Full Code Here

            // notify page manager listeners
            notifyRemovedNode(link);
        }
        catch (FolderNotFoundException fnfe)
        {
            throw new NodeException(fnfe.getMessage());
        }
        catch (DocumentNotFoundException dnfe)
        {
            throw new NodeException(dnfe.getMessage());
        }
    }
View Full Code Here

                notifyUpdatedNode(pageSecurity);
            }
        }
        catch (FolderNotFoundException fnfe)
        {
            throw new NodeException(fnfe.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.page.document.NodeException

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.