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 */ 017package org.apache.wicket.request; 018 019import java.util.List; 020import java.util.Set; 021 022import org.apache.wicket.util.string.StringValue; 023 024/** 025 * Represents request parameters. 026 * 027 * @author Matej Knopp 028 */ 029public interface IRequestParameters 030{ 031 /** 032 * Returns immutable set of all available parameter names. 033 * 034 * @return list of parameter names 035 */ 036 Set<String> getParameterNames(); 037 038 /** 039 * Returns single value for parameter with specified name. This method always returns non-null 040 * result even if the parameter does not exist. 041 * 042 * @see StringValue#isNull() 043 * 044 * @param name 045 * parameter name 046 * @return {@link StringValue} wrapping the actual value 047 */ 048 StringValue getParameterValue(String name); 049 050 /** 051 * Returns list of values for parameter with specified name. If the parameter does not exist 052 * this method returns <code>null</code> 053 * 054 * @param name 055 * parameter name 056 * @return list of all values for given parameter or <code>null</code> if parameter does not 057 * exist 058 */ 059 List<StringValue> getParameterValues(String name); 060}