KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > geronimo > kernel > config > ConfigurationInfo


1 /**
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.geronimo.kernel.config;
18
19 import java.io.Serializable JavaDoc;
20 import java.io.File JavaDoc;
21 import java.util.LinkedHashSet JavaDoc;
22 import java.util.Set JavaDoc;
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 /**
29  *
30  *
31  * @version $Rev: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $
32  */

33 public class ConfigurationInfo implements Serializable JavaDoc {
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 JavaDoc inPlaceLocation;
40     private final Set JavaDoc ownedConfigurations = new LinkedHashSet JavaDoc();
41     private final Set JavaDoc childConfigurations = new LinkedHashSet JavaDoc();
42     private final State state;
43     private final Artifact parentID;
44
45     public ConfigurationInfo(AbstractName storeName, Artifact configID, ConfigurationModuleType type, long created, Set JavaDoc ownedConfigurations, Set JavaDoc childConfigurations, File JavaDoc 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 JavaDoc ownedConfigurations, Set JavaDoc childConfigurations, File JavaDoc 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 JavaDoc ownedConfigurations, Set JavaDoc childConfigurations, File JavaDoc 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 JavaDoc getInPlaceLocation() {
86         return inPlaceLocation;
87     }
88
89     public Set JavaDoc getOwnedConfigurations() {
90         return ownedConfigurations;
91     }
92
93     public Set JavaDoc 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