001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (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 * Nuxeo - initial API and implementation 016 * 017 * $Id: ContentHistoryActions.java 25663 2007-10-04 11:54:15Z cbaican $ 018 */ 019 020package org.nuxeo.ecm.platform.audit.web.listener; 021 022import java.io.Serializable; 023import java.util.List; 024import java.util.Map; 025 026import org.nuxeo.ecm.core.api.DocumentModel; 027import org.nuxeo.ecm.core.api.SortInfo; 028import org.nuxeo.ecm.platform.audit.api.LogEntry; 029import org.nuxeo.ecm.platform.audit.api.comment.LinkedDocument; 030 031/** 032 * Content history actions business interface. 033 * 034 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 035 */ 036public interface ContentHistoryActions extends Serializable { 037 038 /** 039 * Computes all log entries for current document. 040 */ 041 List<? extends LogEntry> computeLogEntries(); 042 043 /** 044 * Computes all log entries for given document. 045 */ 046 List<? extends LogEntry> computeLogEntries(DocumentModel document); 047 048 /** 049 * Computes latest logs only. 050 */ 051 List<? extends LogEntry> computeLatestLogEntries(); 052 053 Map<Long, String> computeLogEntriesComments(); 054 055 Map<Long, LinkedDocument> computeLogEntrieslinkedDocs(); 056 057 /** 058 * Returns the log comment. 059 * <p> 060 * This log may be filled automatically when dealing with copy/paste/move log entries. 061 * 062 * @Deprecated This now handled by the PageProvider 063 */ 064 @Deprecated 065 String getLogComment(LogEntry entry); 066 067 /** 068 * Returns the log linked document. 069 * <p> 070 * The linked document is resolved from the log original comment, when dealing with copy/paste/move log entries. 071 * 072 * @Deprecated This now handled by the PageProvider 073 */ 074 @Deprecated 075 LinkedDocument getLogLinkedDocument(LogEntry entry); 076 077 String doSearch(); 078 079 SortInfo getSortInfo(); 080 081}