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 */ 006 007package org.fcrepo.kernel.impl.operations; 008 009import org.fcrepo.kernel.api.Transaction; 010import org.fcrepo.kernel.api.identifiers.FedoraId; 011import org.fcrepo.kernel.api.operations.CreateVersionResourceOperationBuilder; 012import org.fcrepo.kernel.api.operations.ResourceOperation; 013 014/** 015 * Default impl of {@link CreateVersionResourceOperationBuilder} 016 * 017 * @author pwinckles 018 */ 019public class CreateVersionResourceOperationBuilderImpl extends AbstractResourceOperationBuilder 020 implements CreateVersionResourceOperationBuilder { 021 022 /** 023 * Create a new builder 024 * 025 * @param transaction the transaction. 026 * @param resourceId the resource id 027 */ 028 public CreateVersionResourceOperationBuilderImpl(final Transaction transaction, final FedoraId resourceId) { 029 super(transaction, resourceId); 030 } 031 032 @Override 033 public ResourceOperation build() { 034 final var operation = new CreateVersionResourceOperationImpl(transaction, rescId); 035 operation.setUserPrincipal(userPrincipal); 036 return operation; 037 } 038 039}