Package org.azd.workitemtracking.queries
Class QueriesRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.workitemtracking.queries.QueriesRequestBuilder
Provides functionality to work with Work item queries Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request configuration object for the query parameters.static class
Represents the query parameters.static class
Request configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionQueriesRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(String query, boolean validateWiqlOnly, QueryHierarchyItem queryHierarchyItem) Creates a query, or moves a query.create
(String query, QueryHierarchyItem queryHierarchyItem) Creates a query, or moves a query.createAsync
(String query, boolean validateWiqlOnly, QueryHierarchyItem queryHierarchyItem) Creates a query, or moves a query.createAsync
(String query, QueryHierarchyItem queryHierarchyItem) Creates a query, or moves a query.Delete a query or a folder.deleteAsync
(String query) Delete a query or a folder.Retrieves an individual query and its childrenget
(String query, Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) Retrieves an individual query and its childrenRetrieves an individual query and its childrengetAsync
(String query, Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) Retrieves an individual query and its childrengetBatch
(QueryBatchGetRequest queryBatchGetRequest) Gets a list of queries by ids (Maximum 1000)getBatchAsync
(QueryBatchGetRequest queryBatchGetRequest) Gets a list of queries by ids (Maximum 1000)list()
Gets the root queries and their childrenlist
(Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) Gets the root queries and their childrenGets the root queries and their childrenlistAsync
(Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) Gets the root queries and their childrensearch
(Consumer<QueriesRequestBuilder.SearchRequestConfiguration> requestConfiguration) Searches all queries the user has access to in the current projectsearchAsync
(Consumer<QueriesRequestBuilder.SearchRequestConfiguration> requestConfiguration) Searches all queries the user has access to in the current projectupdate
(String query, boolean undeleteDescendants, QueryHierarchyItem queryHierarchyItem) Update a query or a folder.update
(String query, QueryHierarchyItem queryHierarchyItem) Update a query or a folder.updateAsync
(String query, boolean undeleteDescendants, QueryHierarchyItem queryHierarchyItem) Update a query or a folder.updateAsync
(String query, QueryHierarchyItem queryHierarchyItem) Update a query or a folder.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
QueriesRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
createAsync
public CompletableFuture<QueryHierarchyItem> createAsync(String query, QueryHierarchyItem queryHierarchyItem) throws AzDException Creates a query, or moves a query.- Parameters:
query
- The parent id or path under which the query is to be created.queryHierarchyItem
- Query Hierarchy item object.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
createAsync
public CompletableFuture<QueryHierarchyItem> createAsync(String query, boolean validateWiqlOnly, QueryHierarchyItem queryHierarchyItem) throws AzDException Creates a query, or moves a query.- Parameters:
query
- The parent id or path under which the query is to be created.validateWiqlOnly
- If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.queryHierarchyItem
- Query Hierarchy item object.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.- Parameters:
query
- The parent id or path under which the query is to be created.- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Retrieves an individual query and its children- Parameters:
query
- The parent id or path under which the query is to be created.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<QueryHierarchyItem> getAsync(String query, Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieves an individual query and its children- Parameters:
query
- The parent id or path under which the query is to be created.requestConfiguration
- Represents the query parameters.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
getBatchAsync
public CompletableFuture<QueryHierarchyItems> getBatchAsync(QueryBatchGetRequest queryBatchGetRequest) throws AzDException Gets a list of queries by ids (Maximum 1000)- Parameters:
queryBatchGetRequest
- Describes a request to get a list of queriesQueryBatchGetRequest
- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Gets the root queries and their children- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<QueryHierarchyItems> listAsync(Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Gets the root queries and their children- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
searchAsync
public CompletableFuture<QueryHierarchyItemsResult> searchAsync(Consumer<QueriesRequestBuilder.SearchRequestConfiguration> requestConfiguration) throws AzDException Searches all queries the user has access to in the current project- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of query hierarchy item
QueryHierarchyItemsResult
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<QueryHierarchyItem> updateAsync(String query, QueryHierarchyItem queryHierarchyItem) throws AzDException Update a query or a folder. This allows you to update, rename and move queries and folders.- Parameters:
query
- The ID or path for the query to update.queryHierarchyItem
- Represents an item in the work item query hierarchy. This can be either a query or a folder.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<QueryHierarchyItem> updateAsync(String query, boolean undeleteDescendants, QueryHierarchyItem queryHierarchyItem) throws AzDException Update a query or a folder. This allows you to update, rename and move queries and folders.- Parameters:
query
- The ID or path for the query to update.undeleteDescendants
- Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.queryHierarchyItem
- Represents an item in the work item query hierarchy. This can be either a query or a folder.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
create
public QueryHierarchyItem create(String query, QueryHierarchyItem queryHierarchyItem) throws AzDException Creates a query, or moves a query.- Parameters:
query
- The parent id or path under which the query is to be created.queryHierarchyItem
- Query Hierarchy item object.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
create
public QueryHierarchyItem create(String query, boolean validateWiqlOnly, QueryHierarchyItem queryHierarchyItem) throws AzDException Creates a query, or moves a query.- Parameters:
query
- The parent id or path under which the query is to be created.validateWiqlOnly
- If you only want to validate your WIQL query without actually creating one, set it to true. Default is false.queryHierarchyItem
- Query Hierarchy item object.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Delete a query or a folder. This deletes any permission change on the deleted query or folder and any of its descendants if it is a folder. It is important to note that the deleted permission changes cannot be recovered upon undeleting the query or folder.- Parameters:
query
- The parent id or path under which the query is to be created.- Throws:
AzDException
- Default Api Exception handler.
-
get
Retrieves an individual query and its children- Parameters:
query
- The parent id or path under which the query is to be created.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
get
public QueryHierarchyItem get(String query, Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Retrieves an individual query and its children- Parameters:
query
- The parent id or path under which the query is to be created.requestConfiguration
- Represents the query parameters.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
getBatch
Gets a list of queries by ids (Maximum 1000)- Parameters:
queryBatchGetRequest
- Describes a request to get a list of queriesQueryBatchGetRequest
- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
list
Gets the root queries and their children- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
list
public QueryHierarchyItems list(Consumer<QueriesRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Gets the root queries and their children- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of query hierarchy item
QueryHierarchyItems
- Throws:
AzDException
- Default Api Exception handler.
-
search
public QueryHierarchyItemsResult search(Consumer<QueriesRequestBuilder.SearchRequestConfiguration> requestConfiguration) throws AzDException Searches all queries the user has access to in the current project- Parameters:
requestConfiguration
- Represents the query parameters.- Returns:
- Collection of query hierarchy item
QueryHierarchyItemsResult
- Throws:
AzDException
- Default Api Exception handler.
-
update
public QueryHierarchyItem update(String query, QueryHierarchyItem queryHierarchyItem) throws AzDException Update a query or a folder. This allows you to update, rename and move queries and folders.- Parameters:
query
- The ID or path for the query to update.queryHierarchyItem
- Represents an item in the work item query hierarchy. This can be either a query or a folder.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-
update
public QueryHierarchyItem update(String query, boolean undeleteDescendants, QueryHierarchyItem queryHierarchyItem) throws AzDException Update a query or a folder. This allows you to update, rename and move queries and folders.- Parameters:
query
- The ID or path for the query to update.undeleteDescendants
- Undelete the children of this folder. It is important to note that this will not bring back the permission changes that were previously applied to the descendants.queryHierarchyItem
- Represents an item in the work item query hierarchy. This can be either a query or a folder.- Returns:
- QueryHierarchyItem Object
QueryHierarchyItem
- Throws:
AzDException
- Default Api Exception handler.
-