예제 #1
0
  public void addToNode(Node parentNode, PathFactory pathFactory) {
    Map<String, Object> libraryAttributes = Maps.newHashMapWithExpectedSize(2);
    libraryAttributes.put("name", name);
    if (type != null) {
      libraryAttributes.put("type", type);
    }
    Node libraryNode = parentNode.appendNode("library", libraryAttributes);
    Node classesNode = libraryNode.appendNode("CLASSES");
    for (File file : classes) {
      Map<String, Object> attributes = Maps.newHashMapWithExpectedSize(1);
      attributes.put("url", pathFactory.path(file).getUrl());
      classesNode.appendNode("root", attributes);
    }
    Node javadocNode = libraryNode.appendNode("JAVADOC");
    for (File file : javadoc) {
      Map<String, Object> attributes = Maps.newHashMapWithExpectedSize(1);
      attributes.put("url", pathFactory.path(file).getUrl());
      javadocNode.appendNode("root", attributes);
    }
    Node sourcesNode = libraryNode.appendNode("SOURCES");
    for (File file : sources) {
      Map<String, Object> attributes = Maps.newHashMapWithExpectedSize(1);
      attributes.put("url", pathFactory.path(file).getUrl());
      sourcesNode.appendNode("root", attributes);
    }

    if (compilerClasspath.size() > 0) {
      Node properties = libraryNode.appendNode("properties");
      Node compilerClasspathNode = properties.appendNode("compiler-classpath");
      for (File file : compilerClasspath) {
        Map<String, Object> attributes = Maps.newHashMapWithExpectedSize(1);
        attributes.put("url", pathFactory.path(file, true).getUrl());
        compilerClasspathNode.appendNode("root", attributes);
      }
    }
  }
예제 #2
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String historyJobHosts(final JobId jobId) {
   return HISTORY_JOBS.path(jobId.toString(), HOSTS);
 }
예제 #3
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHostJob(final String host, final JobId jobId) {
   return CONFIG_HOSTS.path(host, JOBS, jobId.toString());
 }
예제 #4
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobHost(final JobId jobId, final String host) {
   return CONFIG_JOBS.path(jobId.toString(), HOSTS, host);
 }
예제 #5
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobRefShort(final JobId id) {
   return CONFIG_JOBREFS.path(id.getName() + ":" + id.getVersion());
 }
예제 #6
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJob(final JobId id) {
   return CONFIG_JOBS.path(id.toString());
 }
예제 #7
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobs() {
   return CONFIG_JOBS.path();
 }
예제 #8
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String historyJobs() {
   return HISTORY_JOBS.path();
 }
예제 #9
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHostJob(final String host, final JobId jobId) {
   return STATUS_HOSTS.path(host, JOBS, jobId.toString());
 }
예제 #10
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHostJobs(final String host) {
   return STATUS_HOSTS.path(host, JOBS);
 }
예제 #11
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHosts() {
   return STATUS_HOSTS.path();
 }
예제 #12
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configId(final String id) {
   return CONFIG_ID.path(id);
 }
예제 #13
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHostPort(final String host, final int port) {
   return CONFIG_HOSTS.path(host, PORTS, String.valueOf(port));
 }
예제 #14
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHostPorts(final String host) {
   return CONFIG_HOSTS.path(host, PORTS);
 }
예제 #15
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHostJobCreation(
     final String host, final JobId id, final UUID operationId) {
   return CONFIG_HOSTS.path(host, JOBS, id.toString(), CREATION_PREFIX + operationId);
 }
예제 #16
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String historyJobHost(final JobId jobId, final String host) {
   return HISTORY_JOBS.path(jobId.toString(), HOSTS, host);
 }
예제 #17
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String historyJob(final JobId jobId) {
   return HISTORY_JOBS.path(jobId.toString());
 }
예제 #18
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHostUp(final String host) {
   return STATUS_HOSTS.path(host, UP);
 }
예제 #19
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHosts() {
   return CONFIG_HOSTS.path();
 }
예제 #20
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusMasterUp(final String master) {
   return STATUS_MASTERS.path(master, UP);
 }
예제 #21
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobRefs() {
   return CONFIG_JOBREFS.path();
 }
예제 #22
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusMaster() {
   return STATUS_MASTERS.path();
 }
예제 #23
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobCreation(final JobId id, final UUID operationId) {
   final String name = CREATION_PREFIX + operationId;
   return CONFIG_JOBS.path(id.toString(), name);
 }
예제 #24
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHostAgentInfo(final String host) {
   return STATUS_HOSTS.path(host, AGENTINFO);
 }
예제 #25
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configJobHosts(final JobId jobId) {
   return CONFIG_JOBS.path(jobId.toString(), HOSTS);
 }
예제 #26
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String statusHostEnvVars(final String host) {
   return STATUS_HOSTS.path(host, ENVIRONMENT);
 }
예제 #27
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String configHost(final String host) {
   return CONFIG_HOSTS.path(host);
 }
예제 #28
0
파일: Paths.java 프로젝트: ddreaml/helios
 public static String historyJobHostEventsTimestamp(
     final JobId jobId, final String host, final long timestamp) {
   return HISTORY_JOBS.path(jobId.toString(), HOSTS, host, EVENTS, String.valueOf(timestamp));
 }