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