001/* 002 * The contents of this file are subject to the license and copyright 003 * detailed in the LICENSE and NOTICE files at the root of the source 004 * tree. 005 */ 006package org.fcrepo.kernel.api.services; 007 008import java.io.InputStream; 009import java.net.URI; 010import java.util.Collection; 011 012import org.fcrepo.kernel.api.Transaction; 013import org.fcrepo.kernel.api.identifiers.FedoraId; 014import org.fcrepo.kernel.api.models.ExternalContent; 015 016/** 017 * Interface for service to replace existing binaries 018 * 019 * @author mohideen 020 */ 021public interface ReplaceBinariesService { 022 023 /** 024 * Replace an existing binary. 025 * 026 * @param tx The transaction for the request. 027 * @param userPrincipal the user performing the service 028 * @param fedoraId The internal identifier of the parent. 029 * @param filename The filename of the binary. 030 * @param contentType The content-type header or null if none. 031 * @param digests The binary digest or null if none. 032 * @param size The binary size. 033 * @param contentBody The request body or null if none. 034 * @param externalContent The external content handler or null if none. 035 */ 036 void perform(Transaction tx, 037 String userPrincipal, 038 FedoraId fedoraId, 039 String filename, 040 String contentType, 041 Collection<URI> digests, 042 InputStream contentBody, 043 long size, 044 ExternalContent externalContent); 045}