Package com.denimgroup.threadfix.data.entities

Examples of com.denimgroup.threadfix.data.entities.JobStatus


  public void updateJobStatus(Integer jobStatusId, String status) {
    if (jobStatusId == null) {
      return;
    }
   
    JobStatus jobStatus = loadJobStatus(jobStatusId);
   
    if (jobStatus == null) {
      return;
    }
   
    if (!jobStatus.getHasStartedProcessing()) {
      jobStatus.setHasStartedProcessing(true);
    }

    jobStatus.setStatus(status);
    jobStatus.setModifiedDate(new Date());

    storeJobStatus(jobStatus);
  }
View Full Code Here


  @Override
  @Transactional(readOnly = false)
  public Integer createNewJobStatus(String type, String initialStatus, String urlPath,
      String urlText, Calendar date, ApplicationChannel channel) {
    JobStatus jobStatus = new JobStatus();

    Date now = new Date();

    jobStatus.setType(type);
    jobStatus.setStatus(initialStatus);
    jobStatus.setStartDate(now);
    jobStatus.setModifiedDate(now);
    jobStatus.setUrlPath(urlPath);
    jobStatus.setUrlText(urlText);
    jobStatus.setScanDate(date);
    jobStatus.setApplicationChannel(channel);
    jobStatus.setOpen(true);

    storeJobStatus(jobStatus);

    return jobStatus.getId();

  }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.data.entities.JobStatus

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.