Interface QueueService
@PublicApi
public interface QueueService
Provide access to
Queue
objects and their issues-
Method Summary
Modifier and TypeMethodDescriptionaddQueue
(com.atlassian.jira.user.ApplicationUser user, QueueCreateParameters queueCreateParameters) Given the required QueueParameters create a newQueue
in the service projectvoid
deleteQueue
(com.atlassian.jira.user.ApplicationUser user, int serviceDeskId, int queueId) DeleteQueue
for the given idint
Gets the maximum number of queues allowed for a projectgetQueues
(com.atlassian.jira.user.ApplicationUser user, QueueQuery queueQuery) Get a page ofQueue
that satisfies the providedQueueQuery
.PagedResponse<com.atlassian.jira.issue.Issue>
getRequestsByQueue
(com.atlassian.jira.user.ApplicationUser user, QueueRequestQuery query) Get a page ofIssue
belonging to the specifiedQueue
newQueueCreateParameterBuilder
(int serviceDeskId, String queueName) Get a new QueueCreateParameters builder.newQueueUpdateParameterBuilder
(int serviceDeskId, int queueId) Get a new QueueUpdateParameters builder.reorderQueues
(com.atlassian.jira.user.ApplicationUser user, int serviceDeskId, List<Integer> newQueueOrderId) Reorder the list ofQueue
for a given service projectupdateQueue
(com.atlassian.jira.user.ApplicationUser user, QueueUpdateParameters queueUpdateParameters) Given the required QueueParameters update theQueue
in the service project.
-
Method Details
-
newQueueQueryBuilder
QueueQuery.Builder newQueueQueryBuilder()- Returns:
- a new
QueueQuery.Builder
instance to constructQueueQuery
-
getQueues
Get a page ofQueue
that satisfies the providedQueueQuery
.- Parameters:
user
- the user executing the requestqueueQuery
- the query parameter- Returns:
- a page of
Queue
- Throws:
ServiceDeskServiceException
- on error
-
newQueueRequestQueryBuilder
QueueRequestQuery.Builder newQueueRequestQueryBuilder()- Returns:
- a new
QueueRequestQuery.Builder
instance to constructQueueRequestQuery
-
getRequestsByQueue
PagedResponse<com.atlassian.jira.issue.Issue> getRequestsByQueue(com.atlassian.jira.user.ApplicationUser user, QueueRequestQuery query) Get a page ofIssue
belonging to the specifiedQueue
- Parameters:
user
- the user executing the requestquery
- the query parameter- Returns:
- a page of
Issue
- Throws:
ServiceDeskServiceException
- on error
-
getQueueLimitForProject
int getQueueLimitForProject()Gets the maximum number of queues allowed for a project- Returns:
- queuesLimit limit of queues for a project
-
newQueueCreateParameterBuilder
QueueCreateParameters.Builder newQueueCreateParameterBuilder(int serviceDeskId, @Nonnull String queueName) Get a new QueueCreateParameters builder.- Parameters:
serviceDeskId
- The id of a service project for the queuequeueName
- The name of the queue- Returns:
- A new
QueueCreateParameters.Builder
instance to constructQueueCreateParameters
-
newQueueUpdateParameterBuilder
Get a new QueueUpdateParameters builder.- Parameters:
serviceDeskId
- The service project for the queuequeueId
- The id of the queue to update- Returns:
- A new
QueueUpdateParameters.Builder
instance to constructQueueUpdateParameters
-
addQueue
Queue addQueue(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull QueueCreateParameters queueCreateParameters) Given the required QueueParameters create a newQueue
in the service project- Parameters:
user
- the user executing the requestqueueCreateParameters
- the create parameters- Returns:
- The newly created
Queue
- Throws:
ServiceDeskServiceException
- on error
-
updateQueue
Queue updateQueue(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull QueueUpdateParameters queueUpdateParameters) Given the required QueueParameters update theQueue
in the service project. All fields present in the update parameters will override existing values and if a field is not present it will be ignored.- Parameters:
user
- the user executing the requestqueueUpdateParameters
- the new queue parameters- Returns:
- The updated queue
Queue
- Throws:
ServiceDeskServiceException
- on error
-
deleteQueue
void deleteQueue(@Nonnull com.atlassian.jira.user.ApplicationUser user, int serviceDeskId, int queueId) DeleteQueue
for the given id- Parameters:
user
- the user executing the requestserviceDeskId
- the id of a service projectqueueId
- the id of theQueue
to delete- Throws:
ServiceDeskServiceException
- on error
-
reorderQueues
List<Queue> reorderQueues(@Nonnull com.atlassian.jira.user.ApplicationUser user, int serviceDeskId, @Nonnull List<Integer> newQueueOrderId) Reorder the list ofQueue
for a given service project- Parameters:
user
- the user executing the requestserviceDeskId
- the id of a service projectnewQueueOrderId
- the new order ofQueue
id's- Returns:
- List of all
Queue
's in the new order - Throws:
ServiceDeskServiceException
- on error
-