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: */package org.apache.geronimo.kernel.config;
017:
018: import java.io.Serializable;
019: import java.io.File;
020: import java.util.LinkedHashSet;
021: import java.util.Set;
022:
023: import org.apache.geronimo.gbean.AbstractName;
024: import org.apache.geronimo.kernel.management.State;
025: import org.apache.geronimo.kernel.repository.Artifact;
026:
027: /**
028: *
029: *
030: * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
031: */
032: public class ConfigurationInfo implements Serializable {
033: private static final long serialVersionUID = -16555213664245560L;
034: private final AbstractName storeName;
035: private final Artifact configID;
036: private final ConfigurationModuleType type;
037: private final long created;
038: private final File inPlaceLocation;
039: private final Set ownedConfigurations = new LinkedHashSet();
040: private final Set childConfigurations = new LinkedHashSet();
041: private final State state;
042: private final Artifact parentID;
043:
044: public ConfigurationInfo(AbstractName storeName, Artifact configID,
045: ConfigurationModuleType type, long created,
046: Set ownedConfigurations, Set childConfigurations,
047: File inPlaceLocation) {
048: this (storeName, configID, type, created, ownedConfigurations,
049: childConfigurations, inPlaceLocation, null, null);
050: }
051:
052: public ConfigurationInfo(AbstractName storeName, Artifact configID,
053: ConfigurationModuleType type, long created,
054: Set ownedConfigurations, Set childConfigurations,
055: File inPlaceLocation, State state) {
056: this (storeName, configID, type, created, ownedConfigurations,
057: childConfigurations, inPlaceLocation, state, null);
058: }
059:
060: public ConfigurationInfo(AbstractName storeName, Artifact configID,
061: ConfigurationModuleType type, long created,
062: Set ownedConfigurations, Set childConfigurations,
063: File inPlaceLocation, State state, Artifact parentID) {
064: this .storeName = storeName;
065: this .configID = configID;
066: this .type = type;
067: this .created = created;
068: this .inPlaceLocation = inPlaceLocation;
069: if (ownedConfigurations != null) {
070: this .ownedConfigurations.addAll(ownedConfigurations);
071: }
072: if (childConfigurations != null) {
073: this .childConfigurations.addAll(childConfigurations);
074: }
075: this .state = state;
076: this .parentID = parentID;
077: }
078:
079: public AbstractName getStoreName() {
080: return storeName;
081: }
082:
083: public Artifact getConfigID() {
084: return configID;
085: }
086:
087: public ConfigurationModuleType getType() {
088: return type;
089: }
090:
091: public long getCreated() {
092: return created;
093: }
094:
095: public File getInPlaceLocation() {
096: return inPlaceLocation;
097: }
098:
099: public Set getOwnedConfigurations() {
100: return ownedConfigurations;
101: }
102:
103: public Set getChildConfigurations() {
104: return childConfigurations;
105: }
106:
107: public State getState() {
108: return state;
109: }
110:
111: public Artifact getParentID() {
112: return parentID;
113: }
114: }
|