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.ReindexResourceOperation;
011import org.fcrepo.kernel.api.operations.ResourceOperationType;
012
013import static org.fcrepo.kernel.api.operations.ResourceOperationType.REINDEX;
014
015
016/**
017 * Operation for reindexing a resource
018 *
019 * @author dbernstein
020 */
021public class ReindexResourceOperationImpl extends AbstractResourceOperation implements ReindexResourceOperation {
022
023    private Transaction transaction;
024
025    protected ReindexResourceOperationImpl(final Transaction transaction, final FedoraId rescId) {
026        super(transaction, rescId);
027    }
028
029    @Override
030    public ResourceOperationType getType() {
031        return REINDEX;
032    }
033
034    public void setTransaction(final Transaction tx) {
035        transaction = tx;
036    }
037
038    @Override
039    public Transaction getTransaction() {
040        return transaction;
041    }
042}