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