001package org.apache.turbine.services.urlmapper.model; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import java.util.List; 023 024/* 025 * Licensed to the Apache Software Foundation (ASF) under one 026 * or more contributor license agreements. See the NOTICE file 027 * distributed with this work for additional information 028 * regarding copyright ownership. The ASF licenses this file 029 * to you under the Apache License, Version 2.0 (the 030 * "License"); you may not use this file except in compliance 031 * with the License. You may obtain a copy of the License at 032 * 033 * http://www.apache.org/licenses/LICENSE-2.0 034 * 035 * Unless required by applicable law or agreed to in writing, 036 * software distributed under the License is distributed on an 037 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 038 * KIND, either express or implied. See the License for the 039 * specific language governing permissions and limitations 040 * under the License. 041 */ 042 043import javax.xml.bind.annotation.XmlAccessType; 044import javax.xml.bind.annotation.XmlAccessorType; 045import javax.xml.bind.annotation.XmlAttribute; 046import javax.xml.bind.annotation.XmlElement; 047import javax.xml.bind.annotation.XmlValue; 048 049/** 050 * A JAXB Class for holding a list of entries with key (in an attribute) and a value. 051 * 052 * @author <a href="mailto:tv@apache.org">Thomas Vandahl</a> 053 */ 054@XmlAccessorType(XmlAccessType.NONE) 055public class XmlParameterList 056{ 057 public static class XmlParameter 058 { 059 @XmlAttribute 060 public String key; 061 062 @XmlValue 063 public String value; 064 065 /** 066 * Default Constructor 067 */ 068 public XmlParameter() 069 { 070 // empty 071 } 072 073 /** 074 * Constructor 075 * 076 * @param key the key 077 * @param value the value 078 */ 079 public XmlParameter(String key, String value) 080 { 081 this.key = key; 082 this.value = value; 083 } 084 } 085 086 private List<XmlParameter> xmlParameters; 087 088 /** 089 * Get the list of XmlParameters 090 * 091 * @return the xmlParameters 092 */ 093 @XmlElement(name="parameter") 094 public List<XmlParameter> getXmlParameters() 095 { 096 return xmlParameters; 097 } 098 099 /** 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}