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.RelaxableResourceOperation;
011
012import java.time.Instant;
013
014/**
015 * Abstract operation for a relaxable resource operations
016 * @author bbpennel
017 */
018public abstract class AbstractRelaxableResourceOperation extends AbstractResourceOperation
019                                                         implements RelaxableResourceOperation {
020    protected String lastModifiedBy;
021
022    protected String createdBy;
023
024    protected Instant lastModifiedDate;
025
026    protected Instant createdDate;
027
028    protected AbstractRelaxableResourceOperation(final Transaction transaction, final FedoraId rescId) {
029        super(transaction, rescId);
030    }
031
032    @Override
033    public String getLastModifiedBy() {
034        return lastModifiedBy;
035    }
036
037    @Override
038    public String getCreatedBy() {
039        return createdBy;
040    }
041
042    @Override
043    public Instant getLastModifiedDate() {
044        return lastModifiedDate;
045    }
046
047    @Override
048    public Instant getCreatedDate() {
049        return createdDate;
050    }
051
052    /**
053     * @param lastModifiedBy the lastModifiedBy to set
054     */
055    protected void setLastModifiedBy(final String lastModifiedBy) {
056        this.lastModifiedBy = lastModifiedBy;
057    }
058
059    /**
060     * @param createdBy the createdBy to set
061     */
062    protected void setCreatedBy(final String createdBy) {
063        this.createdBy = createdBy;
064    }
065
066    /**
067     * @param lastModifiedDate the lastModifiedDate to set
068     */
069    protected void setLastModifiedDate(final Instant lastModifiedDate) {
070        this.lastModifiedDate = lastModifiedDate;
071    }
072
073    /**
074     * @param createdDate the createdDate to set
075     */
076    protected void setCreatedDate(final Instant createdDate) {
077        this.createdDate = createdDate;
078    }
079}