]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.specs/src/main/java/org/argeo/slc/core/deploy/SimpleExecutables.java
Introduce org.argeo.slc.specs
[gpl/argeo-slc.git] / runtime / org.argeo.slc.specs / src / main / java / org / argeo / slc / core / deploy / SimpleExecutables.java
1 package org.argeo.slc.core.deploy;
2
3 import java.io.File;
4 import java.util.Map;
5 import java.util.TreeMap;
6
7 import org.apache.commons.logging.Log;
8 import org.apache.commons.logging.LogFactory;
9 import org.argeo.slc.core.build.Distribution;
10
11 public class SimpleExecutables implements InstalledExecutables {
12 private final static Log log = LogFactory.getLog(SimpleExecutables.class);
13
14 private String baseDir;
15 private Map<String, String> paths = new TreeMap<String, String>();
16
17 private Distribution distribution;
18
19 public String getExecutablePath(String key) {
20 String path = paths.get(key);
21 if (path == null) {
22 if (log.isDebugEnabled())
23 log.debug("No executable path found for key " + key
24 + ", using the key as executable name.");
25 path = key;
26 }
27
28 if (baseDir != null)
29 path = baseDir + File.separator + path;
30 return path;
31 }
32
33 public String getDeployedSystemId() {
34 // TODO Auto-generated method stub
35 return null;
36 }
37
38 public DeploymentData getDeploymentData() {
39 // TODO Auto-generated method stub
40 return null;
41 }
42
43 public Distribution getDistribution() {
44 return distribution;
45 }
46
47 public TargetData getTargetData() {
48 // TODO Auto-generated method stub
49 return null;
50 }
51
52 public String getBaseDir() {
53 return baseDir;
54 }
55
56 public void setBaseDir(String baseDir) {
57 this.baseDir = baseDir;
58 }
59
60 public Map<String, String> getPaths() {
61 return paths;
62 }
63
64 public void setPaths(Map<String, String> paths) {
65 this.paths = paths;
66 }
67
68 public void setDistribution(Distribution distribution) {
69 this.distribution = distribution;
70 }
71
72 }