1 17 package org.apache.geronimo.kernel.config; 18 19 import java.io.Serializable ; 20 import java.io.File ; 21 import java.util.LinkedHashSet ; 22 import java.util.Set ; 23 24 import org.apache.geronimo.gbean.AbstractName; 25 import org.apache.geronimo.kernel.management.State; 26 import org.apache.geronimo.kernel.repository.Artifact; 27 28 33 public class ConfigurationInfo implements Serializable { 34 private static final long serialVersionUID = -16555213664245560L; 35 private final AbstractName storeName; 36 private final Artifact configID; 37 private final ConfigurationModuleType type; 38 private final long created; 39 private final File inPlaceLocation; 40 private final Set ownedConfigurations = new LinkedHashSet (); 41 private final Set childConfigurations = new LinkedHashSet (); 42 private final State state; 43 private final Artifact parentID; 44 45 public ConfigurationInfo(AbstractName storeName, Artifact configID, ConfigurationModuleType type, long created, Set ownedConfigurations, Set childConfigurations, File inPlaceLocation) { 46 this(storeName, configID, type, created, ownedConfigurations, childConfigurations, inPlaceLocation, null, null); 47 } 48 49 public ConfigurationInfo(AbstractName storeName, Artifact configID, ConfigurationModuleType type, long created, Set ownedConfigurations, Set childConfigurations, File inPlaceLocation, State state) { 50 this(storeName, configID, type, created, ownedConfigurations, childConfigurations, inPlaceLocation, state, null); 51 } 52 53 public ConfigurationInfo(AbstractName storeName, Artifact configID, ConfigurationModuleType type, long created, Set ownedConfigurations, Set childConfigurations, File inPlaceLocation, State state, Artifact parentID) { 54 this.storeName = storeName; 55 this.configID = configID; 56 this.type = type; 57 this.created = created; 58 this.inPlaceLocation = inPlaceLocation; 59 if (ownedConfigurations != null) { 60 this.ownedConfigurations.addAll(ownedConfigurations); 61 } 62 if (childConfigurations != null) { 63 this.childConfigurations.addAll(childConfigurations); 64 } 65 this.state = state; 66 this.parentID = parentID; 67 } 68 69 public AbstractName getStoreName() { 70 return storeName; 71 } 72 73 public Artifact getConfigID() { 74 return configID; 75 } 76 77 public ConfigurationModuleType getType() { 78 return type; 79 } 80 81 public long getCreated() { 82 return created; 83 } 84 85 public File getInPlaceLocation() { 86 return inPlaceLocation; 87 } 88 89 public Set getOwnedConfigurations() { 90 return ownedConfigurations; 91 } 92 93 public Set getChildConfigurations() { 94 return childConfigurations; 95 } 96 97 public State getState() { 98 return state; 99 } 100 101 public Artifact getParentID() { 102 return parentID; 103 } 104 } 105 | Popular Tags |