public class

UserPropertyResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.user.UserPropertyResource

Summary

Protected Constructors
UserPropertyResource(UserPropertyService userPropertyService, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n, ResponseFactory responseFactory, UserManager userManager, SelfLinkBuilder selfLinkBuilder)
Public Methods
Response deleteProperty(String userKey, String username, String propertyKey)
Removes the property from the user identified by the key or by the id.
Response getPropertiesKeys(String userKey, String username)
Returns the keys of all properties for the user identified by the key or by the id.
Response getProperty(String userKey, String username, String propertyKey)
Returns the value of the property with a given key from the user identified by the key or by the id.
Response setProperty(String userKey, String username, String propertyKey, HttpServletRequest request)
Sets the value of the specified user's property.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected UserPropertyResource (UserPropertyService userPropertyService, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n, ResponseFactory responseFactory, UserManager userManager, SelfLinkBuilder selfLinkBuilder)

Public Methods

public Response deleteProperty (String userKey, String username, String propertyKey)

Removes the property from the user identified by the key or by the id. Ths user removing the property is required to have permissions to administer the user.

Parameters
userKey key of the user whose property is to be removed
username username of the user whose property is to be removed
Returns
  • a 204 HTTP status if everything goes well.

public Response getPropertiesKeys (String userKey, String username)

Returns the keys of all properties for the user identified by the key or by the id.

Parameters
userKey key of the user whose properties are to be returned
username username of the user whose properties are to be returned
Returns
  • a response containing EntityPropertiesKeysBean.

public Response getProperty (String userKey, String username, String propertyKey)

Returns the value of the property with a given key from the user identified by the key or by the id. The user who retrieves the property is required to have permissions to read the user.

Parameters
userKey key of the user whose property is to be returned
username username of the user whose property is to be returned
Returns

public Response setProperty (String userKey, String username, String propertyKey, HttpServletRequest request)

Sets the value of the specified user's property.

You can use this resource to store a custom data against the user identified by the key or by the id. The user who stores the data is required to have permissions to administer the user.

Parameters
userKey key of the user whose property is to be set
username username of the user whose property is to be set
propertyKey the key of the user's property. The maximum length of the key is 255 bytes.
request the request containing value of the user's property. The value has to a valid, non-empty JSON conforming to http://tools.ietf.org/html/rfc4627. The maximum length of the property value is 32768 bytes.