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

java.lang.Object
  extended by nl.surfnet.coin.csa.service.impl.JiraServiceMock
All Implemented Interfaces:
JiraService

public class JiraServiceMock
extends Object
implements JiraService


Constructor Summary
JiraServiceMock()
           
 
Method Summary
 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 action)
          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
 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
 

Constructor Detail

JiraServiceMock

public JiraServiceMock()
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 action)
              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
action - 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

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.