KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > jbi > management > systemstate > SystemState


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: SystemState.java 154 28 avr. 2006 ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.jbi.management.systemstate;
23
24 import java.util.List JavaDoc;
25
26 import org.objectweb.petals.jbi.management.service.ManagementException;
27
28 /**
29  * Allows to persist, update, delete and recover component, shared lib and
30  * service assembly state
31  *
32  * @author Olivier Fabre - EBM Websourcing
33  *
34  */

35 public interface SystemState {
36
37     /**
38      * Create an entry in the state holder xml file that keep component
39      * information (state, install and zip root...)
40      *
41      * @param componentName
42      * @param installURL
43      * @param zipURL
44      * @param installState
45      * @param lifecycleState
46      * @return
47      */

48     ComponentState createComponentStateHolder(String JavaDoc componentName,
49             String JavaDoc installURL, String JavaDoc zipURL, String JavaDoc installState,
50             String JavaDoc lifecycleState) throws Exception JavaDoc;
51
52     /**
53      * Create an entry in the state holder xml file that keep service assembly
54      * information (state, install and zip root...)
55      *
56      * @param saName
57      * @param installURL
58      * @param zipURL
59      * @param lifecycleState
60      * @return
61      */

62     ServiceAssemblyState createServiceAssemblyStateHolder(String JavaDoc saName,
63             String JavaDoc installURL, String JavaDoc zipURL, String JavaDoc lifecycleState)
64         throws Exception JavaDoc;
65
66     /**
67      * Create an entry in the state holder xml file that keep shared lib
68      * information (state, install and zip root...)
69      *
70      * @param slName
71      * @param installURL
72      * @param zipURL
73      * @return
74      */

75     SharedLibraryState createSharedLibraryStateHolder(String JavaDoc slName,
76             String JavaDoc installURL, String JavaDoc zipURL) throws Exception JavaDoc;
77
78     /**
79      * Delete a component entry in the state holder xml file
80      *
81      * @param componentName
82      * @return
83      */

84     ComponentState deleteComponentStateHolder(String JavaDoc componentName)
85         throws Exception JavaDoc;
86
87     /**
88      * Delete a service assembly entry in the state holder xml file
89      *
90      * @param saName
91      * @return
92      */

93     ServiceAssemblyState deleteServiceAssemblyStateHolder(String JavaDoc saName)
94         throws Exception JavaDoc;
95
96     /**
97      * Delete a shared library entry in the state holder xml file
98      *
99      * @param slName
100      * @return
101      */

102     SharedLibraryState deleteSharedLibraryStateHolder(String JavaDoc slName)
103         throws Exception JavaDoc;
104
105     /**
106      * Recovers all component
107      *
108      * @return true if retrieval is correctly performed, false otherwise
109      */

110     boolean recoverAllComponent() throws ManagementException;
111
112     /**
113      * Recover all petals recoverable entities (component, shared lib and
114      * service assemblies)
115      *
116      * @return true if all recovers are ok, false otherwise
117      * @throws ManagementException
118      */

119     boolean recoverAllEntities() throws ManagementException;
120
121     /**
122      * Recovers all service assembly
123      *
124      * @return true if retrieval is correctly performed, false otherwise
125      */

126     boolean recoverAllServiceAssembly() throws ManagementException;
127
128     /**
129      * Recovers all shared library
130      *
131      * @return true if retrieval is correctly performed, false otherwise
132      */

133     boolean recoverAllSharedLibrary() throws ManagementException;
134
135     List JavaDoc<ComponentState> retrieveAllComponentStates();
136
137     List JavaDoc<ServiceAssemblyState> retrieveAllServiceAssemblyStates();
138
139     List JavaDoc<SharedLibraryState> retrieveAllSharedLibraryStates();
140
141     /**
142      * Update the given component installation state information
143      *
144      * @param componentName
145      * @param installState
146      */

147     void updateComponentInstallationState(String JavaDoc componentName,
148             String JavaDoc installState) throws Exception JavaDoc;
149
150     /**
151      * Update the given component lifecycle state information
152      *
153      * @param componentName
154      * @param lifecycleState
155      */

156     void updateComponentLifeCycleState(String JavaDoc componentName,
157             String JavaDoc lifecycleState) throws Exception JavaDoc;
158
159     /**
160      * Update the given service assembly state information
161      *
162      * @param saName
163      * @param lifecycleState
164      */

165     void updateServiceAssemblyState(String JavaDoc saName, String JavaDoc lifecycleState)
166         throws Exception JavaDoc;
167
168 }
169
Popular Tags