001/*
002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Anahide Tchertchian
016 */
017
018package org.nuxeo.ecm.platform.contentview.jsf;
019
020import java.io.Serializable;
021import java.util.List;
022
023import org.nuxeo.ecm.core.api.DocumentModel;
024import org.nuxeo.ecm.core.api.SortInfo;
025
026/**
027 * Implementations of this interface represent a content view state that can be used to restore a given content view.
028 * <p>
029 * State is restricted to given getters and setters. Some state information is actually taken on the page provider.
030 *
031 * @since 5.4.2
032 */
033public interface ContentViewState extends Serializable {
034
035    String getContentViewName();
036
037    void setContentViewName(String contentViewName);
038
039    Long getPageSize();
040
041    void setPageSize(Long pageSize);
042
043    Long getCurrentPage();
044
045    void setCurrentPage(Long currentPage);
046
047    Object[] getQueryParameters();
048
049    void setQueryParameters(Object[] parameters);
050
051    DocumentModel getSearchDocumentModel();
052
053    void setSearchDocumentModel(DocumentModel searchDocument);
054
055    List<SortInfo> getSortInfos();
056
057    void setSortInfos(List<SortInfo> sortInfos);
058
059    ContentViewLayout getResultLayout();
060
061    void setResultLayout(ContentViewLayout resultLayout);
062
063    List<String> getResultColumns();
064
065    void setResultColumns(List<String> resultColumns);
066
067    /**
068     * @since 7.1
069     */
070    String getPageProviderName();
071
072    /**
073     * @since 7.1
074     */
075    void setPageProviderName(String name);
076
077}