Examples of NodeException


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

        }
        catch (Exception e)
        {
            // reset cache in folder
            folderImpl.resetPages(false);
            throw new NodeException("Unable to access pages for folder " + folder.getPath() + ".");
        }

        // folder pages cache populated, get pages from folder
        // to provide packaging as filtered node set
        return folder.getPages();
View Full Code Here

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

        }
        catch (Exception e)
        {
            // reset cache in folder
            folderImpl.resetLinks(false);
            throw new NodeException("Unable to access links for folder " + folder.getPath() + ".");
        }

        // folder links cache populated, get links from folder
        // to provide packaging as filtered node set
        return folder.getLinks();
View Full Code Here

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

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

            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

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

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

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

        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

Examples of org.apache.tuscany.sca.node.NodeException

    }  
    
    public void addToDomainLevelCompositeFromDomain(QName compositeQName) throws NodeException {
       
        if (nodeStarted){
            throw new NodeException("Can't add composite " + compositeQName.toString() + " when the node is running. Call stop() on the node first");
        }
       
        Composite composite = composites.get(compositeQName);
       
        if (composite == null) {
            throw new NodeException("Composite " + compositeQName.toString() + " not found" );
        }
       
        // if the named composite is not already in the list then deploy it
        if (!nodeComposite.getIncludes().contains(composite)) {
            nodeComposite.getIncludes().add(composite)
           
            try {
                // build and activate the model for this composite
                activateComposite(composite);
            } catch (Exception ex) {
                throw new NodeException(ex);
            }                  
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.node.NodeException

    // SCANode API methods
   
    public void start() throws NodeException {
        if (domainURI != null){
            throw new NodeException("Node is part of domain " +
                                    domainURI +
                                    " so must be starterd from there");
        } else {
            startFromDomain();
        }
View Full Code Here

Examples of org.apache.tuscany.sca.node.NodeException

        }
    }
   
    public void stop() throws NodeException {
        if (domainURI != null){
            throw new NodeException("Node is part of domain " +
                                    domainURI +
                                    " so must be stopped from there");
        } else {
            stopFromDomain();          
        }
View Full Code Here

Examples of org.apache.tuscany.sca.node.NodeException

            composites = null;
            compositeFiles = null;           
        } catch(NodeException ex) {
            throw ex;           
        } catch (Exception ex) {
            throw new NodeException(ex);
       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.