1 /* 2 * Copyright 2002-2005 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.springframework.beans.support; 18 19 import java.util.List; 20 import java.util.Locale; 21 22 /** 23 * Callback that provides the source for a reloadable List. 24 * Used by RefreshablePagedListHolder. 25 * 26 * @author Jean-Pierre PAWLAK 27 * @author Juergen Hoeller 28 * @see org.springframework.beans.support.RefreshablePagedListHolder#setSourceProvider 29 */ 30 public interface PagedListSourceProvider { 31 32 /** 33 * Load the List for the given Locale and filter settings. 34 * The filter object can be of any custom class, preferably a bean 35 * for easy data binding from a request. An instance will simply 36 * get passed through to this callback method. 37 * @param locale Locale that the List should be loaded for, 38 * or <code>null</code> if not locale-specific 39 * @param filter object representing filter settings, 40 * or <code>null</code> if no filter options are used 41 * @return the loaded List 42 * @see org.springframework.beans.support.RefreshablePagedListHolder#setLocale 43 * @see org.springframework.beans.support.RefreshablePagedListHolder#setFilter 44 */ 45 public List loadList(Locale locale, Object filter); 46 47 } 48