001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.console.car; 018 019 import java.io.Serializable; 020 import java.util.List; 021 022 import org.apache.geronimo.system.plugin.model.ArtifactType; 023 import org.apache.geronimo.system.plugin.model.ConfigXmlContentType; 024 import org.apache.geronimo.system.plugin.model.CopyFileType; 025 import org.apache.geronimo.system.plugin.model.DependencyType; 026 import org.apache.geronimo.system.plugin.model.HashType; 027 import org.apache.geronimo.system.plugin.model.LicenseType; 028 import org.apache.geronimo.system.plugin.model.PluginArtifactType; 029 import org.apache.geronimo.system.plugin.model.PluginType; 030 import org.apache.geronimo.system.plugin.model.PrerequisiteType; 031 import org.apache.geronimo.system.plugin.model.PropertyType; 032 033 /** 034 * Bean class that holds information about a plugin 035 * 036 * @version $Rev: 706640 $ $Date: 2008-10-21 14:44:05 +0000 (Tue, 21 Oct 2008) $ 037 */ 038 public class PluginInfoBean implements Serializable { 039 protected ArtifactType moduleId; 040 protected HashType hash; 041 protected List<String> geronimoVersion; 042 protected List<String> jvmVersion; 043 protected List<PrerequisiteType> prerequisite; 044 protected List<DependencyType> dependency; 045 protected List<ArtifactType> obsoletes; 046 protected List<String> sourceRepository; 047 protected List<CopyFileType> copyFile; 048 protected List<ConfigXmlContentType> configXmlContent; 049 protected List<PropertyType> artifactAlias; 050 protected List<PropertyType> configSubstitution; 051 protected String name; 052 protected String category; 053 protected String description; 054 protected String url; 055 protected String author; 056 protected List<LicenseType> license; 057 protected PluginType plugin; 058 protected PluginArtifactType pluginArtifact; 059 protected boolean installable = true; 060 protected String validationMessage; 061 062 public List<PropertyType> getArtifactAlias() { 063 return artifactAlias; 064 } 065 066 public void setArtifactAlias(List<PropertyType> artifactAlias) { 067 this.artifactAlias = artifactAlias; 068 } 069 070 public String getAuthor() { 071 return author; 072 } 073 074 public void setAuthor(String author) { 075 this.author = author; 076 } 077 078 public String getCategory() { 079 return category; 080 } 081 082 public void setCategory(String category) { 083 this.category = category; 084 } 085 086 public List<PropertyType> getConfigSubstitution() { 087 return configSubstitution; 088 } 089 090 public void setConfigSubstitution(List<PropertyType> configSubstitution) { 091 this.configSubstitution = configSubstitution; 092 } 093 094 public List<ConfigXmlContentType> getConfigXmlContent() { 095 return configXmlContent; 096 } 097 098 public void setConfigXmlContent(List<ConfigXmlContentType> configXmlContent) { 099 this.configXmlContent = configXmlContent; 100 } 101 102 public List<CopyFileType> getCopyFile() { 103 return copyFile; 104 } 105 106 public void setCopyFile(List<CopyFileType> copyFile) { 107 this.copyFile = copyFile; 108 } 109 110 public List<DependencyType> getDependency() { 111 return dependency; 112 } 113 114 public void setDependency(List<DependencyType> dependency) { 115 this.dependency = dependency; 116 } 117 118 public String getDescription() { 119 return description; 120 } 121 122 public void setDescription(String description) { 123 this.description = description; 124 } 125 126 public List<String> getGeronimoVersion() { 127 return geronimoVersion; 128 } 129 130 public void setGeronimoVersion(List<String> geronimoVersion) { 131 this.geronimoVersion = geronimoVersion; 132 } 133 134 public HashType getHash() { 135 return hash; 136 } 137 138 public void setHash(HashType hash) { 139 this.hash = hash; 140 } 141 142 public List<String> getJvmVersion() { 143 return jvmVersion; 144 } 145 146 public void setJvmVersion(List<String> jvmVersion) { 147 this.jvmVersion = jvmVersion; 148 } 149 150 public List<LicenseType> getLicense() { 151 return license; 152 } 153 154 public void setLicense(List<LicenseType> license) { 155 this.license = license; 156 } 157 158 public ArtifactType getModuleId() { 159 return moduleId; 160 } 161 162 public void setModuleId(ArtifactType moduleId) { 163 this.moduleId = moduleId; 164 } 165 166 public String getName() { 167 return name; 168 } 169 170 public void setName(String name) { 171 this.name = name; 172 } 173 174 public List<ArtifactType> getObsoletes() { 175 return obsoletes; 176 } 177 178 public void setObsoletes(List<ArtifactType> obsoletes) { 179 this.obsoletes = obsoletes; 180 } 181 182 public List<PrerequisiteType> getPrerequisite() { 183 return prerequisite; 184 } 185 186 public void setPrerequisite(List<PrerequisiteType> prerequisite) { 187 this.prerequisite = prerequisite; 188 } 189 190 public List<String> getSourceRepository() { 191 return sourceRepository; 192 } 193 194 public void setSourceRepository(List<String> sourceRepository) { 195 this.sourceRepository = sourceRepository; 196 } 197 198 public String getUrl() { 199 return url; 200 } 201 202 public void setUrl(String url) { 203 this.url = url; 204 } 205 206 public PluginType getPlugin() { 207 return plugin; 208 } 209 210 public void setPlugin(PluginType plugin) { 211 this.plugin = plugin; 212 // copy the fields 213 author = plugin.getAuthor(); 214 category = plugin.getCategory(); 215 description = plugin.getDescription(); 216 license = plugin.getLicense(); 217 name = plugin.getName(); 218 url = plugin.getUrl(); 219 } 220 221 public PluginArtifactType getPluginArtifact() { 222 return pluginArtifact; 223 } 224 225 public void setPluginArtifact(PluginArtifactType pluginArtifact) { 226 this.pluginArtifact = pluginArtifact; 227 // copy the fields 228 artifactAlias = pluginArtifact.getArtifactAlias(); 229 configSubstitution = pluginArtifact.getConfigSubstitution(); 230 configXmlContent = pluginArtifact.getConfigXmlContent(); 231 copyFile = pluginArtifact.getCopyFile(); 232 dependency = pluginArtifact.getDependency(); 233 geronimoVersion = pluginArtifact.getGeronimoVersion(); 234 hash = pluginArtifact.getHash(); 235 jvmVersion = pluginArtifact.getJvmVersion(); 236 moduleId = pluginArtifact.getModuleId(); 237 obsoletes = pluginArtifact.getObsoletes(); 238 prerequisite = pluginArtifact.getPrerequisite(); 239 sourceRepository = pluginArtifact.getSourceRepository(); 240 } 241 242 public boolean isInstallable() { 243 return installable; 244 } 245 246 public void setInstallable(boolean installable) { 247 this.installable = installable; 248 } 249 250 public String getValidationMessage() { 251 return validationMessage; 252 } 253 254 public void setValidationMessage(String validationMessage) { 255 this.validationMessage = validationMessage; 256 } 257 }