1 /*****************************************************************
2 * Licensed to the Apache Software Foundation (ASF) under one *
3 * or more contributor license agreements. See the NOTICE file *
4 * distributed with this work for additional information *
5 * regarding copyright ownership. The ASF licenses this file *
6 * to you under the Apache License, Version 2.0 (the *
7 * "License"); you may not use this file except in compliance *
8 * with the License. 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, *
13 * software distributed under the License is distributed on an *
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
15 * KIND, either express or implied. See the License for the *
16 * specific language governing permissions and limitations *
17 * under the License. *
18 ****************************************************************/
19
20 package org.apache.james.context;
21
22 /***
23 * This class is a placeholder for Avalon Context keys.
24 *
25 * In order to decouple James from Phoenix, and to allow James
26 * to run in any Avalon Framework container it is necessary that
27 * James not depend on the BlockContext class from Phoenix, but
28 * rather only on the Context interface. This requires that we
29 * look up context values directly, using String keys. This
30 * class stores the String keys that are used by James to
31 * look up context values.
32 *
33 * The lifetime of this class is expected to be limited. At some
34 * point in the near future the Avalon folks will make a decision
35 * about how exactly to define, describe, and publish context
36 * values. At that point we can replace this temporary mechanism
37 * with the Avalon mechanism. Unfortunately right now that decision
38 * is still unmade, so we need to use this class as a temporary
39 * solution.
40 */
41 public class AvalonContextConstants {
42
43 /***
44 * Private constructor to prevent instantiation or subclassing
45 */
46 private AvalonContextConstants() {}
47
48 /***
49 * The context key associated with the home directory of the application
50 * being run. The object returned on a
51 * context.get(AvalonContextConstants.APPLICATION_HOME) should be of
52 * type <code>java.io.File</code> and should be the home directory
53 * for the application (in our case, James)
54 */
55 public static final String APPLICATION_HOME = "app.home";
56 }