package com.atlassian.bitbucket.scm.git.command.merge.conflict;

import com.atlassian.bitbucket.content.ChangeType;

import javax.annotation.Nonnull;

/**
 * @see DivergentRenameGitMergeConflict
 */
public class ConvergentRenameGitMergeConflict extends AbstractPathGitMergeConflict {

    private final String ourSrcPath;
    private final String ourTmpPath;
    private final String theirSrcPath;
    private final String theirTmpPath;

    public ConvergentRenameGitMergeConflict(@Nonnull String message, @Nonnull String path,
                                            @Nonnull String ourSrcPath, @Nonnull String ourTmpPath,
                                            @Nonnull String theirSrcPath, @Nonnull String theirTmpPath) {
        super(GitMergeConflictType.RENAME_RENAME, message, ChangeType.MOVE, path);

        this.ourSrcPath = ourSrcPath;
        this.ourTmpPath = ourTmpPath;
        this.theirSrcPath = theirSrcPath;
        this.theirTmpPath = theirTmpPath;
    }

    @Override
    public void accept(@Nonnull GitMergeConflictVisitor visitor) {
        visitor.visit(this);
    }

    @Nonnull
    public String getOurSrcPath() {
        return ourSrcPath;
    }

    @Nonnull
    public String getOurTmpPath() {
        return ourTmpPath;
    }

    @Nonnull
    public String getTheirSrcPath() {
        return theirSrcPath;
    }

    @Nonnull
    public String getTheirTmpPath() {
        return theirTmpPath;
    }
}
