@Test public void testHandleRequest(){ JsonElement projectKey = new JsonPrimitive("PSAA"); JsonElement issueType = new JsonPrimitive("Story"); Conversation conversation = jiraCreateIssueConversationCatalyst.getConversation(MessageBuilder.constructBentenCreateIssueCatalystMessage(projectKey,issueType)); }
@Override public Conversation getConversation(BentenMessage bentenMessage) { String projectKey = BentenMessageHelper.getParameterAsString(bentenMessage, SlackConstants.PROJECT_KEY); String issueType = BentenMessageHelper.getParameterAsString(bentenMessage,SlackConstants.ISSUE_TYPE); JSONObject fields = bentenJiraClient.getCreateMetadata(projectKey,issueType); Conversation conversation; List<JSONObject> requiredFields = JiraConverter.getRequiredFields(fields); conversation = createConversation(requiredFields); return conversation; }
JiraCreateIssueConversationCatalyst implements ConversationCatalyst { @Override public Conversation getConversation(BentenMessage bentenMessage) { String projectKey = BentenMessageHelper.getParameterAsString(bentenMessage, SlackConstants.PROJECT_KEY); String issueType = BentenMessageHelper.getParameterAsString(bentenMessage,SlackConstants.ISSUE_TYPE); JSONObject fields = bentenJiraClient.getCreateMetadata(projectKey,issueType); Conversation conversation; List<JSONObject> requiredFields = JiraConverter.getRequiredFields(fields); conversation = createConversation(requiredFields); return conversation; } }
JiraCreateIssueConversationCatalyst implements ConversationCatalyst { @Override public Conversation getConversation(BentenMessage bentenMessage) { String projectKey = BentenMessageHelper.getParameterAsString(bentenMessage, SlackConstants.PROJECT_KEY); String issueType = BentenMessageHelper.getParameterAsString(bentenMessage,SlackConstants.ISSUE_TYPE); JSONObject fields = bentenJiraClient.getCreateMetadata(projectKey,issueType); Conversation conversation; List<JSONObject> requiredFields = JiraConverter.getRequiredFields(fields); conversation = createConversation(requiredFields); return conversation; }  }
JiraCreateIssueConversationCatalyst implements ConversationCatalyst { @Override public Conversation getConversation(BentenMessage bentenMessage) { String projectKey = BentenMessageHelper.getParameterAsString(bentenMessage, SlackConstants.PROJECT_KEY); String issueType = BentenMessageHelper.getParameterAsString(bentenMessage,SlackConstants.ISSUE_TYPE); JSONObject fields = bentenJiraClient.getCreateMetadata(projectKey,issueType); Conversation conversation; List<JSONObject> requiredFields = JiraConverter.getRequiredFields(fields); conversation = createConversation(requiredFields); return conversation; }  @Override Conversation getConversation(BentenMessage bentenMessage); Conversation createConversation(List<JSONObject> requiredFields); }
JiraCreateIssueConversationCatalyst implements ConversationCatalyst { @Override public Conversation getConversation(BentenMessage bentenMessage) { String projectKey = BentenMessageHelper.getParameterAsString(bentenMessage, SlackConstants.PROJECT_KEY); String issueType = BentenMessageHelper.getParameterAsString(bentenMessage,SlackConstants.ISSUE_TYPE); JSONObject fields = bentenJiraClient.getCreateMetadata(projectKey,issueType); Conversation conversation; List<JSONObject> requiredFields = JiraConverter.getRequiredFields(fields); conversation = createConversation(requiredFields); return conversation; }  @Override Conversation getConversation(BentenMessage bentenMessage); Conversation createConversation(List<JSONObject> requiredFields);  }