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