01: // Copyright 2006, 2007 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // 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.tapestry.ioc.def;
16:
17: import java.util.Set;
18:
19: import org.apache.commons.logging.Log;
20:
21: /**
22: * Defines the contents of a module. In the default case, this is information about the services
23: * provided by the module builder class.
24: */
25: public interface ModuleDef {
26: /** Returns the ids of the services built/provided by the module. */
27: Set<String> getServiceIds();
28:
29: /**
30: * Returns a service definition via the service's id.
31: *
32: * @param serviceId
33: * the id of the service to retrieve
34: * @return service definition or null if it doesn't exist
35: */
36: ServiceDef getServiceDef(String serviceId);
37:
38: /**
39: * Returns all the decorator definitions built/provided by this module.
40: */
41: Set<DecoratorDef> getDecoratorDefs();
42:
43: /**
44: * Returns all the contribution definitions built/provided by this module.
45: */
46: Set<ContributionDef> getContributionDefs();
47:
48: /**
49: * Returns the class that will be instantiated. Annotated instance methods of this class are
50: * invoked to build services, to decorate/intercept services, and make contributions to other
51: * services.
52: */
53: Class getBuilderClass();
54:
55: /**
56: * Returns the name used to create a {@link Log} instance. This is typically the builder class
57: * name.
58: */
59: String getLogName();
60: }
|