package com.atlassian.bitbucket.internal.audit;

import com.atlassian.bitbucket.audit.MinimalAuditEntry;
import com.atlassian.bitbucket.user.ApplicationUser;

import javax.annotation.Nonnull;
import java.util.Date;

public class SimpleMinimalAuditEntry implements MinimalAuditEntry {

    private final String action;
    private final String details;
    private final Date timestamp;
    private final ApplicationUser user;

    public SimpleMinimalAuditEntry(ApplicationUser user, String action, Date timestamp, String details) {
        this.action = action;
        this.details = details;
        this.timestamp = timestamp;
        this.user = user;
    }

    @Nonnull
    @Override
    public String getAction() {
        return action;
    }

    @Override
    public String getDetails() {
        return details;
    }

    @Nonnull
    @Override
    public Date getTimestamp() {
        return timestamp;
    }

    @Override
    public ApplicationUser getUser() {
        return user;
    }
}
