com.atlassian.jira.rest.v2.preference
Class CurrentUserPreferencesResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.preference.CurrentUserPreferencesResource

public class CurrentUserPreferencesResource
extends Object

Provide preferences of the currently logged in user.

Since:
v6.0

Constructor Summary
CurrentUserPreferencesResource(JiraAuthenticationContext jiraAuthenticationContext, UserPreferencesManager userPreferencesManager)
           
 
Method Summary
 javax.ws.rs.core.Response getPreference(String key)
          Returns preference of the currently logged in user.
 javax.ws.rs.core.Response removePreference(String key)
          Removes preference of the currently logged in user.
 javax.ws.rs.core.Response setPreference(String key, String value)
          Sets preference of the currently logged in user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentUserPreferencesResource

public CurrentUserPreferencesResource(JiraAuthenticationContext jiraAuthenticationContext,
                                      UserPreferencesManager userPreferencesManager)
Method Detail

getPreference

public javax.ws.rs.core.Response getPreference(String key)
Returns preference of the currently logged in user. Preference key must be provided as input parameter (key). The value is returned exactly as it is. If key parameter is not provided or wrong - status code 404. If value is found - status code 200.

Parameters:
key - - key of the preference to be returned.
Returns:
response with value of one preference of currently logged in user.
Since:
v6.0

setPreference

public javax.ws.rs.core.Response setPreference(String key,
                                               String value)
                                        throws com.atlassian.core.AtlassianCoreException
Sets preference of the currently logged in user. Preference key must be provided as input parameters (key). Value must be provided as post body. If key or value parameter is not provided - status code 404. If preference is set - status code 204.

Parameters:
key - - key of the preference to be set.
value - - value of the preference to be set.
Returns:
empty response
Throws:
com.atlassian.core.AtlassianCoreException
Since:
v6.0

removePreference

public javax.ws.rs.core.Response removePreference(String key)
                                           throws com.atlassian.core.AtlassianCoreException
Removes preference of the currently logged in user. Preference key must be provided as input parameters (key). If key parameter is not provided or wrong - status code 404. If preference is unset - status code 204.

Parameters:
key - - key of the preference to be removed.
Returns:
empty response
Throws:
com.atlassian.core.AtlassianCoreException
Since:
v6.0


Copyright © 2002-2014 Atlassian. All Rights Reserved.