1 /* 2 * #%L 3 * Bitrepository Access 4 * 5 * $Id$ 6 * $HeadURL$ 7 * %% 8 * Copyright (C) 2010 - 2011 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.access.getchecksums; 26 27 import java.net.URL; 28 29 import org.bitrepository.access.ContributorQuery; 30 import org.bitrepository.bitrepositoryelements.ChecksumSpecTYPE; 31 import org.bitrepository.client.BitrepositoryClient; 32 import org.bitrepository.client.eventhandler.EventHandler; 33 34 /** 35 * Used for retrieving checksums for files stored on the collection pillars. 36 */ 37 public interface GetChecksumsClient extends BitrepositoryClient { 38 39 /** 40 * Retrieves the checksums for a set of files. 41 * <br/> 42 * If the number of fileIDs in a collection is large (10.000's) the fileIDs should be retrieved in chunks by 43 * using the <code>ContributorQuery</code> functionality. 44 * <br/> 45 * Since every pillar cannot upload their checksums to the same URL, it is extended with the pillarId for the given 46 * pillar, e.g.: 'http://upload.url/mypath' + '-pillarId'. 47 * <br/> 48 * The results are returned through as a ChecksumsCompletePillarCompete event as the results are returned by the 49 * pillars. 50 * @param collectionID Identifies the collection to request checksums for. 51 * @param contributorQueries Defines which fileIDs to retrieve. If null all fileIDs from all contributers are 52 * returned. 53 * @param fileID The optional fileID to retrieve file information for. If <code>null</code> file information are 54 * retrieved for all files. 55 * @param checksumSpec Specification of how the type of checksums. If no checksum spec is specified the default 56 * checksum type will be returned. 57 * @param addressForResult [OPTIONAL] The address to upload the calculated checksums to. If this is null, then the 58 * results will be retrieved through the message. 59 * @param eventHandler [OPTIONAL] The handler which should receive notifications of the events occurring in 60 * connection with the pillar communication. 61 * 62 */ 63 public void getChecksums( 64 String collectionID, 65 ContributorQuery[] contributorQueries, 66 String fileID, 67 ChecksumSpecTYPE checksumSpec, 68 URL addressForResult, 69 EventHandler eventHandler, 70 String auditTrailInformation); 71 }