Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
CollectionBasedModule |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.module.beans; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | /** | |
20 | * A module based on collection choose. If a module implements this interface, the core will display | |
21 | * a collection choose view and after the choose of the collection, the plugCollection method is called. | |
22 | * | |
23 | * @author Baptiste Wicht | |
24 | */ | |
25 | public interface CollectionBasedModule { | |
26 | /** | |
27 | * Plug a collection. This method must only make the choose collection process and return the | |
28 | * result of the choose. This method must not expensive cost process launch. All the | |
29 | * module loading treatments must be made in the plugCollection() method. | |
30 | * | |
31 | * @param collection The collection to use. | |
32 | * @param password The entered password. | |
33 | * @param create Indicate if we must create the collection or only select it. | |
34 | * @return true if the collection choose process has been good processed. | |
35 | */ | |
36 | boolean chooseCollection(String collection, String password, boolean create); | |
37 | ||
38 | /** | |
39 | * Plug the module after the collection choose. This method can expensive cost operations execute. | |
40 | * During this method, the view will not be blocked. | |
41 | */ | |
42 | void plugCollection(); | |
43 | } |