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