Examples of JobParameter


Examples of com.blazebit.quartz.job.JobParameter

  @Override
  public List<JobParameter> getParameters() {
    List<JobParameter> l = new ArrayList<JobParameter>(
        super.getParameters());
    l.add(new JobParameter("to", true, String.class));
    l.add(new JobParameter("subject", true, String.class));
    l.add(new JobParameter("text", true, String.class));
    // optional
    l.add(new JobParameter("html", false, String.class));
    return l;
  }
View Full Code Here

Examples of com.blazebit.quartz.job.JobParameter

  @Override
  public List<JobParameter> getParameters() {
    List<JobParameter> l = new ArrayList<JobParameter>(
        super.getParameters());
    l.add(new JobParameter("host", true, String.class));
    l.add(new JobParameter("port", true, Integer.class));
    l.add(new JobParameter("user", true, String.class));
    l.add(new JobParameter("password", true, String.class));
    l.add(new JobParameter("from", true, String.class));
    // optional
    l.add(new JobParameter("trustAllCertificates", false, Boolean.class));
    l.add(new JobParameter("secure", false, Boolean.class));
    return l;
  }
View Full Code Here

Examples of com.enioka.jqm.jpamodel.JobParameter

        return q;
    }

    private static JobParameter createJobParameter(String key, String value, EntityManager em)
    {
        JobParameter j = new JobParameter();

        j.setKey(key);
        j.setValue(value);

        em.persist(j);
        return j;
    }
View Full Code Here

