View Javadoc
1   package org.apache.turbine.services.urlmapper.model;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.List;
23  
24  /*
25   * Licensed to the Apache Software Foundation (ASF) under one
26   * or more contributor license agreements.  See the NOTICE file
27   * distributed with this work for additional information
28   * regarding copyright ownership.  The ASF licenses this file
29   * to you under the Apache License, Version 2.0 (the
30   * "License"); you may not use this file except in compliance
31   * with the License.  You may obtain a copy of the License at
32   *
33   *   http://www.apache.org/licenses/LICENSE-2.0
34   *
35   * Unless required by applicable law or agreed to in writing,
36   * software distributed under the License is distributed on an
37   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
38   * KIND, either express or implied.  See the License for the
39   * specific language governing permissions and limitations
40   * under the License.
41   */
42  
43  import javax.xml.bind.annotation.XmlAccessType;
44  import javax.xml.bind.annotation.XmlAccessorType;
45  import javax.xml.bind.annotation.XmlAttribute;
46  import javax.xml.bind.annotation.XmlElement;
47  import javax.xml.bind.annotation.XmlValue;
48  
49  /**
50   * A JAXB Class for holding a list of entries with key (in an attribute) and a value.
51   *
52   * @author <a href="mailto:tv@apache.org">Thomas Vandahl</a>
53   */
54  @XmlAccessorType(XmlAccessType.NONE)
55  public class XmlParameterList
56  {
57      public static class XmlParameter
58      {
59          @XmlAttribute
60          public String key;
61  
62          @XmlValue
63          public String value;
64  
65          /**
66           * Default Constructor
67           */
68          public XmlParameter()
69          {
70              // empty
71          }
72  
73          /**
74           * Constructor
75           *
76           * @param key the key
77           * @param value the value
78           */
79          public XmlParameter(String key, String value)
80          {
81              this.key = key;
82              this.value = value;
83          }
84      }
85  
86      private List<XmlParameter> xmlParameters;
87  
88      /**
89       * Get the list of XmlParameters
90       *
91       * @return the xmlParameters
92       */
93      @XmlElement(name="parameter")
94      public List<XmlParameter> getXmlParameters()
95      {
96          return xmlParameters;
97      }
98  
99      /**
100      * Set a list of XmlParameters
101      *
102      * @param xmlParameters the xmlParameters to set
103      */
104     public void setXmlParameters(List<XmlParameter> xmlParameters)
105     {
106         this.xmlParameters = xmlParameters;
107     }
108 }