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.extensions.markup.html.repeater.data.table.export; 018 019import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; 020import org.apache.wicket.model.IModel; 021 022/** 023 * An {@link IColumn} that can be exported. {@link IExportableColumn}s provide methods for retrieving the data 024 * displayed by this column in a row. This data is used by {@link IDataExporter}s to export data. 025 * 026 * @author Jesse Long 027 * @param <T> 028 * The type of each row in the table. 029 * @param <S> 030 * The type of the sort property of the table. 031 * @see IDataExporter 032 * @see ExportToolbar 033 */ 034public interface IExportableColumn<T, S> extends IColumn<T, S> 035{ 036 /** 037 * Returns an {@link IModel} of the data displayed by this column for the {@code rowModel} provided. 038 * 039 * @param rowModel 040 * An {@link IModel} of the row data. 041 * @return an {@link IModel} of the data displayed by this column for the {@code rowModel} provided. 042 */ 043 IModel<?> getDataModel(IModel<T> rowModel); 044 045 /** 046 * Returns a model of the column header. The content of this model is used as a heading for the column 047 * when it is exported. 048 * 049 * @return a model of the column header. 050 */ 051 IModel<String> getDisplayModel(); 052}