01: /****************************************************************
02: * Licensed to the Apache Software Foundation (ASF) under one *
03: * or more contributor license agreements. See the NOTICE file *
04: * distributed with this work for additional information *
05: * regarding copyright ownership. The ASF licenses this file *
06: * to you under the Apache License, Version 2.0 (the *
07: * "License"); you may not use this file except in compliance *
08: * with the License. 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, *
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: ****************************************************************/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: /**
48: * The context key associated with the home directory of the application
49: * being run. The object returned on a
50: * context.get(AvalonContextConstants.APPLICATION_HOME) should be of
51: * type <code>java.io.File</code> and should be the home directory
52: * for the application (in our case, James)
53: */
54: public static final String APPLICATION_HOME = "app.home";
55: }
|