Class AzureDevopsConnector
- java.lang.Object
-
- com.adobe.guides.konnect.definitions.core.connector.RestConnector
-
- com.adobe.guides.konnect.definitions.ado.AzureDevopsConnector
-
- All Implemented Interfaces:
com.adobe.guides.konnect.definitions.core.connector.Connector
,com.adobe.guides.konnect.definitions.core.urlResource.AdditionalUrlResources
public class AzureDevopsConnector extends com.adobe.guides.konnect.definitions.core.connector.RestConnector
Azure DevOps Boards connector.This connector will connect to Azure DevOps configured via a Personal Access Token (PAT). The user can query the work items using the work item ID, WIQL query, or WIQL query ID.
- Since:
- 1.0.0
- Author:
- Adobe
-
-
Constructor Summary
Constructors Constructor Description AzureDevopsConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
areMoreResourceUrlAllowed()
Returnstrue
if more resources (apart from default shipped in this connector) are allowed to be added from the UI.boolean
enabled()
Returnstrue
if this connector is enabled.String
execute(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, com.adobe.guides.konnect.definitions.core.query.QueryInfoDto queryInfo)
Executes a single query for this connector and returns response after parsing it toJSON
.String
execute(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, List<com.adobe.guides.konnect.definitions.core.query.QueryInfoDto> queryInfoList)
Executes a list of queries for this connector and returns response after parsing it toJSON
.com.adobe.guides.konnect.definitions.core.query.QueryResultDto
executeWithLimit(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, com.adobe.guides.konnect.definitions.core.query.QueryInfoDto queryInfo)
Executes a single query for this connector with a limit.String
getAuthor()
Returns the author name for this connector.Class[]
getConfigClass()
Returns an array containing all the classes implementingConfig
which are supported by this Connector.List<com.adobe.guides.konnect.definitions.core.urlResource.RestResourceDao>
getDefaultUrlList()
Returns a list of default resources being shipped with this connector.String
getDescription()
Returns the description used to display in the UI.String
getGroup()
Returns the group name for this connector.org.apache.http.client.HttpClient
getHttpClient()
Returns aHttpClient
object to be used to execute the HTTP request.String
getLogoSvg()
Returns the SVG of the logo of the connector as a string.String
getName()
Returns the unique name for this connector.String
getQueryWithLimit(String query)
Returns aString
query with limit added to it.com.adobe.guides.konnect.definitions.core.config.RestConfig
getRestConfig(com.adobe.guides.konnect.definitions.core.config.Config config)
Returns aRestConfig
object for the Config to be used to execute a query.String
getSampleQuery()
Returns the query used to display as a sample in the UI.List<com.adobe.guides.konnect.definitions.core.models.template.TemplateDto>
getTemplates()
Returns list of templates shipped with the connector.String
getValidationQuery()
Returns the query used to validate if the connector is connected.boolean
validateConnection(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto)
Returnstrue
if this connector can connect to its data source.-
Methods inherited from class com.adobe.guides.konnect.definitions.core.connector.RestConnector
clearRestConfigOfResourceUrl, execute, getRestConfig
-
-
-
-
Method Detail
-
enabled
public boolean enabled()
Returnstrue
if this connector is enabled.- Returns:
true
if this connector is enabled.
-
getSampleQuery
public String getSampleQuery()
Returns the query used to display as a sample in the UI.- Returns:
- a
String
which is the sample query string.
-
getDescription
public String getDescription()
Returns the description used to display in the UI.- Returns:
- a
String
which is the description string.
-
getValidationQuery
public String getValidationQuery()
Returns the query used to validate if the connector is connected.- Returns:
- a
String
which is the validation query string.
-
getRestConfig
public com.adobe.guides.konnect.definitions.core.config.RestConfig getRestConfig(com.adobe.guides.konnect.definitions.core.config.Config config)
Returns aRestConfig
object for the Config to be used to execute a query.In case of this connector, it is not required.
- Specified by:
getRestConfig
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
RestConfig
which is the Config to be used to execute a query.
-
getQueryWithLimit
public String getQueryWithLimit(String query)
Returns aString
query with limit added to it. This query is used to show a preview for the connector on the UI.In case of this connector, it is same as original query.
- Specified by:
getQueryWithLimit
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
String
query with limit added to it.
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()
Returns aHttpClient
object to be used to execute the HTTP request.In case of this connector, it is not required.
- Specified by:
getHttpClient
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
HttpClient
object to be used to execute the HTTP request.
-
getDefaultUrlList
public List<com.adobe.guides.konnect.definitions.core.urlResource.RestResourceDao> getDefaultUrlList()
Returns a list of default resources being shipped with this connector.- Specified by:
getDefaultUrlList
in interfacecom.adobe.guides.konnect.definitions.core.urlResource.AdditionalUrlResources
- Overrides:
getDefaultUrlList
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
List
ofRestResourceDao
which are the default resources being shipped.
-
getName
public String getName()
Returns the unique name for this connector.- Returns:
- a
String
which is the name of this connector.
-
getGroup
public String getGroup()
Returns the group name for this connector.This group name is used to club multiple connectors into a logical grouping.
- Specified by:
getGroup
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
getGroup
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
- a
String
which is the group name of this connector.
-
getAuthor
public String getAuthor()
Returns the author name for this connector.- Specified by:
getAuthor
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
getAuthor
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
- a
String
which is the author name of this connector.
-
areMoreResourceUrlAllowed
public Boolean areMoreResourceUrlAllowed()
Returnstrue
if more resources (apart from default shipped in this connector) are allowed to be added from the UI.- Specified by:
areMoreResourceUrlAllowed
in interfacecom.adobe.guides.konnect.definitions.core.urlResource.AdditionalUrlResources
- Overrides:
areMoreResourceUrlAllowed
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Returns:
true
if more resources can be added from the UI.
-
getConfigClass
public Class[] getConfigClass()
Returns an array containing all the classes implementingConfig
which are supported by this Connector.- Returns:
- an array containing the classes implementing
Config
and supported by this connector - See Also:
Arrays.asList(Object[])
-
validateConnection
public boolean validateConnection(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto)
Returnstrue
if this connector can connect to its data source. More formally, returnstrue
if this connector can execute the validation query successfully.- Specified by:
validateConnection
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
validateConnection
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Parameters:
configDto
- - Connector config whose validity has to be tested.- Returns:
true
if this connector can connect to its external data source.
-
execute
public String execute(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, com.adobe.guides.konnect.definitions.core.query.QueryInfoDto queryInfo) throws com.adobe.guides.konnect.definitions.core.exception.KonnectException
Executes a single query for this connector and returns response after parsing it toJSON
.A query is an object of type
QueryInfoDto
.- Specified by:
execute
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
execute
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Parameters:
configDto
- Connector config which needs to be executed.queryInfo
- The query which will be executed.- Returns:
- A
String
which is the JSON response of query execution. - Throws:
com.adobe.guides.konnect.definitions.core.exception.KonnectException
- if any exception or error occurs while connecting to the external data source.
-
execute
public String execute(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, List<com.adobe.guides.konnect.definitions.core.query.QueryInfoDto> queryInfoList) throws com.adobe.guides.konnect.definitions.core.exception.KonnectException
Executes a list of queries for this connector and returns response after parsing it toJSON
.Each query is an object of type
QueryInfoDto
.- Specified by:
execute
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
execute
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Parameters:
configDto
- Connector config which needs to be executed.queryInfoList
- TheList
of queries which will be executed.- Returns:
- A
String
which is a single JSON response of all query executions. - Throws:
com.adobe.guides.konnect.definitions.core.exception.KonnectException
- if any exception or error occurs while connecting to the external data source.
-
executeWithLimit
public com.adobe.guides.konnect.definitions.core.query.QueryResultDto executeWithLimit(com.adobe.guides.konnect.definitions.core.config.ConfigDto configDto, com.adobe.guides.konnect.definitions.core.query.QueryInfoDto queryInfo) throws com.adobe.guides.konnect.definitions.core.exception.KonnectException
Executes a single query for this connector with a limit. This is used to show a preview for the connector on the UI. Response should be returned after parsing intoJSON
string.A query is an object of type
QueryInfoDto
.- Specified by:
executeWithLimit
in interfacecom.adobe.guides.konnect.definitions.core.connector.Connector
- Overrides:
executeWithLimit
in classcom.adobe.guides.konnect.definitions.core.connector.RestConnector
- Parameters:
configDto
- Connector config which needs to be executed.queryInfo
- The query which will be executed.- Returns:
- A
QueryResponseDto
which is the JSON response of query execution. - Throws:
com.adobe.guides.konnect.definitions.core.exception.KonnectException
- if any exception or error occurs while connecting to the external data source.
-
getLogoSvg
public String getLogoSvg()
Returns the SVG of the logo of the connector as a string.- Returns:
- a
String
which is the SVG of the logo.
-
getTemplates
public List<com.adobe.guides.konnect.definitions.core.models.template.TemplateDto> getTemplates()
Returns list of templates shipped with the connector.- Returns:
- a
List
ofTemplateDto
which list of templates.
-
-