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 */
017package org.nuxeo.ecm.platform.contentview.jsf;
018
019import java.util.List;
020
021import org.nuxeo.ecm.core.api.DocumentModel;
022import org.nuxeo.ecm.core.api.SortInfo;
023
024/**
025 * Default implementation of {@link ContentViewState}
026 *
027 * @since 5.4.2
028 */
029public class ContentViewStateImpl implements ContentViewState {
030
031    private static final long serialVersionUID = 1L;
032
033    protected String contentViewName;
034
035    protected String pageProviderName;
036
037    protected Long pageSize;
038
039    protected Long currentPage;
040
041    protected Object[] parameters;
042
043    protected DocumentModel searchDocument;
044
045    protected List<SortInfo> sortInfos;
046
047    protected ContentViewLayout resultLayout;
048
049    protected List<String> resultColumns;
050
051    @Override
052    public String getContentViewName() {
053        return contentViewName;
054    }
055
056    @Override
057    public void setContentViewName(String contentViewName) {
058        this.contentViewName = contentViewName;
059    }
060
061    @Override
062    public Long getPageSize() {
063        return pageSize;
064    }
065
066    @Override
067    public void setPageSize(Long pageSize) {
068        this.pageSize = pageSize;
069    }
070
071    @Override
072    public Long getCurrentPage() {
073        return currentPage;
074    }
075
076    @Override
077    public void setCurrentPage(Long currentPage) {
078        this.currentPage = currentPage;
079    }
080
081    @Override
082    public Object[] getQueryParameters() {
083        return parameters;
084    }
085
086    @Override
087    public void setQueryParameters(Object[] parameters) {
088        this.parameters = parameters;
089    }
090
091    @Override
092    public DocumentModel getSearchDocumentModel() {
093        return searchDocument;
094    }
095
096    @Override
097    public void setSearchDocumentModel(DocumentModel searchDocument) {
098        this.searchDocument = searchDocument;
099    }
100
101    @Override
102    public List<SortInfo> getSortInfos() {
103        return sortInfos;
104    }
105
106    @Override
107    public void setSortInfos(List<SortInfo> sortInfos) {
108        this.sortInfos = sortInfos;
109    }
110
111    @Override
112    public ContentViewLayout getResultLayout() {
113        return resultLayout;
114    }
115
116    @Override
117    public void setResultLayout(ContentViewLayout resultLayout) {
118        this.resultLayout = resultLayout;
119    }
120
121    @Override
122    public List<String> getResultColumns() {
123        return resultColumns;
124    }
125
126    @Override
127    public void setResultColumns(List<String> resultColumns) {
128        this.resultColumns = resultColumns;
129    }
130
131    @Override
132    public String getPageProviderName() {
133        return pageProviderName;
134    }
135
136    @Override
137    public void setPageProviderName(String pageProviderName) {
138        this.pageProviderName = pageProviderName;
139    }
140
141}