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.impl.operations; 007 008import org.fcrepo.kernel.api.Transaction; 009import org.fcrepo.kernel.api.identifiers.FedoraId; 010import org.fcrepo.kernel.api.operations.ResourceOperationBuilder; 011 012 013/** 014 * Builder for operations to delete a resource 015 * 016 * @author bbpennel 017 */ 018public class DeleteResourceOperationBuilder extends AbstractResourceOperationBuilder 019 implements ResourceOperationBuilder { 020 021 /** 022 * Construct the builder 023 * 024 * @param transaction the transaction 025 * @param rescId identifier of the resource to delete 026 */ 027 public DeleteResourceOperationBuilder(final Transaction transaction, final FedoraId rescId) { 028 super(transaction, rescId); 029 } 030 031 @Override 032 public DeleteResourceOperation build() { 033 final var operation = new DeleteResourceOperation(transaction, rescId); 034 operation.setUserPrincipal(userPrincipal); 035 return operation; 036 } 037}