package com.atlassian.bitbucket.scm.bulk;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.scm.Command;

import javax.annotation.Nonnull;

/**
 * SCM provider should publish an implementation of this service as an OSGI service if they support bulk content.
 *
 * @since 4.2
 */
public interface PluginBulkContentCommandFactory {

    /**
     * @param repository the repository to get contents from
     * @param parameters to specify where to get contents from
     * @param callback   to process resulting content
     * @return the command
     */
    @Nonnull
    Command<Void> contents(@Nonnull Repository repository, @Nonnull BulkContentCommandParameters parameters,
                           @Nonnull BulkContentCallback callback);
}
