Class AzureDevopsUtility
- java.lang.Object
-
- com.adobe.guides.konnect.definitions.ado.AzureDevopsUtility
-
public class AzureDevopsUtility extends Object
Utility class for the Azure DevOps Connector.This class provides utility methods for the Azure DevOps connector.
- Since:
- 1.0.0
- Author:
- Adobe
-
-
Constructor Summary
Constructors Constructor Description AzureDevopsUtility()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.azd.workitemtracking.WorkItemTrackingApi
getConnection(com.adobe.guides.konnect.definitions.core.config.Config config, String project)
Creates the connector using the config object and project name.int[]
getIds(String query)
Returns an array integers from the comma separated query string.AzureDevopsQueryDto
getQueryDto(String queryJson)
Returns the Azure DevOps query DTO from the query JSON.List<org.azd.workitemtracking.types.WorkItem>
sort(List<org.azd.workitemtracking.types.WorkItem> itemList, int[] ids)
Sorts the work items based on the IDs list.
-
-
-
Method Detail
-
getIds
public int[] getIds(String query) throws com.adobe.guides.konnect.definitions.core.exception.KonnectQueryException
Returns an array integers from the comma separated query string.- Parameters:
query
- the query string- Returns:
- an array of work item IDs
- Throws:
com.adobe.guides.konnect.definitions.core.exception.KonnectQueryException
- if the query is in an incorrect format
-
sort
public List<org.azd.workitemtracking.types.WorkItem> sort(List<org.azd.workitemtracking.types.WorkItem> itemList, int[] ids)
Sorts the work items based on the IDs list.- Parameters:
itemList
- the list of work itemsids
- the work item IDs- Returns:
- a sorted list of work items
-
getQueryDto
public AzureDevopsQueryDto getQueryDto(String queryJson) throws com.adobe.guides.konnect.definitions.core.exception.KonnectQueryException
Returns the Azure DevOps query DTO from the query JSON.- Parameters:
queryJson
- the query JSON- Returns:
- the Azure DevOps query DTO
- Throws:
com.adobe.guides.konnect.definitions.core.exception.KonnectQueryException
- if the query is in an incorrect format
-
getConnection
public org.azd.workitemtracking.WorkItemTrackingApi getConnection(com.adobe.guides.konnect.definitions.core.config.Config config, String project)
Creates the connector using the config object and project name.- Parameters:
config
- the connector configproject
- the project name- Returns:
- the
WorkItemTrackingApi
connection object.
-
-