1 /* 2 * #%L 3 * Bitmagasin integrationstest 4 * 5 * $Id$ 6 * $HeadURL$ 7 * %% 8 * Copyright (C) 2010 The State and University Library, The Royal Library and The State Archives, Denmark 9 * %% 10 * This program is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU Lesser General Public License as 12 * published by the Free Software Foundation, either version 2.1 of the 13 * License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Lesser Public License for more details. 19 * 20 * You should have received a copy of the GNU General Lesser Public 21 * License along with this program. If not, see 22 * <http://www.gnu.org/licenses/lgpl-2.1.html>. 23 * #L% 24 */ 25 package org.bitrepository.service.audit; 26 27 import java.util.Date; 28 29 import org.bitrepository.bitrepositoryelements.FileAction; 30 31 /** 32 * The interface for the audit trail handler. 33 */ 34 public interface AuditTrailManager { 35 /** 36 * Adds an audit trail event to the manager. 37 * @param collectionId The id of the collection for whom the audit applies. 38 * @param fileId The id of the file, where the operation has been performed. 39 * Use the argument null for indicating all file ids. 40 * @param actor The name of the actor. 41 * @param info Information about the reason for the audit trail to be logged. 42 * @param auditTrail The string for the audit trail information from the message performing the operation. 43 * @param operation The performed operation. 44 */ 45 void addAuditEvent(String collectionId, String fileId, String actor, String info, String auditTrail, FileAction operation); 46 47 /** 48 * Method for extracting all the audit trails. 49 * @param collectionId The id of the collection for whom the audit applies. 50 * @param fileId [OPTIONAL] The id of the file to request audits for. 51 * @param minSeqNumber [OPTIONAL] The lower sequence number requested. 52 * @param maxSeqNumber [OPTIONAL] The upper sequence number requested. 53 * @param minDate [OPTIONAL] The earliest date requested. 54 * @param maxDate [OPTIONAL] The newest date requested. 55 * @param maxNumberOfResults [OPTIONAL] The maximum number of results. 56 * @return The audit trails corresponding to the requested arguments. 57 */ 58 AuditTrailDatabaseResults getAudits(String collectionId, String fileId, Long minSeqNumber, Long maxSeqNumber, Date minDate, 59 Date maxDate, Long maxNumberOfResults); 60 }