X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.simple%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Flib%2Flinux%2FRedhatDeploymentData.java;h=cb735022b941b5a6ad589f2e699ef806da6e54c1;hb=5fcacdb600e4c9e765cb93b46132932662832c1b;hp=8e1f29ab8139363873ea726ce46abde70d9093ee;hpb=f1949f18a209de9f9ee110e2e2654882529b8ec5;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatDeploymentData.java b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatDeploymentData.java index 8e1f29ab8..cb735022b 100644 --- a/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatDeploymentData.java +++ b/runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/RedhatDeploymentData.java @@ -1,55 +1,28 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.argeo.slc.lib.linux; -import org.argeo.slc.core.deploy.MultiResourceSet; import org.argeo.slc.core.deploy.ResourceSet; import org.argeo.slc.deploy.DeploymentData; -public class RedhatDeploymentData implements DeploymentData { - private ResourceSet configurationFiles; - private String runlevelsScript; - private String permissionsScript; - - private RedhatDeploymentData parent; - - public ResourceSet getConfigurationFiles() { - if (parent != null && parent.getConfigurationFiles() != null) { - MultiResourceSet mrs = new MultiResourceSet(); - mrs.getResourceSets().add(parent.getConfigurationFiles()); - mrs.getResourceSets().add(configurationFiles); - return mrs; - } else { - return configurationFiles; - } - } - - public String getRunlevelsScript() { - if (parent != null && parent.getRunlevelsScript() != null) - return parent.getRunlevelsScript() + "\n" + runlevelsScript; - else - return runlevelsScript; - } - - public String getPermissionsScript() { - if (parent != null && parent.getPermissionsScript() != null) - return parent.getPermissionsScript() + "\n" + permissionsScript; - else - return permissionsScript; - } - - public void setRunlevelsScript(String runlevelsScript) { - this.runlevelsScript = runlevelsScript; - } - - public void setConfigurationFiles(ResourceSet configurationFiles) { - this.configurationFiles = configurationFiles; - } - - public void setPermissionsScript(String permissionsScript) { - this.permissionsScript = permissionsScript; - } +public interface RedhatDeploymentData extends DeploymentData { + public ResourceSet getConfigurationFiles(); - public void setParent(RedhatDeploymentData parentDeploymentData) { - this.parent = parentDeploymentData; - } + public String getRunlevelsScript(); + public String getPermissionsScript(); }