Class ConnectorService
java.lang.Object
com.gooddata.sdk.service.AbstractService
com.gooddata.sdk.service.connector.ConnectorService
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
FieldsModifier and TypeFieldDescriptionstatic final org.springframework.web.util.UriTemplateFields inherited from class com.gooddata.sdk.service.AbstractService
mapper, restTemplate -
Constructor Summary
ConstructorsConstructorDescriptionConnectorService(org.springframework.web.client.RestTemplate restTemplate, ProjectService projectService, GoodDataSettings settings) -
Method Summary
Modifier and TypeMethodDescriptioncreateIntegration(Project project, ConnectorType connectorType, Integration integration) Create connector integrationcreateIntegration(Project project, Settings settings) Create connector integration with given settingsprotected FutureResult<ProcessStatus>voiddeleteIntegration(Project project, ConnectorType connectorType) Delete connector integration.executeProcess(Project project, ProcessExecution execution) Execute connector processgetIntegration(Project project, ConnectorType connectorType) Retrieve connector integrationgetProcessStatus(IntegrationProcessStatus process) Gets status of provided connector process.<T extends Settings>
TgetSettings(Project project, ConnectorType connectorType, Class<T> settingsClass) Get settings for given connector of given class.getZendesk4Reload(Reload reload) Get Zendesk reload.getZendesk4ReloadByUri(String reloadUri) Get Zendesk reload.getZendesk4Settings(Project project) Get settings for zendesk4 connector.scheduleZendesk4Reload(Project project, Reload reload) Scheduler new reload.voidupdateIntegration(Project project, ConnectorType connectorType, Integration integration) Update connector integrationvoidupdateSettings(Project project, Settings settings) Update integration settingsMethods inherited from class com.gooddata.sdk.service.AbstractService
extractData
-
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
Retrieve connector integration- Parameters:
project- projectconnectorType- connector type- Returns:
- integration
- Throws:
ConnectorException- if integration can't be retrieved
-
createIntegration
Create connector integration with given settings- Parameters:
project- projectsettings- 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- projectconnectorType- connector typeintegration- 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- projectconnectorType- connector typeintegration- integration- Throws:
ConnectorException- if integration can't be updated
-
deleteIntegration
Delete connector integration.- Parameters:
project- projectconnectorType- connector type- Throws:
IntegrationNotFoundException- if integration doesn't existConnectorException- if integration can't be deleted
-
getZendesk4Settings
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- projectconnectorType- type of connector to fetch settings ofrsettingsClass- class of settings fetched- Returns:
- settings of connector
-
updateSettings
Update integration settings- Parameters:
project- projectsettings- integration settings- Throws:
ConnectorException- if settings can't be updated
-
executeProcess
Execute connector process- Parameters:
project- projectexecution- process execution- Returns:
- executed process
- Throws:
ConnectorException- if process execution fails
-
getProcessStatus
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
-
getZendesk4Reload
Get Zendesk reload. You should use the result ofscheduleZendesk4Reload(com.gooddata.sdk.model.project.Project, com.gooddata.sdk.model.connector.Reload)to see changes inReload.getStatus()andReload.getProcessId()or retrieve process URIReload.getProcessUri().- Parameters:
reload- existing reload (self link must be present).- Returns:
- same reload with refreshed properties (status, processId, process URI)
-
getZendesk4ReloadByUri
Get Zendesk reload.- Parameters:
reloadUri- existing reload URI- Returns:
- reload
-
scheduleZendesk4Reload
Scheduler new reload.- Parameters:
project- project to reloadreload- reload parameters- Returns:
- created reload
-
createProcessPollResult
-