package com.arms.api.issue.status.strategy;

import com.arms.api.issue.status.model.vo.CloudJiraByIssueTypeIssueStatusVO;
import com.arms.api.issue.status.model.vo.IssueStatusVO;
import com.arms.api.serverinfo.model.vo.ServerInfoVO;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class IssueStatusStrategyFactory {

    IssueStatusStrategy issueStatusStrategy;

    public void registerIssueStatusStrategy(IssueStatusStrategy issueStatusStrategy) {
        this.issueStatusStrategy = issueStatusStrategy;
    }

    public List<IssueStatusVO> getIssueStatusList(ServerInfoVO serverInfoVO) {
        return this.issueStatusStrategy.getIssueStatusList(serverInfoVO);
    }

    public List<CloudJiraByIssueTypeIssueStatusVO> getIssueStatusListByProject(ServerInfoVO serverInfoVO,
                                                                               String projectId) {
        return this.issueStatusStrategy.getIssueStatusListByProject(serverInfoVO, projectId);
    }
}
