KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > definition > ModuleDefinition


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

15 package org.apache.hivemind.definition;
16
17 import java.util.Collection JavaDoc;
18
19 import org.apache.hivemind.ClassResolver;
20 import org.apache.hivemind.Location;
21
22 /**
23  * Defines a module of a {@link RegistryDefinition}.
24  * A module has its own namespace in which configuration points and service
25  * points are defined.
26  * It can provide extension to extension points in other modules.
27  *
28  * @author Huegen
29  */

30 public interface ModuleDefinition
31 {
32     /**
33      * @return the id of the module. It can contain dots.
34      */

35     public String JavaDoc getId();
36     
37     /**
38      * @return the {@link ClassResolver} used to resolve all classes referenced from
39      * elements inside this module.
40      */

41     public ClassResolver getClassResolver();
42
43     /**
44      * @return the location of the module
45      */

46     public Location getLocation();
47
48     /**
49      * Returns the name of the package to search for class names within. By default, the package
50      * name will match the module id.
51      */

52     public String JavaDoc getPackageName();
53
54     /**
55      * Returns a service point that is identified by its id.
56      * @param id the service point id (unqualified, without module id)
57      * @return the service point definition
58      */

59     public ServicePointDefinition getServicePoint(String JavaDoc id);
60
61     /**
62      * @return all {@link ServicePointDefinition service points} defined in this module
63      */

64     public Collection JavaDoc getServicePoints();
65
66     /**
67      * Returns a configuration point that is identified by its id.
68      * @param id the configuration point id (unqualified, without module id)
69      * @return the configuration point definition
70      */

71     public ConfigurationPointDefinition getConfigurationPoint(String JavaDoc id);
72
73     /**
74      * @return all {@link ConfigurationPointDefinition configuration points} defined in this module
75      */

76     public Collection JavaDoc getConfigurationPoints();
77
78     /**
79      * @return the ids of all modules this module depends on
80      */

81     public Collection JavaDoc getDependencies();
82     
83     /**
84      * @return all {@link ImplementationDefinition implementations} contained in this module
85      */

86     public Collection JavaDoc getImplementations();
87
88     /**
89      * @return all {@link InterceptorDefinition interceptors} contained in this module
90      */

91     public Collection JavaDoc getInterceptors();
92
93     /**
94      * @return all {@link ContributionDefinition contributions} contained in this module.
95      */

96     public Collection JavaDoc getContributions();
97
98     /**
99      * @return all {@link ConfigurationParserDefinition parsers} contained in this module
100      */

101     public Collection JavaDoc getConfigurationParsers();
102
103 }
Popular Tags