package com.atlassian.stash.internal.task;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.user.ApplicationUser;

import javax.annotation.Nonnull;

/**
 * The context of a task, such as a pull request.
 *
 * @since 3.3
 */
public interface InternalTaskContext {

    /**
     * Retrieves the {@link ApplicationUser} who created the context.
     *
     * @return the creator of the context
     */
    @Nonnull
    ApplicationUser getCreatedBy();

    /**
     * @return the ID of the task context
     */
    long getId();

    /**
     * Retrieves the {@link Repository} to which the context is scoped.
     *
     * @return the scoping repository
     */
    @Nonnull
    Repository getScopeRepository();
}
