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.api.operations;
007
008import org.fcrepo.kernel.api.Transaction;
009import org.fcrepo.kernel.api.identifiers.FedoraId;
010
011/**
012 * Operation for manipulating a resource
013 *
014 * @author bbpennel
015 */
016public interface ResourceOperation {
017
018    /**
019     * The transaction the operation is in.
020     *
021     * @return the transaction.
022     */
023    Transaction getTransaction();
024
025    /**
026     * Id of the resource
027     *
028     * @return the ID.
029     */
030    FedoraId getResourceId();
031
032    /**
033     * Returns the user principal performing this operation
034     *
035     * @return the user principal performing this operation
036     */
037    String getUserPrincipal();
038
039    /**
040     * Returns the type of operation represented by this request
041     *
042     * @return operation type
043     */
044    ResourceOperationType getType();
045}