1 package org.apache.turbine.services.avaloncomponent;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.avalon.framework.component.Component;
20 import org.apache.avalon.framework.component.ComponentException;
21
22 import org.apache.turbine.services.Service;
23
24 /***
25 * This service allows access to avalon components.
26 *
27 * @author <a href="mailto:quintonm@bellsouth.net">Quinton McCombs</a>
28 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
29 * @version $Id: AvalonComponentService.java 264148 2005-08-29 14:21:04Z henning $
30 */
31 public interface AvalonComponentService
32 extends Service
33 {
34 /*** The publically visible name of the service */
35 String SERVICE_NAME = "AvalonComponentService";
36
37 /*** Where we write the Avalon Logger messages */
38 String AVALON_LOG_CATEGORY = "avalon";
39
40 /*** property specifing file name of the component config file */
41 String COMPONENT_CONFIG_KEY = "componentConfiguration";
42
43 /*** property specifing file name of the component config file */
44 String COMPONENT_CONFIG_VALUE = "/WEB-INF/conf/componentConfiguration.xml";
45
46 /*** property specifing file name of the component role file */
47 String COMPONENT_ROLE_KEY = "componentRoles";
48
49 /*** property specifing file name of the component role file */
50 String COMPONENT_ROLE_VALUE = "/WEB-INF/conf/roleConfiguration.xml";
51
52 /*** property for the Components to look up */
53 String COMPONENT_LOOKUP_KEY = "lookup";
54
55 /*** Key used in the context for defining the application root */
56 String COMPONENT_APP_ROOT = "componentAppRoot";
57
58 /***
59 * Returns an instance of the named component
60 *
61 * @param roleName Name of the role the component fills.
62 * @return an instance of the named component
63 * @throws ComponentException generic exception
64 */
65 Component lookup(String roleName)
66 throws ComponentException;
67
68 /***
69 * Releases the component
70 *
71 * @param component the component to release
72 */
73 void release(Component component);
74
75 }