KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > test > TestComponentImpl


1 package org.apache.turbine.test;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License")
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
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.logger.AbstractLogEnabled;
20 import org.apache.avalon.framework.activity.Initializable;
21 import org.apache.avalon.framework.activity.Disposable;
22 import org.apache.avalon.framework.context.Contextualizable;
23 import org.apache.avalon.framework.context.Context;
24 import org.apache.avalon.framework.context.ContextException;
25
26 /**
27  * Implementation of the test component.
28  *
29  * @author <a HREF="mailto:quintonm@bellsouth.net">Quinton McCombs</a>
30  * @version $Id: TestComponentImpl.java,v 1.4.2.2 2004/05/20 03:33:12 seade Exp $
31  */

32 public class TestComponentImpl
33         extends AbstractLogEnabled
34         implements Initializable, Disposable, TestComponent, Contextualizable
35 {
36     private String JavaDoc appRoot;
37
38     public void initialize() throws Exception JavaDoc
39     {
40     }
41
42     public void dispose()
43     {
44     }
45
46     public void test()
47     {
48         setupLogger(this, "TestComponent");
49         getLogger().debug("test");
50         getLogger().debug("componentAppRoot = "+appRoot);
51     }
52
53     public void contextualize(Context context) throws ContextException
54     {
55         appRoot = (String JavaDoc) context.get("componentAppRoot");
56     }
57 }
58
Popular Tags