package com.atlassian.stash.internal.comment;

import com.atlassian.bitbucket.comment.CommentOperations;
import com.atlassian.bitbucket.comment.Commentable;
import com.atlassian.stash.internal.repository.InternalRepository;

import javax.annotation.Nonnull;

/**
 * Common interface for managing entities users can comment on.
 *
 * @since 2.11
 */
public interface InternalCommentable extends Commentable {

    /**
     * Retrieves the scope repository for this entity.
     * <p>
     * Long term, types may be added which are not scoped to a repository. For now, all commentable types are. The
     * scope repository is used for, among other things, setting {@link CommentOperations}
     * for comments.
     *
     * @return the scope repository for this entity
     */
    @Nonnull
    InternalRepository getScopeRepository();
}
