Package org.apache.jetspeed.pipeline

Examples of org.apache.jetspeed.pipeline.PipelineException


        {
            cm = capabilities.getCapabilityMap(agent);
        }
        catch (UnableToBuildCapabilityMapException e)
        {
           throw new PipelineException("Falied to create capabilitied:  "+e.getMessage(), e);
        }
       
        MediaType mediaType = cm.getPreferredMediaType();
        MimeType mimeType = cm.getPreferredType();

        if (mediaType == null)
        {
            log.error("CapabilityMap returned a null media type");
            throw new PipelineException("CapabilityMap returned a null media type");
        }

        if (mimeType == null)
        {
            log.error("CapabilityMap returned a null mime type");
            throw new PipelineException("CapabilityMap returned a null mime type");
        }

        String encoding = request.getRequest().getCharacterEncoding();

        if (encoding == null)
View Full Code Here


            {
                response.sendError(500, e.getMessage());
            }
            catch (Exception e2)
            {
                throw new PipelineException(e2.getMessage(), e2);
            }
        }
        catch(Exception e)
        {
            throw new PipelineException(e.getMessage(), e);
        }
       
        // Pass control to the next Valve in the Pipeline
        context.invokeNext(request);
    }
View Full Code Here

            context.invokeNext(request);
        }
        catch (Exception e)
        {
            log.error("Exception in request pipeline: " + e.getMessage(), e);
            throw new PipelineException(e.toString(), e);
        }
    }
View Full Code Here

        {
            subject = getSubject(request);
        }
        catch (Exception e1)
        {
           throw new PipelineException(e1.getMessage(), e1);
        }
        request.getRequest().getSession().setAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT, subject);           
       
        // set request context subject
        request.setSubject(subject);
       
        // Pass control to the next Valve in the Pipeline and execute under
        // the current subject
        final ValveContext vc = context;
        final RequestContext rc = request;           
        PipelineException pe = (PipelineException) JSSubject.doAsPrivileged(subject, new PrivilegedAction()
        {
            public Object run()
            {
                 try
                {
View Full Code Here

                {
                    request.getResponse().sendRedirect(redirector);
                }
                catch (IOException e)
                {
                    throw new PipelineException(e);
                }
                return true;
            }
            else
            {
View Full Code Here

            rd.include(request.getRequest(), request.getResponse());
        }
        catch (ServletException e)
        {
            log.warn("The included login template file threw the exception.", e);
            throw new PipelineException("The included login template file threw the exception.", e);
        }
        catch (IOException e)
        {
            log.warn("I/O error occurred on the included login template file.", e);
            throw new PipelineException("I/O error occurred on the included login template file.", e);
        }

        // Pass control to the next Valve in the Pipeline
        context.invokeNext(request);
    }
View Full Code Here

        // Get remote user name set by web container
        String userName = context.getRequest().getRemoteUser();
        if ( userName == null )
        {           
            if (ntlmAuthRequired){
                throw new PipelineException("Authorization failed.");   
            } else if (context.getRequest().getUserPrincipal() != null){
                userName = context.getRequest().getUserPrincipal().getName();
            }            
        } else {
            if (omitDomain && networkDomain != null){
                userName = StringUtils.stripStart( userName , networkDomain+"\\");
            }
        }
       
        // check whether principal name stored in session subject equals the remote user name passed by the web container
        if (subject != null)
        {
            Principal subjectUserPrincipal = SecurityHelper.getPrincipal(subject, UserPrincipal.class);
            if ((subjectUserPrincipal == null) || !subjectUserPrincipal.getName().equals(userName))
            {
                subject = null;
            }
        }
        if ( subject == null ){
            if (userName != null){
                try
                {                   
                    User user = userMgr.getUser(userName);
                    if ( user != null )
                    {
                        subject = user.getSubject();
                    }
                } catch (SecurityException sex)
                {
                    subject = null;
                }
               
                if (subject == null && this.ntlmAuthRequired){
                    throw new PipelineException("Authorization failed for user '"+userName+"'.");
                }
            } 
            if (subject == null){
                // create anonymous user
                Principal userPrincipal = getUserPrincipal(context);
View Full Code Here

            context.invokeNext(request);
        }
        catch (Exception e)
        {
            log.error("Exception in request pipeline: " + e.getMessage(), e);
            throw new PipelineException(e.toString(), e);
        }
    }
View Full Code Here

                request.setActionWindow(actionWindow);                               
            }
        }
        catch (Exception e)
        {
            throw new PipelineException(e);
        }
        // Pass control to the next Valve in the Pipeline
        context.invokeNext( request );
    }
View Full Code Here

        {
            aggregator.build(request);
        }
        catch (Exception e)
        {
            throw new PipelineException(e.toString(), e);
        }
        // Pass control to the next Valve in the Pipeline
        context.invokeNext( request );
    }
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.pipeline.PipelineException

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.