001/* 002 * Copyright (c) 2006-2012 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * Nuxeo - initial API and implementation 011 * 012 */ 013package org.nuxeo.ecm.platform.audit.api; 014 015import java.util.List; 016 017import org.nuxeo.ecm.core.api.DocumentModel; 018import org.nuxeo.ecm.platform.query.api.PageProvider; 019 020/** 021 * Dedicated interface to browse history of a document 022 * 023 * @author <a href="mailto:tdelprat@nuxeo.com">Tiry</a> 024 */ 025public interface DocumentHistoryReader { 026 027 /** 028 * Retrieve a page of {@link LogEntry} for the history of the input {@link DocumentModel} 029 * 030 * @param doc 031 * @param pageIndex 032 * @param pageSize 033 * @return 034 */ 035 List<LogEntry> getDocumentHistory(DocumentModel doc, long pageIndex, long pageSize); 036 037 /** 038 * Retrieve the {@link PageProvider} of {@link LogEntry} for the history of the input {@link DocumentModel} 039 * 040 * @param doc 041 * @param pageIndex 042 * @param pageSize 043 * @return 044 */ 045 PageProvider<LogEntry> getPageProvider(DocumentModel doc, long pageIndex, long pageSize); 046}