Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Boolean areMoreResourceUrlAllowed()
      Returns true if more resources (apart from default shipped in this connector) are allowed to be added from the UI.
      boolean enabled()
      Returns true 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 to JSON.
      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 to JSON.
      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 implementing Config 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 a HttpClient 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 a String 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 a RestConfig 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)
      Returns true if this connector can connect to its data source.
      • Methods inherited from class com.adobe.guides.konnect.definitions.core.connector.RestConnector

        clearRestConfigOfResourceUrl, execute, getRestConfig
      • Methods inherited from interface com.adobe.guides.konnect.definitions.core.connector.Connector

        getDefaultTemplatePath, getLogoClassName, getLogoURL, getMaxNoRowsForPreviewQuery
    • Constructor Detail

      • AzureDevopsConnector

        public AzureDevopsConnector()
    • Method Detail

      • enabled

        public boolean enabled()
        Returns true 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 a RestConfig object for the Config to be used to execute a query.

        In case of this connector, it is not required.

        Specified by:
        getRestConfig in class com.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 a String 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 class com.adobe.guides.konnect.definitions.core.connector.RestConnector
        Returns:
        String query with limit added to it.
      • getHttpClient

        public org.apache.http.client.HttpClient getHttpClient()
        Returns a HttpClient object to be used to execute the HTTP request.

        In case of this connector, it is not required.

        Specified by:
        getHttpClient in class com.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 interface com.adobe.guides.konnect.definitions.core.urlResource.AdditionalUrlResources
        Overrides:
        getDefaultUrlList in class com.adobe.guides.konnect.definitions.core.connector.RestConnector
        Returns:
        List of RestResourceDao 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 interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        getGroup in class com.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 interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        getAuthor in class com.adobe.guides.konnect.definitions.core.connector.RestConnector
        Returns:
        a String which is the author name of this connector.
      • areMoreResourceUrlAllowed

        public Boolean areMoreResourceUrlAllowed()
        Returns true if more resources (apart from default shipped in this connector) are allowed to be added from the UI.
        Specified by:
        areMoreResourceUrlAllowed in interface com.adobe.guides.konnect.definitions.core.urlResource.AdditionalUrlResources
        Overrides:
        areMoreResourceUrlAllowed in class com.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 implementing Config 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)
        Returns true if this connector can connect to its data source. More formally, returns true if this connector can execute the validation query successfully.
        Specified by:
        validateConnection in interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        validateConnection in class com.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 to JSON.

        A query is an object of type QueryInfoDto.

        Specified by:
        execute in interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        execute in class com.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 to JSON.

        Each query is an object of type QueryInfoDto.

        Specified by:
        execute in interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        execute in class com.adobe.guides.konnect.definitions.core.connector.RestConnector
        Parameters:
        configDto - Connector config which needs to be executed.
        queryInfoList - The List 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 into JSON string.

        A query is an object of type QueryInfoDto.

        Specified by:
        executeWithLimit in interface com.adobe.guides.konnect.definitions.core.connector.Connector
        Overrides:
        executeWithLimit in class com.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 of TemplateDto which list of templates.