001/* 002 * (C) Copyright 2010 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Anahide Tchertchian 018 */ 019 020package org.nuxeo.ecm.platform.query.api; 021 022import java.io.Serializable; 023import java.util.List; 024import java.util.Map; 025 026import org.nuxeo.ecm.core.api.SortInfo; 027 028/** 029 * Page provider descriptor interface handling all attributes common to a {@link PageProvider} generation. 030 * 031 * @author Anahide Tchertchian 032 * @since 5.4 033 */ 034public interface PageProviderDefinition extends Serializable { 035 036 String getName(); 037 038 /** 039 * @since 6.0 040 */ 041 void setName(String name); 042 043 boolean isEnabled(); 044 045 /** 046 * @since 5.6 047 */ 048 void setEnabled(boolean enabled); 049 050 Map<String, String> getProperties(); 051 052 String[] getQueryParameters(); 053 054 boolean getQuotePatternParameters(); 055 056 boolean getEscapePatternParameters(); 057 058 void setPattern(String pattern); 059 060 String getPattern(); 061 062 WhereClauseDefinition getWhereClause(); 063 064 /** 065 * Returns the search document type used for wher clause, aggregates and named parameters. 066 * 067 * @since 6.0 068 */ 069 String getSearchDocumentType(); 070 071 boolean isSortable(); 072 073 List<SortInfo> getSortInfos(); 074 075 String getSortInfosBinding(); 076 077 long getPageSize(); 078 079 String getPageSizeBinding(); 080 081 Long getMaxPageSize(); 082 083 /** 084 * Returns the list of page size options to present to users. 085 * <p> 086 * Uses an hardcoded list of values, and adds up the page provider initial page size to it. 087 * 088 * @since 7.3 089 */ 090 List<Long> getPageSizeOptions(); 091 092 /** 093 * @since 5.6 094 */ 095 PageProviderDefinition clone(); 096 097 /** 098 * @since 6.0 099 */ 100 List<AggregateDefinition> getAggregates(); 101 102 /** 103 * @since 7.4 104 */ 105 public boolean isUsageTrackingEnabled(); 106 107 /** 108 * @since 8.4 109 */ 110 List<QuickFilter> getQuickFilters(); 111 112}