package de.hftstuttgart.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ModocotProperties {

    private final String dockerHostIp;
    private final String jenkinsApiToken;
    private final String jenkinsBaseUrl;
    private final String modocotParentDirectory;
    private final String modocotAssignmentFolderPrefix;
    private final String modocotTestFolderName;
    private final String gitTeaBasePath;
    private final String gitTeaUsername;
    private final String gitTeaPassword;
    private final String gitTeaDefaultCommitMessage;
    private final String gitTeaOrigin;

    public ModocotProperties(@Value("${docker.hostIp}")               String dockerHostIp,
                             @Value("${jenkins.api.token}")           String jenkinsApiToken,
                             @Value("${jenkins.url}")                 String jenkinsBaseUrl,
                             @Value("${modocot.dir.parent}")            String modocotParentDirectory,
                             @Value("${modocot.dir.assignment.prefix}") String modocotAssignmentFolderPrefix,
                             @Value("${modocot.dir.test.folder.name}")  String modocotTestFolderName,
                             @Value("${gitTea.basePath}")             String gitTeaBasePath,
                             @Value("${gitTea.username}")             String gitTeaUsername,
                             @Value("${gitTea.password}")             String gitTeaPassword,
                             @Value("${gitTea.defaultCommitMessage}") String gitTeaDefaultCommitMessage,
                             @Value("${gitTea.defaultOrigin}")        String gitTeaOrigin) {
        this.dockerHostIp                  = dockerHostIp;
        this.jenkinsApiToken               = jenkinsApiToken;
        this.jenkinsBaseUrl                = jenkinsBaseUrl;
        this.modocotParentDirectory        = modocotParentDirectory;
        this.modocotAssignmentFolderPrefix = modocotAssignmentFolderPrefix;
        this.modocotTestFolderName         = modocotTestFolderName;
        this.gitTeaBasePath                = gitTeaBasePath;
        this.gitTeaUsername                = gitTeaUsername;
        this.gitTeaPassword                = gitTeaPassword;
        this.gitTeaDefaultCommitMessage    = gitTeaDefaultCommitMessage;
        this.gitTeaOrigin                  = gitTeaOrigin;
    }

    public String getDockerHostIp() {
        return dockerHostIp;
    }

    public String getJenkinsApiToken() {
        return jenkinsApiToken;
    }

    public String getJenkinsBaseUrl() {
        return jenkinsBaseUrl;
    }

    public String getModocotParentDirectory() {
        return modocotParentDirectory;
    }

    public String getModocotAssignmentFolderPrefix() {
        return modocotAssignmentFolderPrefix;
    }

    public String getModocotTestFolderName() {
        return modocotTestFolderName;
    }

    public String getGitTeaBasePath() {
        return gitTeaBasePath;
    }

    public String getGitTeaUsername() {
        return gitTeaUsername;
    }

    public String getGitTeaPassword() {
        return gitTeaPassword;
    }

    public String getGitTeaDefaultCommitMessage() {
        return gitTeaDefaultCommitMessage;
    }

    public String getGitTeaOrigin() {
        return gitTeaOrigin;
    }
}
