package com.atlassian.stash.internal.scm;

import com.atlassian.bitbucket.repository.Repository;
import com.atlassian.bitbucket.scm.Command;
import com.atlassian.bitbucket.scm.bulk.BulkContentCallback;
import com.atlassian.bitbucket.scm.bulk.BulkContentCommandParameters;
import com.atlassian.bitbucket.scm.bulk.PluginBulkContentCommandFactory;
import com.atlassian.bitbucket.scm.bulk.ScmBulkContentCommandFactory;

import javax.annotation.Nonnull;

public class PluginScmBulkContentCommandFactory implements ScmBulkContentCommandFactory {

    private final PluginBulkContentCommandFactory commandFactory;
    private final Repository repository;

    public PluginScmBulkContentCommandFactory(Repository repository, PluginBulkContentCommandFactory commandFactory) {
        this.commandFactory = commandFactory;
        this.repository = repository;
    }

    @Nonnull
    @Override
    public Command<Void> contents(@Nonnull BulkContentCommandParameters parameters, @Nonnull BulkContentCallback callback) {
        return commandFactory.contents(repository, parameters, callback);
    }
}
