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