Class JiraClientSvcImpl

    • Constructor Detail

      • JiraClientSvcImpl

        public JiraClientSvcImpl()
    • Method Detail

      • newJiraClient

        public net.rcarz.jiraclient.JiraClient newJiraClient()
        Description copied from interface: JiraClientSvc
        Create a new JiraClient from config, if you want to do some really custom JIRA operations using the rcarz client.
        Specified by:
        newJiraClient in interface JiraClientSvc
        Returns:
        a JiraClient configure with global config
      • setJiraClientFactory

        @Inject
        public void setJiraClientFactory​(JiraClientFactory jiraClientFactory)
      • addCommentToTicket

        public void addCommentToTicket​(String jiraIssueKey,
                                       String comment)
                                throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Add a comment to a ticket
        Specified by:
        addCommentToTicket in interface JiraClientSvc
        Parameters:
        jiraIssueKey - - the issue key (ex: JENKINS-101)
        comment - - the comment to add. Can use JIRA markup
        Throws:
        net.rcarz.jiraclient.JiraException
      • addLabelToTicket

        public void addLabelToTicket​(String jiraIssueKey,
                                     String labelsToAdd)
                              throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Add a label to a ticket
        Specified by:
        addLabelToTicket in interface JiraClientSvc
        Parameters:
        jiraIssueKey - - the issue key (ex: JENKINS-101)
        labelsToAdd - - the label to add
        Throws:
        net.rcarz.jiraclient.JiraException
      • changeWorkflowOfTicket

        public void changeWorkflowOfTicket​(String jiraIssueKey,
                                           String transitionName)
                                    throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Apply the transition to a ticket
        Specified by:
        changeWorkflowOfTicket in interface JiraClientSvc
        Parameters:
        jiraIssueKey - - the issue key (ex: JENKINS-101)
        transitionName - - the name of the transition
        Throws:
        net.rcarz.jiraclient.JiraException
      • updateStringField

        public void updateStringField​(String jiraIssueKey,
                                      String jiraFieldName,
                                      String content)
                               throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Update ticket ticket's field with a string value
        Specified by:
        updateStringField in interface JiraClientSvc
        Throws:
        net.rcarz.jiraclient.JiraException
      • updateMultiSelectField

        public void updateMultiSelectField​(String jiraIssueKey,
                                           String jiraFieldName,
                                           String... values)
                                    throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Update a ticket's field with a multi-select value.
        Specified by:
        updateMultiSelectField in interface JiraClientSvc
        Throws:
        net.rcarz.jiraclient.JiraException
      • addLabelToField

        public void addLabelToField​(String jiraIssueKey,
                                    String jiraFieldName,
                                    String fieldContent)
                             throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Adds a label to a ticket's field of the label type.
        Specified by:
        addLabelToField in interface JiraClientSvc
        Throws:
        net.rcarz.jiraclient.JiraException - if issue cannot be accessed or field cannot be accessed or updated
      • addFixVersion

        public void addFixVersion​(String jiraIssueKey,
                                  String newFixVersion)
                           throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Add a Fix Version to a field, if it doesn't already exist.
        Specified by:
        addFixVersion in interface JiraClientSvc
        Throws:
        net.rcarz.jiraclient.JiraException - if the fix version or issue does not exist, or if there was a problem getting the issue
      • getJiraFields

        public Map<String,​String> getJiraFields​(String issueKey)
                                               throws net.rcarz.jiraclient.JiraException
        Description copied from interface: JiraClientSvc
        Get a map of fieldIds to fieldName for the given issue key
        Specified by:
        getJiraFields in interface JiraClientSvc
        Returns:
        a map of fieldIds to their fieldNames
        Throws:
        net.rcarz.jiraclient.JiraException
      • getFieldValue

        public Object getFieldValue​(String jiraTicket,
                                    String jiraFieldId)
                             throws net.rcarz.jiraclient.JiraException
        Specified by:
        getFieldValue in interface JiraClientSvc
        Throws:
        net.rcarz.jiraclient.JiraException