Examples of org.codinjutsu.tools.jenkins.model.JobParameter

    }

    private Map<String, String> getParamValueMap() {//TODO transformer en visiteur
        HashMap<String, String> valueByNameMap = new HashMap<String, String>();
        for (Map.Entry<JobParameter, JComponent> inputFieldByParameter : inputFieldByParameterMap.entrySet()) {
            JobParameter jobParameter = inputFieldByParameter.getKey();
            String name = jobParameter.getName();
            JobParameter.JobParameterType jobParameterType = jobParameter.getJobParameterType();

            JComponent inputField = inputFieldByParameter.getValue();

            if (JobParameter.JobParameterType.ChoiceParameterDefinition.equals(jobParameterType)) {
                JComboBox comboBox = (JComboBox) inputField;
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

    Map<String, JobParameter> map = new HashMap<String, JobParameter>();
    for(Entry<String, JobParameterType> entry : request.jobParameters.entrySet()) {
      ParameterType parameterType = entry.getValue().parameterType;
      if(parameterType == ParameterType.DATE) {
        if(entry.getValue().parameter instanceof Integer) {
          map.put(entry.getKey(), new JobParameter(new Date((Integer)entry.getValue().parameter)));
        } else if(entry.getValue().parameter instanceof Date) {
          map.put(entry.getKey(), new JobParameter(((Date)entry.getValue().parameter)));
        }
      } else if(parameterType == ParameterType.DOUBLE) {
        map.put(entry.getKey(), new JobParameter((Double)entry.getValue().parameter));
      } else if(parameterType == ParameterType.LONG) {
        if(entry.getValue().parameter instanceof Long) {
          map.put(entry.getKey(), new JobParameter((Long)entry.getValue().parameter));
        } else if(entry.getValue().parameter instanceof Integer) {
          Long tmp = new Long((Integer)entry.getValue().parameter);
          map.put(entry.getKey(), new JobParameter(tmp));
        }
      } else if(parameterType == ParameterType.STRING) {
        map.put(entry.getKey(), new JobParameter((String)entry.getValue().parameter));
      }
    }
    JobParameters jobParameters = new JobParameters(map);

    boolean jobInstanceExists = jobRepository.isJobInstanceExists(jobName, jobParameters);
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

    Map<String, JobParameter> map = new HashMap<String, JobParameter>();
    for(Entry<String, JobParameterType> entry : request.jobParameters.entrySet()) {
      ParameterType parameterType = entry.getValue().parameterType;
      if(parameterType == ParameterType.DATE) {
        if(entry.getValue().parameter instanceof Integer) {
          map.put(entry.getKey(), new JobParameter(new Date((Integer)entry.getValue().parameter)));
        } else if(entry.getValue().parameter instanceof Date) {
          map.put(entry.getKey(), new JobParameter(((Date)entry.getValue().parameter)));
        }
      } else if(parameterType == ParameterType.DOUBLE) {
        map.put(entry.getKey(), new JobParameter((Double)entry.getValue().parameter));
      } else if(parameterType == ParameterType.LONG) {
        if(entry.getValue().parameter instanceof Long) {
          map.put(entry.getKey(), new JobParameter((Long)entry.getValue().parameter));
        } else if(entry.getValue().parameter instanceof Integer) {
          Long tmp = new Long((Integer)entry.getValue().parameter);
          map.put(entry.getKey(), new JobParameter(tmp));
        }
      } else if(parameterType == ParameterType.STRING) {
        map.put(entry.getKey(), new JobParameter((String)entry.getValue().parameter));
      }
    }
    JobParameters jobParameters = new JobParameters(map);
    //throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException
    JobExecution jobExecution = null;
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

    Map<String, JobParameter> map = new HashMap<String, JobParameter>();
    for(Entry<String, JobParameterType> entry : request.jobParameters.entrySet()) {
      ParameterType parameterType = entry.getValue().parameterType;
      if(parameterType == ParameterType.DATE) {
        if(entry.getValue().parameter instanceof Integer) {
          map.put(entry.getKey(), new JobParameter(new Date((Integer)entry.getValue().parameter)));
        } else if(entry.getValue().parameter instanceof Date) {
          map.put(entry.getKey(), new JobParameter(((Date)entry.getValue().parameter)));
        }
      } else if(parameterType == ParameterType.DOUBLE) {
        map.put(entry.getKey(), new JobParameter((Double)entry.getValue().parameter));
      } else if(parameterType == ParameterType.LONG) {
        if(entry.getValue().parameter instanceof Long) {
          map.put(entry.getKey(), new JobParameter((Long)entry.getValue().parameter));
        } else if(entry.getValue().parameter instanceof Integer) {
          Long tmp = new Long((Integer)entry.getValue().parameter);
          map.put(entry.getKey(), new JobParameter(tmp));
        }
      } else if(parameterType == ParameterType.STRING) {
        map.put(entry.getKey(), new JobParameter((String)entry.getValue().parameter));
      }
    }
    JobParameters jobParameters = new JobParameters(map);

    JobExecution lastJobExecution = jobRepository.getLastJobExecution(jobName, jobParameters);
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

    Map<String, JobParameter> map = new HashMap<String, JobParameter>();
    for(Entry<String, JobParameterType> entry : type.parameters.entrySet()) {
      ParameterType parameterType = entry.getValue().parameterType;
      if(parameterType == ParameterType.DATE) {
        if(entry.getValue().parameter instanceof Integer) {
          map.put(entry.getKey(), new JobParameter(new Date((Integer)entry.getValue().parameter)));
        } else if(entry.getValue().parameter instanceof Long) {
          map.put(entry.getKey(), new JobParameter(new Date((Long)entry.getValue().parameter)));
        } else if(entry.getValue().parameter instanceof Date) {
          map.put(entry.getKey(), new JobParameter(((Date)entry.getValue().parameter)));
        }
      } else if(parameterType == ParameterType.DOUBLE) {
        map.put(entry.getKey(), new JobParameter((Double)entry.getValue().parameter));
      } else if(parameterType == ParameterType.LONG) {
        if(entry.getValue().parameter instanceof Long) {
          map.put(entry.getKey(), new JobParameter((Long)entry.getValue().parameter));
        } else if(entry.getValue().parameter instanceof Integer) {
          Long tmp = new Long((Integer)entry.getValue().parameter);
          map.put(entry.getKey(), new JobParameter(tmp));
        }
      } else if(parameterType == ParameterType.STRING) {
        map.put(entry.getKey(), new JobParameter((String)entry.getValue().parameter));
      }
    }
    return new JobParameters(map);
  }
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

  private JobParameters params;

  @Before
  public void setup() {
    Map<String, JobParameter> p = new LinkedHashMap<String, JobParameter>();
    p.put("mr.input", new JobParameter("/batch-param-test/input/"));
    p.put("mr.output", new JobParameter("/batch-param-test/output/"));
    p.put("properties-file", new JobParameter("dummy-1.properties"));
    params = new JobParameters(p);
  }
View Full Code Here

Examples of org.springframework.batch.core.JobParameter

   * @return a new JobParameters object containing only a parameter for the
   * current timestamp, to ensure that the job instance will be unique
   */
  private JobParameters makeUniqueJobParameters() {
    Map<String, JobParameter> parameters = new HashMap<String, JobParameter>();
    parameters.put("timestamp", new JobParameter(new Date().getTime()));
    return new JobParameters(parameters);
  }
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.