KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.apache.geronimo.kernel.repository.Artifact;
20
21 import java.io.IOException JavaDoc;
22 import java.util.List JavaDoc;
23
24 /**
25  *
26  *
27  *
28  * @version $Rev: 486815 $ $Date: 2006-12-13 14:45:10 -0500 (Wed, 13 Dec 2006) $
29  */

30 public interface PersistentConfigurationList {
31
32     static final String JavaDoc PERSISTENT_CONFIGURATION_LIST = "PersistentConfigurationList";
33     
34     boolean isKernelFullyStarted();
35
36     void setKernelFullyStarted(boolean kernelFullyStarted);
37
38     void save() throws IOException JavaDoc;
39
40     List JavaDoc restore() throws IOException JavaDoc;
41
42     /**
43      * Adds a configuration to the list, but does not mark it as started.
44      */

45     void addConfiguration(Artifact configName);
46
47     /**
48      * Indicates that the configuration should be started when the server is
49      * started. The configuration should have been previously added with
50      * addConfiguration.
51      */

52     void startConfiguration(Artifact configName);
53
54     /**
55      * Indicates that the configuration should not be started when the
56      * server is started. The configuration should have been previously added
57      * with addConfiguration (and presumably started with startConfiguration).
58      */

59     void stopConfiguration(Artifact configName);
60
61     /**
62      * Removes all record of the specified configuration from the configuration
63      * list. This is somewhat unusual -- normally you want to remember the
64      * settings in case the configuration is deployed again later.
65      */

66     void removeConfiguration(Artifact configName);
67
68     /**
69      * Gets all configurations in the list matching the specified query,
70      * whether they are marked at starting or not.
71      *
72      * @param query The artifact to search for, normally not fully resolved
73      * so there may be multiple matches or matches that are not
74      * exactly equal to the argument.
75      *
76      * @return The matching artifacts that have data in the config list.
77      */

78     Artifact[] getListedConfigurations(Artifact query);
79
80     /**
81      * Migrates settings from an old version of a configuration to a newer
82      * version of the configuration. Used when an updated version is deployed
83      * with a newer version number in the name, but the settings used for the
84      * previous version should be carried forward.
85      *
86      * @param oldName The name that the existing settings are under
87      * @param newName The name to move the settings to
88      * @param configuration The configuration itself, which can be used to
89      * verify that all the settings are still valid as
90      * they are migrated.
91      */

92     void migrateConfiguration(Artifact oldName, Artifact newName, Configuration configuration);
93
94     /**
95      * This method checks if there are any custom gbean attributes in the configuration.
96      *
97      * @param configName Name of the configuration
98      * @return true if the configuration contains any custom gbean attributes
99      */

100     boolean hasGBeanAttributes(Artifact configName);
101 }
102
Popular Tags