Class ConnectorService

java.lang.Object
com.gooddata.sdk.service.AbstractService
com.gooddata.sdk.service.connector.ConnectorService

public class ConnectorService extends AbstractService
Service for connector integration creation, update of its settings or execution of its process.
  • Field Details

    • STATUS_TEMPLATE

      public static final org.springframework.web.util.UriTemplate STATUS_TEMPLATE
  • Constructor Details

    • ConnectorService

      public ConnectorService(org.springframework.web.client.RestTemplate restTemplate, ProjectService projectService, GoodDataSettings settings)
  • Method Details

    • getIntegration

      public Integration getIntegration(Project project, ConnectorType connectorType)
      Retrieve connector integration
      Parameters:
      project - project
      connectorType - connector type
      Returns:
      integration
      Throws:
      ConnectorException - if integration can't be retrieved
    • createIntegration

      public Integration createIntegration(Project project, Settings settings)
      Create connector integration with given settings
      Parameters:
      project - project
      settings - integration settings
      Returns:
      created integration
      Throws:
      ConnectorException - if integration can't be created
    • createIntegration

      public Integration createIntegration(Project project, ConnectorType connectorType, Integration integration)
      Create connector integration
      Parameters:
      project - project
      connectorType - connector type
      integration - integration
      Returns:
      created integration
      Throws:
      ConnectorException - if integration can't be created
    • updateIntegration

      public void updateIntegration(Project project, ConnectorType connectorType, Integration integration)
      Update connector integration
      Parameters:
      project - project
      connectorType - connector type
      integration - integration
      Throws:
      ConnectorException - if integration can't be updated
    • deleteIntegration

      public void deleteIntegration(Project project, ConnectorType connectorType)
      Delete connector integration.
      Parameters:
      project - project
      connectorType - connector type
      Throws:
      IntegrationNotFoundException - if integration doesn't exist
      ConnectorException - if integration can't be deleted
    • getZendesk4Settings

      public Zendesk4Settings getZendesk4Settings(Project project)
      Get settings for zendesk4 connector.
      Parameters:
      project - project
      Returns:
      settings for zendesk4 connector
    • getSettings

      public <T extends Settings> T getSettings(Project project, ConnectorType connectorType, Class<T> settingsClass)
      Get settings for given connector of given class.
      Type Parameters:
      T - type of fetched settings
      Parameters:
      project - project
      connectorType - type of connector to fetch settings ofr
      settingsClass - class of settings fetched
      Returns:
      settings of connector
    • updateSettings

      public void updateSettings(Project project, Settings settings)
      Update integration settings
      Parameters:
      project - project
      settings - integration settings
      Throws:
      ConnectorException - if settings can't be updated
    • executeProcess

      public FutureResult<ProcessStatus> executeProcess(Project project, ProcessExecution execution)
      Execute connector process
      Parameters:
      project - project
      execution - process execution
      Returns:
      executed process
      Throws:
      ConnectorException - if process execution fails
    • getProcessStatus

      public FutureResult<ProcessStatus> getProcessStatus(IntegrationProcessStatus process)
      Gets status of provided connector process.

      You can use process retrieved by getXXXProcess methods on Integration as well as a result of executeProcess(Project, ProcessExecution).

      Parameters:
      process - process to be executed
      Returns:
      executed process
      Throws:
      ConnectorException - if process execution fails
    • getZendesk4Reload

      public Reload getZendesk4Reload(Reload reload)
      Parameters:
      reload - existing reload (self link must be present).
      Returns:
      same reload with refreshed properties (status, processId, process URI)
    • getZendesk4ReloadByUri

      public Reload getZendesk4ReloadByUri(String reloadUri)
      Get Zendesk reload.
      Parameters:
      reloadUri - existing reload URI
      Returns:
      reload
    • scheduleZendesk4Reload

      public Reload scheduleZendesk4Reload(Project project, Reload reload)
      Scheduler new reload.
      Parameters:
      project - project to reload
      reload - reload parameters
      Returns:
      created reload
    • createProcessPollResult

      protected FutureResult<ProcessStatus> createProcessPollResult(String uri)