KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > james > context > AvalonContextConstants


1 /***********************************************************************
2  * Copyright (c) 2000-2004 The Apache Software Foundation. *
3  * All rights reserved. *
4  * ------------------------------------------------------------------- *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you *
6  * may not use this file except in compliance with the License. You *
7  * may obtain a copy of the License at: *
8  * *
9  * http://www.apache.org/licenses/LICENSE-2.0 *
10  * *
11  * Unless required by applicable law or agreed to in writing, software *
12  * distributed under the License is distributed on an "AS IS" BASIS, *
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or *
14  * implied. See the License for the specific language governing *
15  * permissions and limitations under the License. *
16  ***********************************************************************/

17
18 package org.apache.james.context;
19
20 /**
21  * This class is a placeholder for Avalon Context keys.
22  *
23  * In order to decouple James from Phoenix, and to allow James
24  * to run in any Avalon Framework container it is necessary that
25  * James not depend on the BlockContext class from Phoenix, but
26  * rather only on the Context interface. This requires that we
27  * look up context values directly, using String keys. This
28  * class stores the String keys that are used by James to
29  * look up context values.
30  *
31  * The lifetime of this class is expected to be limited. At some
32  * point in the near future the Avalon folks will make a decision
33  * about how exactly to define, describe, and publish context
34  * values. At that point we can replace this temporary mechanism
35  * with the Avalon mechanism. Unfortunately right now that decision
36  * is still unmade, so we need to use this class as a temporary
37  * solution.
38  */

39 public class AvalonContextConstants {
40
41     /**
42      * Private constructor to prevent instantiation or subclassing
43      */

44     private AvalonContextConstants() {}
45
46     /**
47      * The context key associated with the home directory of the application
48      * being run. The object returned on a
49      * context.get(AvalonContextConstants.APPLICATION_HOME) should be of
50      * type <code>java.io.File</code> and should be the home directory
51      * for the application (in our case, James)
52      */

53     public static final String JavaDoc APPLICATION_HOME = "app.home";
54 }
55
Popular Tags