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;
010
011/**
012 * Build a reference operation.
013 * @author whikloj
014 */
015public class ReferenceOperationBuilder extends AbstractResourceOperationBuilder {
016
017    /**
018     * Constructor.
019     *
020     * @param transaction the transaction
021     * @param rescId the resource identifier.
022     */
023    public ReferenceOperationBuilder(final Transaction transaction, final FedoraId rescId) {
024        super(transaction, rescId);
025    }
026
027    @Override
028    public ReferenceOperation build() {
029        final var operation = new ReferenceOperation(transaction, rescId);
030        operation.setUserPrincipal(userPrincipal);
031        return operation;
032    }
033
034}