Package org.apache.slide.projector

Examples of org.apache.slide.projector.Processor


        logger.log(Level.FINE, "Context path=" + request.getContextPath());
        logger.log(Level.FINE, "Servlet path=" + request.getServletPath());
        URI uri = new URIValue(request.getRequestURI().substring(request.getContextPath().length()+request.getServletPath().length()+1));
        try {
            Result result;
            Processor processor;
            try {
                logger.log(Level.FINE, "Processing started with URI=" + uri);
                Map requestParameters = request.getParameterMap();
                if ( requestParameters.containsKey(Constants.PROCESS_ID_PARAMETER) ) {
                  context.setProcessId(requestParameters.get(Constants.PROCESS_ID_PARAMETER).toString());
                } else {
                    StringBuffer processIdBuffer = new StringBuffer(Constants.PROCESS_ID_LENGTH);
                  for ( int i = 0; i < Constants.PROCESS_ID_LENGTH; i++) {
                      processIdBuffer.append(allowedChars.charAt(random.nextInt(allowedChars.length())));
                  }
                  context.setProcessId(processIdBuffer.toString());
                }
                processor = ProcessorManager.getInstance().getProcessor(uri);
                Scheduler.getInstance();
                Scheduler.setContext(context);
              if ( sessionCreated ) {
                // new session
                    Scheduler.getInstance().launchSessionJobs(context);
              }
                Scheduler.getInstance().launchRequestJobs(context);
                if ( ProcessorManager.getInstance().getProcessorDescriptor(uri).isBookmark() ) {
                    context.setBookmark(uri);
                }
                ParameterDescriptor[] parameterDescriptors = processor.getParameterDescriptors();
                result = ProcessorManager.process(processor, new HashMap(requestParameters), context);
            } catch ( Exception exception ) {
                logger.log(Level.SEVERE, "Exception while processing processor with URI="+uri+"", exception);
                processor = ProcessorManager.getInstance().getProcessor(DEFAULT_EXCEPTION_PROCESSOR);
                Map exceptionParameters = new HashMap();
View Full Code Here


    }
  }
 
  private void launchJob(Step job, Context context) throws Exception {
        logger.log(Level.FINE, "Launching job: '"+job.getName()+"'");
    Processor processor = ProcessorManager.getInstance().getProcessor(job.getProcessorURI());
    Map processorParameters = Process.loadParameters(job, processor, context);
    ProcessorManager.process(processor, processorParameters, context);
  }
View Full Code Here

        remainingCondition = (XMLValue)remainingConditionValue;
      }
      boolean persistentJob = ((BooleanValue)parameters.get(PERSISTENT)).booleanValue();
      Expression remainingExpression = ExpressionFactory.create(remainingCondition.getRootElement());
      Expression initialExpression = ExpressionFactory.create(initialCondition.getRootElement());
      Processor jobProcessor = ProcessorManager.getInstance().getProcessor(jobUri);
      ProcessorManager.prepareValues(jobProcessor.getParameterDescriptors(), jobParameters, context);
      String processorId = context.getProcessId();
      Job job;
      if ( processorId == null ) {
        job = new Job(context.getStep(), jobUri, initialExpression, remainingExpression, jobParameters, repeatJob, persistentJob);
      } else {
View Full Code Here

            if ( value == null || value == NullValue.NULL ) {
              value = inputParameter.get(key);
            }
            columnParameters.put(name, value);
            if ( processorUri != NullValue.NULL ) {
                  Processor processor = ProcessorManager.getInstance().getProcessor((URI)processorUri);
                  Value processorParameters = (Value)columnMap.get(PARAMETERS);
                  if ( processorParameters instanceof MapValue ) {
                    columnParameters.putAll(((MapValue)processorParameters).getMap());
                  }
                Result processorResult = ProcessorManager.process(processor, columnParameters, context);
View Full Code Here

TOP

Related Classes of org.apache.slide.projector.Processor

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.