Package com.atlassian.jira.rest.v2.issue
Class ProjectPropertyResource
java.lang.Object
com.atlassian.jira.rest.v2.issue.ProjectPropertyResource
@Path("project/{projectIdOrKey}/properties")
@Consumes("application/json")
@Produces("application/json")
public class ProjectPropertyResource
extends Object
- Since:
- v6.2
-
Constructor Summary
ConstructorsConstructorDescriptionProjectPropertyResource
(ProjectPropertyService projectPropertyService, JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
deleteProperty
(String projectIdOrKey, String propertyKey) Removes the property from the project identified by the key or by the id.javax.ws.rs.core.Response
getPropertiesKeys
(String projectIdOrKey) Returns the keys of all properties for the project identified by the key or by the id.javax.ws.rs.core.Response
getProperty
(String projectIdOrKey, String propertyKey) Returns the value of the property with a given key from the project identified by the key or by the id.javax.ws.rs.core.Response
setProperty
(String projectIdOrKey, String propertyKey, javax.servlet.http.HttpServletRequest request) Sets the value of the specified project's property.
-
Constructor Details
-
ProjectPropertyResource
@Inject public ProjectPropertyResource(ProjectPropertyService projectPropertyService, JiraAuthenticationContext authContext, JiraBaseUrls jiraBaseUrls, I18nHelper i18n)
-
-
Method Details
-
getPropertiesKeys
@ExperimentalApi @GET public javax.ws.rs.core.Response getPropertiesKeys(@PathParam("projectIdOrKey") String projectIdOrKey) Returns the keys of all properties for the project identified by the key or by the id.- Parameters:
projectIdOrKey
- the project from which keys will be returned.- Returns:
- a response containing EntityPropertiesKeysBean.
-
setProperty
@ExperimentalApi @PUT @Path("/{propertyKey}") public javax.ws.rs.core.Response setProperty(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("propertyKey") String propertyKey, @Context javax.servlet.http.HttpServletRequest request) Sets the value of the specified project's property.You can use this resource to store a custom data against the project identified by the key or by the id. The user who stores the data is required to have permissions to administer the project.
- Parameters:
projectIdOrKey
- the project on which the property will be set.propertyKey
- the key of the project's property. The maximum length of the key is 255 bytes.request
- the request containing value of the project'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
@ExperimentalApi @GET @Path("/{propertyKey}") public javax.ws.rs.core.Response getProperty(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("propertyKey") String propertyKey) Returns the value of the property with a given key from the project identified by the key or by the id. The user who retrieves the property is required to have permissions to read the project.- Parameters:
projectIdOrKey
- the project from which the property will be returned.propertyKey
- the key of the property to return.- Returns:
- a response containing
EntityPropertyBean
.
-
deleteProperty
@ExperimentalApi @DELETE @Path("/{propertyKey}") public javax.ws.rs.core.Response deleteProperty(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("propertyKey") String propertyKey) Removes the property from the project identified by the key or by the id. Ths user removing the property is required to have permissions to administer the project.- Parameters:
projectIdOrKey
- the project from which the property will be removed.propertyKey
- the key of the property to remove.- Returns:
- a 204 HTTP status if everything goes well.
-