01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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 implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.geronimo.system.serverinfo;
17:
18: import java.io.File;
19: import java.net.URI;
20:
21: /**
22: * Contains information about the server and functions for resolving
23: * pathnames.
24: *
25: * @version $Rev: 476049 $ $Date: 2006-11-16 20:35:17 -0800 (Thu, 16 Nov 2006) $
26: */
27: public interface ServerInfo {
28: public String resolvePath(final String filename);
29:
30: public String resolveServerPath(final String filename);
31:
32: /**
33: * Resolves a relative pathname to a File, relative to the server
34: * installation directory (e.g. "foo" becomes .../geronimo/foo)
35: *
36: * @param filename a <code>String</code> containing a pathname,
37: * which will be resolved by {@link #resolvePath(String
38: * filename)}.
39: * @return a <code>File</code> value
40: */
41: public File resolve(final String filename);
42:
43: /**
44: * Resolves a relative pathname to a File, relative to the server
45: * configuration directory. Normally, this is the same as the Geronimo
46: * installation directory (e.g. "foo" becomes .../geronimo/foo).
47: * However, you can pass command-line arguments to the server to relocate
48: * this to a server-instance-specific directory (e.g. "var/foo" might
49: * become .../geronimo/instance1/var/foo if the server was started with
50: * the flag indicating that the server instance dir was "instance1").
51: */
52: public File resolveServer(final String filename);
53:
54: public URI resolve(final URI uri);
55:
56: public URI resolveServer(final URI uri);
57:
58: /**
59: * A config.xml setting for the base directory. This is normally
60: * left null, which means the ServerInfo will use the Geronimo
61: * install directory.
62: */
63: public String getBaseDirectory();
64:
65: /**
66: * The base directory that this ServerInfo is actually using.
67: */
68: public String getCurrentBaseDirectory();
69:
70: public String getVersion();
71:
72: public String getBuildDate();
73:
74: public String getBuildTime();
75:
76: public String getCopyright();
77: }
|