Class ProjectPreferencesResource
java.lang.Object
com.atlassian.jira.rest.internal.v2.project.ProjectPreferencesResource
@Path("project-preferences")
@Produces("application/json")
@Consumes("application/json")
public class ProjectPreferencesResource
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionProjectPreferencesResource(ProjectOrderByManager projectOrderByManager, JiraAuthenticationContext authContext) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponsecollectOrderByPreferences(long projectId) Retrieves order-by preferences for a specified project.jakarta.ws.rs.core.ResponsesaveOrderByPreferences(OrderByPreferences orderByPreferences) Handles the saving of order-by preferences for a given project.
-
Constructor Details
-
ProjectPreferencesResource
@Inject public ProjectPreferencesResource(ProjectOrderByManager projectOrderByManager, JiraAuthenticationContext authContext)
-
-
Method Details
-
saveOrderByPreferences
@POST public jakarta.ws.rs.core.Response saveOrderByPreferences(OrderByPreferences orderByPreferences) Handles the saving of order-by preferences for a given project. This endpoint processes anOrderByPreferencesobject that contains order-by preferences and project ID. If theOrderByPreferencesobject is null, a 400 Bad Request status is returned. Upon a successful save operation, the method returns a 200 OK status. If an error occurs during the operation, aPermissionExceptionor anIllegalArgumentExceptionis thrown, resulting in a 403 Forbidden or 400 Bad Request status.- Parameters:
orderByPreferences- the order-by preferences to be saved- Returns:
Responseindicating the success or failure of the save operation
-
collectOrderByPreferences
@GET @Path("/{projectId}") public jakarta.ws.rs.core.Response collectOrderByPreferences(@PathParam("projectId") long projectId) Retrieves order-by preferences for a specified project. On successful retrieval, the method returns a 200 OK status along with the order-by preferences as a String. If an error occurs during the retrieval process, aPermissionExceptionor anIllegalArgumentExceptionis thrown with details about the error and the project ID.- Parameters:
projectId- ID of the project for which we want to collect order-by preferences- Returns:
Responsecontaining the order-by preferences or an error status
-