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: *
17: */
18:
19: package org.apache.lenya.config.impl;
20:
21: import java.io.FileInputStream;
22: import java.util.Enumeration;
23: import java.util.Properties;
24: import java.util.Vector;
25:
26: import org.apache.lenya.config.core.Configuration;
27: import org.apache.lenya.config.core.Parameter;
28: import org.apache.lenya.config.core.PropertiesConfiguration;
29:
30: /**
31: * Build Properties Configuration
32: */
33: public class BuildPropertiesConfiguration extends
34: PropertiesConfiguration {
35:
36: /**
37: *
38: */
39: public String getVersionDefault() {
40: return getParameter("build.properties.version")
41: .getDefaultValue();
42: }
43:
44: /**
45: *
46: */
47: public String getVersionLocal() {
48: return getParameter("build.properties.version").getLocalValue();
49: }
50:
51: /**
52: *
53: */
54: public Parameter[] getConfigurableParameters() {
55: Parameter[] p = new Parameter[6];
56:
57: p[0] = getParameter("cocoon.src.dir");
58: p[1] = getParameter("pubs.root.dirs");
59: p[2] = getParameter("modules.root.dirs");
60:
61: p[3] = new ServerParameter();
62: p[3].setName(getParameter("web.app.server").getName());
63: p[3].setDefaultValue(getParameter("web.app.server")
64: .getDefaultValue());
65: p[3].setLocalValue(getParameter("web.app.server")
66: .getLocalValue());
67:
68: p[4] = getParameter("enable.uploads");
69: p[5] = getParameter("lenya.revision");
70: return p;
71: }
72: }
|