Package com.atlassian.jira.rest.v2.user
Class UserPropertyResource
java.lang.Object
com.atlassian.jira.rest.v2.user.UserPropertyResource
@Path("user/properties")
@Consumes("application/json")
@Produces("application/json")
public class UserPropertyResource
extends Object
- Since:
- v7.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UserPropertyResource
(UserPropertyService userPropertyService, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n, ResponseFactory responseFactory, UserManager userManager, SelfLinkBuilder selfLinkBuilder) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
deleteProperty
(String userKey, String username, String propertyKey) Removes the property from the user identified by the key or by the id.jakarta.ws.rs.core.Response
getPropertiesKeys
(String userKey, String username) Returns the keys of all properties for the user identified by the key or by the id.jakarta.ws.rs.core.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.jakarta.ws.rs.core.Response
setProperty
(String userKey, String username, String propertyKey, jakarta.servlet.http.HttpServletRequest request) Sets the value of the specified user's property.
-
Constructor Details
-
UserPropertyResource
@Inject protected UserPropertyResource(UserPropertyService userPropertyService, JiraAuthenticationContext authenticationContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n, ResponseFactory responseFactory, UserManager userManager, SelfLinkBuilder selfLinkBuilder)
-
-
Method Details
-
getPropertiesKeys
@GET public jakarta.ws.rs.core.Response getPropertiesKeys(@QueryParam("userKey") String userKey, @QueryParam("username") 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 returnedusername
- username of the user whose properties are to be returned- Returns:
- a response containing EntityPropertiesKeysBean.
-
setProperty
@PUT @Path("/{propertyKey}") public jakarta.ws.rs.core.Response setProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") String propertyKey, @Context jakarta.servlet.http.HttpServletRequest request) Sets the value of the specified user's property.- Parameters:
userKey
- key of the user whose property is to be setusername
- username of the user whose property is to be setpropertyKey
- 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 be a valid, non-empty JSON conforming to http://tools.ietf.org/html/rfc4627. The maximum length of the property value is 32768 bytes.
-
getProperty
@GET @Path("/{propertyKey}") public jakarta.ws.rs.core.Response getProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") 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 returnedusername
- username of the user whose property is to be returned- Returns:
- a response containing
EntityPropertyBean
.
-
deleteProperty
@DELETE @Path("/{propertyKey}") public jakarta.ws.rs.core.Response deleteProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") 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 removedusername
- username of the user whose property is to be removed- Returns:
- a 204 HTTP status if everything goes well.
-