com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client
Class WatchersClient

java.lang.Object
  extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient<WatchersClient>
      extended by com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.WatchersClient

public class WatchersClient
extends RestApiClient<WatchersClient>

Client for the watchers sub-resource.

Since:
v4.3

Nested Class Summary
 
Nested classes/interfaces inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
RestApiClient.Method
 
Field Summary
 
Fields inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
REST_VERSION
 
Constructor Summary
WatchersClient(JIRAEnvironmentData environmentData)
          Constructs a new WatchersClient for a JIRA instance.
 
Method Summary
 Response deleteResponse(String issueKey, String username)
          DELETEs a user from the watchers sub-resource of the issue with the given key.
 Watches get(String issueKey)
          GETs the watchers for the issue with the given key.
 Response getResponse(String issueKey)
          GETs the watchers for the issue with the given key, returning a Response.
 Response postResponse(String issueKey, String username)
          POSTs a user name to the watchers sub-resource of the issue with the given key, returning a Response.
 
Methods inherited from class com.atlassian.jira.webtests.ztests.bundledplugins2.rest.client.RestApiClient
anonymous, createResource, errorResponse, expanded, loginAs, loginAs, percentEncode, resourceRoot, setOf, toResponse, toResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WatchersClient

public WatchersClient(JIRAEnvironmentData environmentData)
Constructs a new WatchersClient for a JIRA instance.

Parameters:
environmentData - The JIRA environment data
Method Detail

get

public Watches get(String issueKey)
            throws com.sun.jersey.api.client.UniformInterfaceException
GETs the watchers for the issue with the given key.

Parameters:
issueKey - a String containing an issue key
Returns:
a Watchers
Throws:
com.sun.jersey.api.client.UniformInterfaceException - if there's a problem

getResponse

public Response getResponse(String issueKey)
GETs the watchers for the issue with the given key, returning a Response.

Parameters:
issueKey - a String containing an issue key
Returns:
a Response

postResponse

public Response postResponse(String issueKey,
                             String username)
POSTs a user name to the watchers sub-resource of the issue with the given key, returning a Response.

Parameters:
issueKey - a String containing an issue key
username - the username to POST
Returns:
a Response

deleteResponse

public Response deleteResponse(String issueKey,
                               String username)
DELETEs a user from the watchers sub-resource of the issue with the given key.

Parameters:
issueKey - a String containing an issue key
username - the username to delete from the watcher list
Returns:
a Response


Copyright © 2002-2012 Atlassian. All Rights Reserved.