2 * Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package org
.argeo
.slc
.lib
.linux
;
19 import org
.argeo
.slc
.core
.deploy
.MultiResourceSet
;
20 import org
.argeo
.slc
.core
.deploy
.ResourceSet
;
21 import org
.argeo
.slc
.deploy
.DeploymentData
;
23 public class RedhatDeploymentData
implements DeploymentData
{
24 private ResourceSet configurationFiles
;
25 private String runlevelsScript
;
26 private String permissionsScript
;
28 private RedhatDeploymentData parent
;
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
);
37 return configurationFiles
;
41 public String
getRunlevelsScript() {
42 if (parent
!= null && parent
.getRunlevelsScript() != null)
43 return parent
.getRunlevelsScript() + "\n" + runlevelsScript
;
45 return runlevelsScript
;
48 public String
getPermissionsScript() {
49 if (parent
!= null && parent
.getPermissionsScript() != null)
50 return parent
.getPermissionsScript() + "\n" + permissionsScript
;
52 return permissionsScript
;
55 public void setRunlevelsScript(String runlevelsScript
) {
56 this.runlevelsScript
= runlevelsScript
;
59 public void setConfigurationFiles(ResourceSet configurationFiles
) {
60 this.configurationFiles
= configurationFiles
;
63 public void setPermissionsScript(String permissionsScript
) {
64 this.permissionsScript
= permissionsScript
;
67 public void setParent(RedhatDeploymentData parentDeploymentData
) {
68 this.parent
= parentDeploymentData
;