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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.gooddata.sdk.service.AbstractService
AbstractService.OutputStreamResponseExtractor
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.web.util.UriTemplateSTATUS_TEMPLATE-
Fields inherited from class com.gooddata.sdk.service.AbstractService
mapper, restTemplate
-
-
Constructor Summary
Constructors Constructor Description ConnectorService(org.springframework.web.client.RestTemplate restTemplate, ProjectService projectService, GoodDataSettings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.gooddata.sdk.model.connector.IntegrationcreateIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, com.gooddata.sdk.model.connector.Integration integration)Create connector integrationcom.gooddata.sdk.model.connector.IntegrationcreateIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.Settings settings)Create connector integration with given settingsprotected FutureResult<com.gooddata.sdk.model.connector.ProcessStatus>createProcessPollResult(java.lang.String uri)voiddeleteIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType)Delete connector integration.FutureResult<com.gooddata.sdk.model.connector.ProcessStatus>executeProcess(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ProcessExecution execution)Execute connector processcom.gooddata.sdk.model.connector.IntegrationgetIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType)Retrieve connector integrationFutureResult<com.gooddata.sdk.model.connector.ProcessStatus>getProcessStatus(com.gooddata.sdk.model.connector.IntegrationProcessStatus process)Gets status of provided connector process.<T extends com.gooddata.sdk.model.connector.Settings>
TgetSettings(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, java.lang.Class<T> settingsClass)Get settings for given connector of given class.com.gooddata.sdk.model.connector.Zendesk4SettingsgetZendesk4Settings(com.gooddata.sdk.model.project.Project project)Get settings for zendesk4 connector.voidupdateIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, com.gooddata.sdk.model.connector.Integration integration)Update connector integrationvoidupdateSettings(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.Settings settings)Update integration settings-
Methods inherited from class com.gooddata.sdk.service.AbstractService
extractData
-
-
-
-
Constructor Detail
-
ConnectorService
public ConnectorService(org.springframework.web.client.RestTemplate restTemplate, ProjectService projectService, GoodDataSettings settings)
-
-
Method Detail
-
getIntegration
public com.gooddata.sdk.model.connector.Integration getIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType)Retrieve connector integration- Parameters:
project- projectconnectorType- connector type- Returns:
- integration
- Throws:
ConnectorException- if integration can't be retrieved
-
createIntegration
public com.gooddata.sdk.model.connector.Integration createIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.Settings settings)Create connector integration with given settings- Parameters:
project- projectsettings- integration settings- Returns:
- created integration
- Throws:
ConnectorException- if integration can't be created
-
createIntegration
public com.gooddata.sdk.model.connector.Integration createIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, com.gooddata.sdk.model.connector.Integration integration)Create connector integration- Parameters:
project- projectconnectorType- connector typeintegration- integration- Returns:
- created integration
- Throws:
ConnectorException- if integration can't be created
-
updateIntegration
public void updateIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, com.gooddata.sdk.model.connector.Integration integration)Update connector integration- Parameters:
project- projectconnectorType- connector typeintegration- integration- Throws:
ConnectorException- if integration can't be updated
-
deleteIntegration
public void deleteIntegration(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType)Delete connector integration.- Parameters:
project- projectconnectorType- connector type- Throws:
IntegrationNotFoundException- if integration doesn't existConnectorException- if integration can't be deleted
-
getZendesk4Settings
public com.gooddata.sdk.model.connector.Zendesk4Settings getZendesk4Settings(com.gooddata.sdk.model.project.Project project)
Get settings for zendesk4 connector.- Parameters:
project- project- Returns:
- settings for zendesk4 connector
-
getSettings
public <T extends com.gooddata.sdk.model.connector.Settings> T getSettings(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ConnectorType connectorType, java.lang.Class<T> settingsClass)Get settings for given connector of given class.- Type Parameters:
T- type of fetched settings- Parameters:
project- projectconnectorType- type of connector to fetch settings ofrsettingsClass- class of settings fetched- Returns:
- settings of connector
-
updateSettings
public void updateSettings(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.Settings settings)Update integration settings- Parameters:
project- projectsettings- integration settings- Throws:
ConnectorException- if settings can't be updated
-
executeProcess
public FutureResult<com.gooddata.sdk.model.connector.ProcessStatus> executeProcess(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.connector.ProcessExecution execution)
Execute connector process- Parameters:
project- projectexecution- process execution- Returns:
- executed process
- Throws:
ConnectorException- if process execution fails
-
getProcessStatus
public FutureResult<com.gooddata.sdk.model.connector.ProcessStatus> getProcessStatus(com.gooddata.sdk.model.connector.IntegrationProcessStatus process)
Gets status of provided connector process.You can use process retrieved by
getXXXProcessmethods onIntegrationas well as a result ofexecuteProcess(Project, ProcessExecution).- Parameters:
process- process to be executed- Returns:
- executed process
- Throws:
ConnectorException- if process execution fails
-
createProcessPollResult
protected FutureResult<com.gooddata.sdk.model.connector.ProcessStatus> createProcessPollResult(java.lang.String uri)
-
-