001/* 002 * Licensed to DuraSpace under one or more contributor license agreements. 003 * See the NOTICE file distributed with this work for additional information 004 * regarding copyright ownership. 005 * 006 * DuraSpace licenses this file to you under the Apache License, 007 * Version 2.0 (the "License"); you may not use this file except in 008 * compliance with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.fcrepo.kernel.api.operations; 019 020import org.fcrepo.kernel.api.identifiers.FedoraId; 021 022import java.io.InputStream; 023import java.net.URI; 024 025/** 026 * Factory for constructing operations on non-rdf sources 027 * 028 * @author bbpennel 029 */ 030public interface NonRdfSourceOperationFactory extends ResourceOperationFactory { 031 032 /** 033 * Get a builder for a external binary update operation 034 * 035 * @param rescId id of the resource targeted by the operation 036 * @param handling the type of handling to be used for the external binary content 037 * @param contentUri the URI of the external binary content 038 * @return a new builder 039 */ 040 NonRdfSourceOperationBuilder updateExternalBinaryBuilder(FedoraId rescId, String handling, URI contentUri); 041 042 /** 043 * Get a builder for an internal binary update operation 044 * 045 * @param rescId id of the resource targeted by the operation 046 * @param contentStream inputstream for the content of this binary 047 * @return a new builder 048 */ 049 NonRdfSourceOperationBuilder updateInternalBinaryBuilder(FedoraId rescId, InputStream contentStream); 050 051 /** 052 * Get a builder for a external binary create operation 053 * 054 * @param rescId id of the resource targeted by the operation 055 * @param handling the type of handling to be used for the external binary content 056 * @param contentUri the URI of the external binary content 057 * @return a new builder 058 */ 059 CreateNonRdfSourceOperationBuilder createExternalBinaryBuilder(FedoraId rescId, String handling, URI contentUri); 060 061 /** 062 * Get a builder for an internal binary create operation 063 * 064 * @param rescId id of the resource targeted by the operation 065 * @param contentStream inputstream for the content of this binary 066 * @return a new builder 067 */ 068 CreateNonRdfSourceOperationBuilder createInternalBinaryBuilder(FedoraId rescId, InputStream contentStream); 069}