Package co.cask.cdap.proto

Examples of co.cask.cdap.proto.ProgramRecord


  private static ApplicationRecord makeAppRecord(ApplicationSpecification appSpec) {
    return new ApplicationRecord("App", appSpec.getName(), appSpec.getName(), appSpec.getDescription());
  }

  private static ProgramRecord makeProgramRecord (String appId, ProgramSpecification spec, ProgramType type) {
    return new ProgramRecord(type, appId, spec.getName(), spec.getName(), spec.getDescription());
  }
View Full Code Here


      ApplicationSpecification spec = store.getApplication(Id.Application.from(accountId, appId));
      if (spec != null) {
        List<ProgramRecord> services = Lists.newArrayList();
        for (Map.Entry<String, ServiceSpecification> entry : spec.getServices().entrySet()) {
          ServiceSpecification specification = entry.getValue();
          services.add(new ProgramRecord(ProgramType.SERVICE, appId, specification.getName(),
                                         specification.getName(), specification.getDescription()));
        }
        responder.sendJson(HttpResponseStatus.OK, services);
      } else {
        responder.sendStatus(HttpResponseStatus.NOT_FOUND);
View Full Code Here

TOP

Related Classes of co.cask.cdap.proto.ProgramRecord

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.