Package org.apache.jetspeed.exception

Examples of org.apache.jetspeed.exception.JetspeedException


    public void build(RequestContext context) throws JetspeedException
    {
        Page page = context.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin PageAggregator.build");
        }
   
        // Initialize fragment
        Stack stack = new Stack();
        Fragment currentFragment = page.getRootFragment();
   
        if (currentFragment == null)
        {
            throw new JetspeedException("No root Fragment found in Page");
        }
   
        String layoutDecorator = currentFragment.getDecorator();
        if (layoutDecorator == null)
        {
View Full Code Here


            final String innerFolderTemplate = folderTemplate;
            final String innerUserName = userName;
            final PageManager innerPageManager = pageManager;
            final String innerUser = userName;
            User powerUser = userManager.getUser(this.adminUser);
            JetspeedException pe = (JetspeedException) Subject.doAsPrivileged(powerUser.getSubject(), new PrivilegedAction()
                {
                    public Object run()
                    {
                         try
                        {
//                           create user's home folder                       
                             // deep copy from the default folder template tree, creating a deep-copy of the template
                             // in the new user's folder tree
                            Folder source = innerPageManager.getFolder(innerFolderTemplate);                           
                            innerPageManager.deepCopyFolder(source, Folder.USER_FOLDER + innerUserName, innerUser);
                            
                            return null;
                        }
                         catch (FolderNotFoundException e1) {
                             return e1;
                         } catch (InvalidFolderException e1){
                             return e1;
                         } catch (NodeException e1){
                             return e1;
                         } catch (PageNotUpdatedException e1) {
                             return e1;
                         } catch (JetspeedException e1) {
                             return e1;
                         }                    
                    }
                }, null);
               
            if(pe != null)
            {
                // rollback user creation and cascade roles, groups, etc
                try
                {
                    if (userManager.getUser(userName) != null)
                    {
                        userManager.removeUser(userName);
                    }
                }
                catch (Exception e)
                {
                    log.error("Registration Error: Failed to rollback user " + userName);
                }
                log.error("Registration Error: Failed to create user folders for " + userName + ", " + pe.toString());
                throw pe;
            }
                       
        }
        catch (Exception e)
View Full Code Here

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

    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();

        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }

        contentServer.prepareContentPaths(context, page);
       
View Full Code Here

    public void build(RequestContext request) throws JetspeedException
    {
        ContentPage page = request.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin BasicAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();
        render(portletContainer, root, request);
       
View Full Code Here

            //
            System.out.println("*** Getting portlet from registry: " + fragment.getName());
            PortletDefinition portletDefinition = registry.getPortletDefinitionByUniqueName(fragment.getName());
            if (portletDefinition == null)
            {
                throw new JetspeedException("Failed to load: " + fragment.getName() + " from registry");
            }
                       
            PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);

            HttpServletRequest servletRequest = request.getRequestForWindow(portletWindow);
View Full Code Here

        }
        catch (Throwable e)
        {
            e.printStackTrace();
            log.error(e.toString());
            throw new JetspeedException("Jetspeed Initialization exception!", e);
        }
        finally
        {           
            Date endTime = new Date();
            long elapsedTime = (endTime.getTime() - startTime.getTime()) / 1000;
View Full Code Here

   
            componentManager.stop();
        }
        catch (PortletContainerException e)
        {
            throw new JetspeedException(e);
        }
        System.gc();
    }
View Full Code Here

    public void build( RequestContext context ) throws JetspeedException, IOException
    {
        ContentPage page = context.getPage();
        if (null == page)
        {
            throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
        }

        ContentFragment root = page.getRootContentFragment();

        if (root == null)
        {
            throw new JetspeedException("No root ContentFragment found in ContentPage");
        }

        String layoutDecorator = root.getDecorator();
        if (layoutDecorator == null)
        {
View Full Code Here

        }
        catch (Throwable e)
        {
            e.printStackTrace();
            log.error(e.toString());
            throw new JetspeedException("Jetspeed Initialization exception!", e);
        }
        finally
        {           
            Date endTime = new Date();
            long elapsedTime = (endTime.getTime() - startTime.getTime()) / 1000;
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.exception.JetspeedException

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.