Examples of FlowController


Examples of org.apache.beehive.netui.pageflow.FlowController

    public ActionForward handleException( FlowControllerHandlerContext context, Throwable ex,
                                          ActionMapping actionMapping, ActionForm form )
            throws IOException, ServletException
    {
        FlowController flowController = context.getFlowController();
        ServletRequest request = context.getRequest();
        ServletResponse response = context.getResponse();
       
        if ( _log.isInfoEnabled() )
        {
            _log.info( "Handling uncaught Throwable " + ex.getClass().getName() );
        }
       
        // Callback to the event reporter.
        _eventReporter.exceptionRaised( ex, actionMapping, form, flowController, request, response );
        long startTime = System.currentTimeMillis();
   
        //
        // Look up the ExceptionConfig that's associated with this Throwable.
        //
        Class exClass = ex.getClass();
        ExceptionConfig exceptionConfig = null;
        if ( actionMapping != null )
        {
            exceptionConfig = actionMapping.findException( exClass );
        }
        else
        {
            // If the mapping was null (i.e., the exception happened before we got the action mapping), look for the
            // exception only in the module config.
            exceptionConfig = getExceptionConfig( exClass, flowController.getModuleConfig() );
        }
       
        //
        // If there was no applicable exception handler in the current ModuleConfig, look in Global.app's module.
        //
        if ( exceptionConfig == null )
        {
            FlowController fallbackFC =
                    getFallbackFlowController( flowController, exClass, request, response, getServletContext() );
           
            if ( fallbackFC != null )
            {
                flowController = fallbackFC;
View Full Code Here

Examples of org.apache.beehive.netui.pageflow.FlowController

    {
        assert context.getRequest() instanceof HttpServletRequest : "don't support ServletRequest currently.";
        assert context.getResponse() instanceof HttpServletResponse : "don't support ServletResponse currently.";
        HttpServletRequest request = ( HttpServletRequest ) context.getRequest();
        HttpServletResponse response = ( HttpServletResponse ) context.getResponse();
        FlowController flowController = context.getFlowController();
        String methodName = exceptionConfig.getHandler();
        Object unwrappedFormBean = InternalUtils.unwrapFormBean( form );
        Method method = getExceptionHandlerMethod( context, methodName, ex, unwrappedFormBean );

        if ( method != null )
        {
            // First see if there's a hard-coded message set.
            String message = exceptionConfig.getDefaultMessage();
            ActionMessage error = null;
           
            if ( message != null )
            {
                error = new ExpressionMessage( message, new Object[]{ ex.getMessage() } );
               
                try
                {
                    // The message may be an expression.  Evaluate it.
                    message = InternalExpressionUtils.evaluateMessage( message, form, request, getServletContext() );
                }
                catch ( ELException e )
                {
                    _log.error( "error while evaluating expression in exception-handler for " + ex.getClass().getName(), e );
                }
            }


            if ( message == null )
            {
                // No hard-coded message.  Get the message based on the message key.
                String messageKey = exceptionConfig.getKey();
                       
                if ( messageKey != null && messageKey.length() > 0 )
                {
                    message = getMessage( context, messageKey, null, null );
                }
            }
           
            //
            // Expose the exception to the errors tag.
            //
            String msgKey = exceptionConfig.getKey();
            if ( error == null ) error = new ActionMessage( msgKey, ex.getMessage() );
            storeException( request, msgKey, error, exceptionConfig.getScope() );
           
            return flowController.invokeExceptionHandler( method, ex, message, unwrappedFormBean,
                                                          form, actionMapping, request, response,
                                                          exceptionConfig.isReadonly() );
        }
        else
        {
            //
            // This shouldn't happen except in out-of-date-class situations.  JpfChecker
            // should prevent this at compilation time.
            //
            String err;
            if ( form != null )
            {
                err= Bundle.getString( "PageFlow_MissingExceptionHandlerWithForm",
                                       new Object[]{ methodName, form.getClass().getName() } );
            }
            else
            {
                err = Bundle.getString( "PageFlow_MissingExceptionHandler", methodName );
            }
                   
            InternalUtils.sendError( "PageFlow_Custom_Error", null, request, response,
                                     new Object[]{ flowController.getDisplayName(), err } );
            return null;
        }       
    }
View Full Code Here

Examples of org.apache.beehive.netui.pageflow.FlowController

     *             if none matches.
     */
    protected Method getExceptionHandlerMethod( FlowControllerHandlerContext context, String methodName, Throwable ex,
                                                Object formBean )
    {
        FlowController flowController = context.getFlowController();
        String cacheKey = methodName + '/' + ex.getClass().getName();
        ClassLevelCache cache = ClassLevelCache.getCache( flowController.getClass() );
        Method method = ( Method ) cache.get( CACHEID_EXCEPTION_HANDLER_METHODS, cacheKey );
       
        if ( method != null )
        {
            return method;
        }
    
        Class flowControllerClass = flowController.getClass();
        for ( Class exClass = ex.getClass(); exClass != null; exClass = exClass.getSuperclass() )
        {
            Class[] args = new Class[]{ exClass, String.class, String.class, Object.class };
            Method foundMethod = InternalUtils.lookupMethod( flowControllerClass, methodName, args );
           
View Full Code Here

Examples of org.geoserver.flow.FlowController

                LOGGER.severe("Rules should be assigned just a queue size, instead " + okey
                        + " is associated to " + value);
                continue;
            }

            FlowController controller = null;
            if ("timeout".equalsIgnoreCase(key)) {
                timeout = queueSize * 1000;
                continue;
            }
            if ("ows.global".equalsIgnoreCase(key)) {
View Full Code Here

Examples of org.jfree.report.flow.FlowController

   *          if a query failed.
   */
  protected LayoutController startElement(final ReportTarget target)
      throws DataSourceException, ReportProcessingException, ReportDataFactoryException
  {
    final FlowController fc = getFlowController();
    final GlobalMasterRow masterRow = fc.getMasterRow();
    final ReportDataRow reportDataRow = masterRow.getReportDataRow();
    final ReportData reportData = reportDataRow.getReportData();
    if (!reportData.isReadable())
    {
      reportData.isReadable();
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    if (n == null)
    {
      return olc;
    }

    final FlowController flowController = getFlowController();
    final ReportContext reportContext = flowController.getReportContext();
    final LayoutControllerFactory layoutControllerFactory =
        reportContext.getLayoutControllerFactory();
    return layoutControllerFactory.create(flowController, n, olc);

  }
View Full Code Here

Examples of org.jfree.report.flow.FlowController

  }


  protected boolean isValueChanged()
  {
    final FlowController controller = getFlowController();
    final GlobalMasterRow masterRow = controller.getMasterRow();
    final ReportDataRow reportDataRow = masterRow.getReportDataRow();
    return reportDataRow.getCursor() == 0;
  }
View Full Code Here

Examples of org.jfree.report.flow.FlowController

      DataSourceException
  {
    final FixedTextElement fte = (FixedTextElement) getNode();
    final Section content = fte.getContent();

    final FlowController flowController = getFlowController();
    final ReportContext reportContext = flowController.getReportContext();
    final LayoutControllerFactory layoutControllerFactory =
        reportContext.getLayoutControllerFactory();

    final FixedTextLayoutController flc = (FixedTextLayoutController) clone();
    flc.setState(AbstractReportElementLayoutController.FINISHED);
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    {
        final ImageElement imageElement = (ImageElement) getNode();
        final FormulaExpression formulaExpression = imageElement.getFormula();
        if (formulaExpression == null)
        {
            final FlowController controller = getFlowController();
            final GlobalMasterRow masterRow = controller.getMasterRow();
            final ReportDataRow reportDataRow = masterRow.getReportDataRow();
            if (reportDataRow.getCursor() == 0)
            {
                return true;
            }
View Full Code Here

Examples of org.jfree.report.flow.FlowController

    if (n == null)
    {
      return olc;
    }

    final FlowController flowController = getFlowController();
    final ReportContext reportContext = flowController.getReportContext();
    final LayoutControllerFactory layoutControllerFactory =
        reportContext.getLayoutControllerFactory();
    return layoutControllerFactory.create(flowController, n, olc);

  }
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.