nl.surfnet.coin.csa.service.impl
Class JiraServiceImpl

java.lang.Object
  extended by nl.surfnet.coin.csa.service.impl.JiraServiceImpl
All Implemented Interfaces:
JiraService, org.springframework.beans.factory.InitializingBean

public class JiraServiceImpl
extends Object
implements JiraService, org.springframework.beans.factory.InitializingBean


Field Summary
static String CLOSE_ACTION_IDENTIFIER
           
static org.swift.common.soap.jira.RemoteCustomFieldValue[] EMPTY_REMOTE_CUSTOM_FIELD_VALUES
           
static org.swift.common.soap.jira.RemoteFieldValue[] EMPTY_REMOTE_FIELD_VALUES
           
static String[] EMPTY_STRINGS
           
static String IDP_CUSTOM_FIELD
           
static String PRIORITY_MEDIUM
           
static String REOPEN_ACTION_IDENTIFIER
           
static String SP_CUSTOM_FIELD
           
static String TYPE_LINKREQUEST
           
static String TYPE_QUESTION
           
static String TYPE_UNLINKREQUEST
           
 
Constructor Summary
JiraServiceImpl()
           
 
Method Summary
 void afterPropertiesSet()
           
 String create(JiraTask task, CoinUser user)
          Create a new task in Jira.
 void delete(String key)
          Delete a task from Jira.
 void doAction(String key, JiraTask.Action update)
          Re-open or close a Jira task.
 List<JiraTask> getTasks(List<String> keys)
          Retrieve specific tasks from Jira.
 void setBaseUrl(String baseUrl)
          Set the base URL of the Jira instance to use
protected  void setJiraSoapService(org.swift.common.soap.jira.JiraSoapService jiraSoapService)
          meant to override the default impl (for instance to mock for unit tests)
 void setPassword(String password)
          Set the password to use to authenticate against Jira
 void setProjectKey(String projectKey)
          The project key used to submit issues
 void setUsername(String username)
          Set the username to use to authenticate against Jira
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_REMOTE_FIELD_VALUES

public static final org.swift.common.soap.jira.RemoteFieldValue[] EMPTY_REMOTE_FIELD_VALUES

EMPTY_STRINGS

public static final String[] EMPTY_STRINGS

EMPTY_REMOTE_CUSTOM_FIELD_VALUES

public static final org.swift.common.soap.jira.RemoteCustomFieldValue[] EMPTY_REMOTE_CUSTOM_FIELD_VALUES

SP_CUSTOM_FIELD

public static final String SP_CUSTOM_FIELD
See Also:
Constant Field Values

IDP_CUSTOM_FIELD

public static final String IDP_CUSTOM_FIELD
See Also:
Constant Field Values

TYPE_LINKREQUEST

public static final String TYPE_LINKREQUEST
See Also:
Constant Field Values

TYPE_UNLINKREQUEST

public static final String TYPE_UNLINKREQUEST
See Also:
Constant Field Values

TYPE_QUESTION

public static final String TYPE_QUESTION
See Also:
Constant Field Values

PRIORITY_MEDIUM

public static final String PRIORITY_MEDIUM
See Also:
Constant Field Values

CLOSE_ACTION_IDENTIFIER

public static final String CLOSE_ACTION_IDENTIFIER
See Also:
Constant Field Values

REOPEN_ACTION_IDENTIFIER

public static final String REOPEN_ACTION_IDENTIFIER
See Also:
Constant Field Values
Constructor Detail

JiraServiceImpl

public JiraServiceImpl()
Method Detail

create

public String create(JiraTask task,
                     CoinUser user)
              throws IOException
Description copied from interface: JiraService
Create a new task in Jira.

Specified by:
create in interface JiraService
Parameters:
task - the task you want to create
user - the user which issued the request
Returns:
the new task key
Throws:
IOException - when communicating with jira fails

delete

public void delete(String key)
            throws IOException
Description copied from interface: JiraService
Delete a task from Jira.

Specified by:
delete in interface JiraService
Parameters:
key - the task key
Throws:
IOException - when communicating with jira fails

doAction

public void doAction(String key,
                     JiraTask.Action update)
              throws IOException
Description copied from interface: JiraService
Re-open or close a Jira task.

Specified by:
doAction in interface JiraService
Parameters:
key - the task key
update - what action to undertake
Throws:
IOException - when communicating with jira fails

getTasks

public List<JiraTask> getTasks(List<String> keys)
                        throws IOException
Description copied from interface: JiraService
Retrieve specific tasks from Jira.

Specified by:
getTasks in interface JiraService
Parameters:
keys - a list of the task keys you want to retrieve
Returns:
a list of tasks
Throws:
IOException - when communicating with jira fails

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

setJiraSoapService

protected void setJiraSoapService(org.swift.common.soap.jira.JiraSoapService jiraSoapService)
meant to override the default impl (for instance to mock for unit tests)

Parameters:
jiraSoapService - the soap service

setBaseUrl

public void setBaseUrl(String baseUrl)
Description copied from interface: JiraService
Set the base URL of the Jira instance to use

Specified by:
setBaseUrl in interface JiraService
Parameters:
baseUrl - String

setUsername

public void setUsername(String username)
Description copied from interface: JiraService
Set the username to use to authenticate against Jira

Specified by:
setUsername in interface JiraService
Parameters:
username - the username as a String

setPassword

public void setPassword(String password)
Description copied from interface: JiraService
Set the password to use to authenticate against Jira

Specified by:
setPassword in interface JiraService
Parameters:
password - String

setProjectKey

public void setProjectKey(String projectKey)
Description copied from interface: JiraService
The project key used to submit issues

Specified by:
setProjectKey in interface JiraService
Parameters:
projectKey - String


Copyright © 2013 SURFnet bv, The Netherlands. All Rights Reserved.