Package org.platformlayer.jobs.model

Examples of org.platformlayer.jobs.model.JobData


    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    JobData ret = client.doAction(key, json, Format.JSON);
    return ret;
  }
View Full Code Here


    return ret;
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    JobData jobData = (JobData) o;
    writer.println(jobData.getJobId());
  }
View Full Code Here

  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    JobData jobData = client.deleteItem(key);
    return jobData;
  }
View Full Code Here

    return jobData;
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    JobData jobData = (JobData) o;
    writer.println(jobData.getJobId());
  }
View Full Code Here

  protected JobData runAction(ItemPath path, Action action) throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    JobData ret = client.doAction(key, action);
    return ret;
  }
View Full Code Here

    return ret;
  }

  @Override
  public void formatRaw(Object o, PrintWriter writer) {
    JobData jobData = (JobData) o;
    writer.println(jobData.getJobId());
  }
View Full Code Here

  }

  @Override
  public JobData deleteItem(PlatformLayerKey key) throws PlatformLayerClientException {
    MappedPlatformLayerKey mapped = mapToChild(key);
    JobData jobData = mapped.child.client.deleteItem(key);
    return mapped.child.setHost(jobData);
  }
View Full Code Here

  }

  @Override
  public JobData doAction(PlatformLayerKey key, Action action) throws PlatformLayerClientException {
    MappedPlatformLayerKey mapped = mapToChild(key);
    JobData result = mapped.child.client.doAction(mapped.key, action);
    return mapped.child.setHost(result);
  }
View Full Code Here

  public void visit(CliContext context, JobExecutionData o, OutputSink sink) throws IOException {
    LinkedHashMap<String, Object> values = Maps.newLinkedHashMap();

    values.put("jobId", o.getJobId());
    values.put("executionId", o.getExecutionId());
    JobData job = o.getJob();
    values.put("target", job != null ? job.getTargetItemKey() : null);

    Action action = null;
    if (job != null) {
      action = job.getAction();
    }
    values.put("action", action != null ? action.getType() : null);

    values.put("startedAt", o.getStartedAt());
    values.put("endedAt", o.getEndedAt());
View Full Code Here

      projectId = opsContextBuilder.getRunAsProjectId(auth);
    } catch (OpsException e) {
      throw new OpsException("Error getting projectId", e);
    }

    JobData jobData = new JobData();
    jobData.action = action;
    jobData.targetId = targetItem;

    try {
      String jobId = repository.insertJob(projectId, jobData);
View Full Code Here

TOP

Related Classes of org.platformlayer.jobs.model.JobData

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.