01: package org.apache.turbine.services.avaloncomponent;
02:
03: /*
04: * Copyright 2001-2005 The Apache Software Foundation.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License")
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
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 extends Service {
32: /** The publically visible name of the service */
33: String SERVICE_NAME = "AvalonComponentService";
34:
35: /** Where we write the Avalon Logger messages */
36: String AVALON_LOG_CATEGORY = "avalon";
37:
38: /** property specifing file name of the component config file */
39: String COMPONENT_CONFIG_KEY = "componentConfiguration";
40:
41: /** property specifing file name of the component config file */
42: String COMPONENT_CONFIG_VALUE = "/WEB-INF/conf/componentConfiguration.xml";
43:
44: /** property specifing file name of the component role file */
45: String COMPONENT_ROLE_KEY = "componentRoles";
46:
47: /** property specifing file name of the component role file */
48: String COMPONENT_ROLE_VALUE = "/WEB-INF/conf/roleConfiguration.xml";
49:
50: /** property for the Components to look up */
51: String COMPONENT_LOOKUP_KEY = "lookup";
52:
53: /** Key used in the context for defining the application root */
54: String COMPONENT_APP_ROOT = "componentAppRoot";
55:
56: /**
57: * Returns an instance of the named component
58: *
59: * @param roleName Name of the role the component fills.
60: * @return an instance of the named component
61: * @throws ComponentException generic exception
62: */
63: Component lookup(String roleName) throws ComponentException;
64:
65: /**
66: * Releases the component
67: *
68: * @param component the component to release
69: */
70: void release(Component component);
71:
72: }
|