KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openbravo > xmlEngine > ParameterTemplate


1 /*
2  ************************************************************************************
3  * Copyright (C) 2001-2006 Openbravo S.L.
4  * Licensed under the Apache Software License version 2.0
5  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6  * Unless required by applicable law or agreed to in writing, software distributed
7  * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
8  * CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations under the License.
10  ************************************************************************************
11 */

12 package org.openbravo.xmlEngine;
13
14 import java.util.Vector JavaDoc;
15
16 class ParameterTemplate implements XmlComponentTemplate, IDComponent {
17   String JavaDoc strName = null;
18   int type;
19   String JavaDoc strDefault = null;
20   String JavaDoc section = null;
21   XmlComponentTemplate xmlComponentTemplate = null;
22   Vector JavaDoc<ReplaceElement> vecReplace = null;
23
24   public int type() {
25     return PARAMETER;
26   }
27
28
29   public ParameterValue createParameterValue(XmlDocument xmlDocument) {
30     ParameterValue parameterValue = xmlDocument.hasParameterValue.get(strName);
31     if (parameterValue == null) parameterValue = new ParameterValue(this, xmlDocument);
32     return parameterValue;
33   }
34   public XmlComponentValue createXmlComponentValue(XmlDocument xmlDocument) {
35     return createParameterValue(xmlDocument);
36   }
37
38 }
39
Popular Tags