]> git.argeo.org Git - gpl/argeo-slc.git/blob - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatDeploymentData.java
Add license headers
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / lib / linux / RedhatDeploymentData.java
1 /*
2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.argeo.slc.lib.linux;
18
19 import org.argeo.slc.core.deploy.MultiResourceSet;
20 import org.argeo.slc.core.deploy.ResourceSet;
21 import org.argeo.slc.deploy.DeploymentData;
22
23 public class RedhatDeploymentData implements DeploymentData {
24 private ResourceSet configurationFiles;
25 private String runlevelsScript;
26 private String permissionsScript;
27
28 private RedhatDeploymentData parent;
29
30 public ResourceSet getConfigurationFiles() {
31 if (parent != null && parent.getConfigurationFiles() != null) {
32 MultiResourceSet mrs = new MultiResourceSet();
33 mrs.getResourceSets().add(parent.getConfigurationFiles());
34 mrs.getResourceSets().add(configurationFiles);
35 return mrs;
36 } else {
37 return configurationFiles;
38 }
39 }
40
41 public String getRunlevelsScript() {
42 if (parent != null && parent.getRunlevelsScript() != null)
43 return parent.getRunlevelsScript() + "\n" + runlevelsScript;
44 else
45 return runlevelsScript;
46 }
47
48 public String getPermissionsScript() {
49 if (parent != null && parent.getPermissionsScript() != null)
50 return parent.getPermissionsScript() + "\n" + permissionsScript;
51 else
52 return permissionsScript;
53 }
54
55 public void setRunlevelsScript(String runlevelsScript) {
56 this.runlevelsScript = runlevelsScript;
57 }
58
59 public void setConfigurationFiles(ResourceSet configurationFiles) {
60 this.configurationFiles = configurationFiles;
61 }
62
63 public void setPermissionsScript(String permissionsScript) {
64 this.permissionsScript = permissionsScript;
65 }
66
67 public void setParent(RedhatDeploymentData parentDeploymentData) {
68 this.parent = parentDeploymentData;
69 }
70
71 }