Examples of JobData


Examples of org.platformlayer.jobs.model.JobData

    // Currently, we need to do a manual configure operation...
    // TODO: trigger this automatically

    SolrServer server = getItem(id + "-0", SolrServer.class);
    JobData configureJob = getContext().doConfigure(server);

    waitForJobComplete(configureJob, TimeSpan.FIVE_MINUTES);

    testSolrCustomField(url, customFieldKey);
  }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

      List<JobEntity> results = db.queries.listRecentJobs(project, maxAge, filterTarget, limit);
      List<JobData> ret = Lists.newArrayList();
      for (JobEntity job : results) {
        ManagedItemId jobId = new ManagedItemId(job.jobId);
        PlatformLayerKey jobKey = JobData.buildKey(projectId, jobId);
        JobData jobData = mapFromEntity(job, jobKey);
        ret.add(jobData);
      }

      sortJobs(ret);
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

    data.logCookie = execution.logCookie;
    return data;
  }

  private JobData mapFromEntity(JobEntity entity, PlatformLayerKey jobKey) throws RepositoryException {
    JobData data = new JobData();

    data.action = actionFromXml(entity.actionXml);
    data.key = jobKey;
    data.targetId = PlatformLayerKey.parse(entity.target);
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

  @Override
  public JobData deleteItem(PlatformLayerKey key) throws PlatformLayerClientException {
    String relativePath = buildRelativePath(key);

    JobData retval = doRequest(HttpMethod.DELETE, relativePath, JobData.class, Format.XML, null, null);
    return retval;
  }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

  @Override
  public JobData doAction(PlatformLayerKey key, Action action) throws PlatformLayerClientException {
    String relativePath = buildRelativePath(key) + "/actions";

    JobData retval = doRequest(HttpMethod.POST, relativePath, JobData.class, Format.XML, action, Format.XML);
    return retval;
  }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

  @Override
  public JobData doAction(PlatformLayerKey key, String action, Format dataFormat) throws PlatformLayerClientException {
    String relativePath = buildRelativePath(key) + "/actions";

    JobData retval = doRequest(HttpMethod.POST, relativePath, JobData.class, Format.XML, action, dataFormat);
    return retval;
  }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

  }

  public void cleanup() throws IOException, OpsException {
    while (!ownedItems.isEmpty()) {
      ItemBase item = ownedItems.remove(ownedItems.size() - 1);
      JobData deleteJob = deleteItem(item);
      System.out.println("Deleted " + item.getKey() + " jobId=" + deleteJob.getJobId());
      waitForDeleted(item);
    }
  }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

      if (timeout != null && timeout.hasTimedOut(startedAt)) {
        throw new OpsException("Timeout waiting for job completion");
      }

      // TODO: We really need a "get job status" function
      JobData found = null;
      for (JobData candidate : client.listJobs().getJobs()) {
        if (jobKey.equals(candidate.getJobKey())) {
          found = candidate;
        }
      }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

        } catch (RepositoryException e) {
          throw new OpsException("Error writing object to database", e);
        }

        itemKey = newItem.getKey();
        JobData jobKey = changeQueue.notifyChange(auth, itemKey, ManagedItemState.CREATION_REQUESTED);
        // returnJobKey(jobKey);

        return newItem;
      }
View Full Code Here

Examples of org.platformlayer.jobs.model.JobData

      throw new IllegalStateException("Unknown service type");
    }

    final OpsContext opsContext = buildTemporaryOpsContext(targetItemKey.getServiceType(), auth);

    JobData jobKey = OpsContext.runInContext(opsContext, new CheckedCallable<JobData, Exception>() {
      @Override
      public JobData call() throws Exception {
        try {
          repository.changeState(targetItemKey, ManagedItemState.DELETE_REQUESTED);
        } catch (RepositoryException e) {
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.