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.operations; 007 008import org.fcrepo.config.ServerManagedPropsMode; 009import org.fcrepo.kernel.api.Transaction; 010import org.fcrepo.kernel.api.identifiers.FedoraId; 011 012import java.io.InputStream; 013import java.net.URI; 014 015/** 016 * Factory for constructing operations on non-rdf sources 017 * 018 * @author bbpennel 019 */ 020public interface NonRdfSourceOperationFactory extends ResourceOperationFactory { 021 022 /** 023 * Get a builder for a external binary update operation 024 * 025 * @param transaction the transaction 026 * @param rescId id of the resource targeted by the operation 027 * @param handling the type of handling to be used for the external binary content 028 * @param contentUri the URI of the external binary content 029 * @return a new builder 030 */ 031 NonRdfSourceOperationBuilder updateExternalBinaryBuilder(Transaction transaction, FedoraId rescId, String handling, 032 URI contentUri); 033 034 /** 035 * Get a builder for an internal binary update operation 036 * 037 * @param transaction the transaction 038 * @param rescId id of the resource targeted by the operation 039 * @param contentStream inputstream for the content of this binary 040 * @return a new builder 041 */ 042 NonRdfSourceOperationBuilder updateInternalBinaryBuilder(Transaction transaction, FedoraId rescId, 043 InputStream contentStream); 044 045 /** 046 * Get a builder for a external binary create operation 047 * 048 * @param transaction the transaction 049 * @param rescId id of the resource targeted by the operation 050 * @param handling the type of handling to be used for the external binary content 051 * @param contentUri the URI of the external binary content 052 * @return a new builder 053 */ 054 CreateNonRdfSourceOperationBuilder createExternalBinaryBuilder(Transaction transaction, FedoraId rescId, 055 String handling, 056 URI contentUri); 057 058 /** 059 * Get a builder for an internal binary create operation 060 * 061 * @param transaction the transaction 062 * @param rescId id of the resource targeted by the operation 063 * @param contentStream inputstream for the content of this binary 064 * @return a new builder 065 */ 066 CreateNonRdfSourceOperationBuilder createInternalBinaryBuilder(Transaction transaction, FedoraId rescId, 067 InputStream contentStream); 068 069 /** 070 * Get a builder for an operation to update headers of a Non-RDF resource 071 * 072 * @param transaction the transaction 073 * @param resourceId id of the resource targeted by the operation 074 * @param serverManagedPropsMode server managed props mode 075 * @return new builder 076 */ 077 UpdateNonRdfSourceHeadersOperationBuilder updateHeadersBuilder(Transaction transaction, 078 FedoraId resourceId, 079 ServerManagedPropsMode serverManagedPropsMode); 080}