001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: *
017: */
018:
019: package org.apache.lenya.config.core;
020:
021: /**
022: * Parameter
023: */
024: public class Parameter {
025:
026: private String name;
027: private String defaultValue;
028: private String localValue;
029:
030: /**
031: *
032: */
033: public void setName(String name) {
034: this .name = name;
035: }
036:
037: /**
038: *
039: */
040: public String getName() {
041: return name;
042: }
043:
044: /**
045: *
046: */
047: public void setDefaultValue(String value) {
048: this .defaultValue = value;
049: }
050:
051: /**
052: *
053: */
054: public String getDefaultValue() {
055: return defaultValue;
056: }
057:
058: /**
059: *
060: */
061: public void setLocalValue(String value) {
062: this .localValue = value.trim();
063: }
064:
065: /**
066: *
067: */
068: public String getLocalValue() {
069: return localValue;
070: }
071:
072: /**
073: *
074: */
075: public boolean test(String value) {
076: // No tests are being executed!
077: return true;
078: }
079:
080: /**
081: *
082: */
083: public String[] getAvailableValues() {
084: return null;
085: }
086:
087: /**
088: *
089: */
090: public Parameter[] getSubsequentParameters(String value,
091: Configuration config) {
092: return null;
093: }
094:
095: /**
096: *
097: */
098: public String toString() {
099: return name + ":::" + defaultValue + ":::" + localValue;
100: }
101: }
|