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.openejb.jee;
17:
18: import javax.xml.bind.annotation.XmlAccessType;
19: import javax.xml.bind.annotation.XmlAccessorType;
20: import javax.xml.bind.annotation.XmlAttribute;
21: import javax.xml.bind.annotation.XmlElement;
22: import javax.xml.bind.annotation.XmlID;
23: import javax.xml.bind.annotation.XmlType;
24: import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
25: import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
26: import java.util.ArrayList;
27: import java.util.List;
28:
29: /**
30: * The config-propertyType contains a declaration of a single
31: * configuration property that may be used for providing
32: * configuration information.
33: * <p/>
34: * The declaration consists of an optional description, name,
35: * type and an optional value of the configuration property. If
36: * the resource adapter provider does not specify a value than
37: * the deployer is responsible for providing a valid value for
38: * a configuration property.
39: * <p/>
40: * Any bounds or well-defined values of properties should be
41: * described in the description element.
42: */
43: @XmlAccessorType(XmlAccessType.FIELD)
44: @XmlType(name="config-propertyType",propOrder={"description","configPropertyName","configPropertyType","configPropertyValue"})
45: public class ConfigProperty {
46:
47: protected List<Text> description;
48: @XmlElement(name="config-property-name",required=true)
49: protected String configPropertyName;
50: @XmlElement(name="config-property-type",required=true)
51: protected String configPropertyType;
52: @XmlElement(name="config-property-value")
53: protected String configPropertyValue;
54: @XmlAttribute
55: @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
56: @XmlID
57: protected String id;
58:
59: public List<Text> getDescription() {
60: if (description == null) {
61: description = new ArrayList<Text>();
62: }
63: return this .description;
64: }
65:
66: public String getConfigPropertyName() {
67: return configPropertyName;
68: }
69:
70: public void setConfigPropertyName(String value) {
71: this .configPropertyName = value;
72: }
73:
74: public String getConfigPropertyType() {
75: return configPropertyType;
76: }
77:
78: public void setConfigPropertyType(String value) {
79: this .configPropertyType = value;
80: }
81:
82: public String getConfigPropertyValue() {
83: return configPropertyValue;
84: }
85:
86: public void setConfigPropertyValue(String value) {
87: this .configPropertyValue = value;
88: }
89:
90: public String getId() {
91: return id;
92: }
93:
94: public void setId(String value) {
95: this.id = value;
96: }
97:
98: }
|