Class ExecuteAfmService


  • public class ExecuteAfmService
    extends AbstractService
    Service for executing reports with new visualization structures like AFM or Visualization Object. This includes GD API endpoints:
    • /executeAfm
    • /executeVisualization
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AFM_EXECUTION_URI
      URI string containing template link to the /executeAfm resource.
      static java.lang.String RESULT_LIMIT
      Query param representing limit of result data returned by AFM execution.
      static java.lang.String RESULT_OFFSET
      Query param representing offset of result data returned by AFM execution.
      static java.lang.String VISUALIZATION_EXECUTION_URI
      URI string containing template link to the /executeVisualization resource.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecuteAfmService​(org.springframework.web.client.RestTemplate restTemplate, GoodDataSettings settings)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.gooddata.sdk.model.executeafm.response.ExecutionResponse executeAfm​(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.executeafm.Execution execution)
      Executes the given AFM execution returning the execution response
      com.gooddata.sdk.model.executeafm.response.ExecutionResponse executeVisualization​(com.gooddata.sdk.model.project.Project project, com.gooddata.sdk.model.executeafm.VisualizationExecution execution)
      Executes the given execution returning the execution response
      FutureResult<com.gooddata.sdk.model.executeafm.result.ExecutionResult> getResult​(com.gooddata.sdk.model.executeafm.response.ExecutionResponse executionResponse)
      Get for result of given response.
      FutureResult<com.gooddata.sdk.model.executeafm.result.ExecutionResult> getResult​(com.gooddata.sdk.model.executeafm.response.ExecutionResponse executionResponse, com.gooddata.sdk.model.executeafm.ResultPage page)
      Get for page of result of given response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • AFM_EXECUTION_URI

        public static final java.lang.String AFM_EXECUTION_URI
        URI string containing template link to the /executeAfm resource.
        See Also:
        Constant Field Values
      • VISUALIZATION_EXECUTION_URI

        public static final java.lang.String VISUALIZATION_EXECUTION_URI
        URI string containing template link to the /executeVisualization resource.
        See Also:
        Constant Field Values
      • RESULT_OFFSET

        public static final java.lang.String RESULT_OFFSET
        Query param representing offset of result data returned by AFM execution. Can be used for offset query param value replacement in ExecutionResponse.getExecutionResultUri() link.
        See Also:
        Constant Field Values
      • RESULT_LIMIT

        public static final java.lang.String RESULT_LIMIT
        Query param representing limit of result data returned by AFM execution. Can be used for limit query param value replacement in ExecutionResponse.getExecutionResultUri() link.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExecuteAfmService

        public ExecuteAfmService​(org.springframework.web.client.RestTemplate restTemplate,
                                 GoodDataSettings settings)
        Constructor.
        Parameters:
        restTemplate - rest template
        settings - settings
    • Method Detail

      • executeAfm

        public com.gooddata.sdk.model.executeafm.response.ExecutionResponse executeAfm​(com.gooddata.sdk.model.project.Project project,
                                                                                       com.gooddata.sdk.model.executeafm.Execution execution)
        Executes the given AFM execution returning the execution response
        Parameters:
        project - project of the execution
        execution - execution
        Returns:
        response of the submitted execution
      • executeVisualization

        public com.gooddata.sdk.model.executeafm.response.ExecutionResponse executeVisualization​(com.gooddata.sdk.model.project.Project project,
                                                                                                 com.gooddata.sdk.model.executeafm.VisualizationExecution execution)
        Executes the given execution returning the execution response
        Parameters:
        project - project of the execution
        execution - execution
        Returns:
        response of the submitted execution
      • getResult

        public FutureResult<com.gooddata.sdk.model.executeafm.result.ExecutionResult> getResult​(com.gooddata.sdk.model.executeafm.response.ExecutionResponse executionResponse)
        Get for result of given response.
        Parameters:
        executionResponse - response to get the result
        Returns:
        future of execution result
      • getResult

        public FutureResult<com.gooddata.sdk.model.executeafm.result.ExecutionResult> getResult​(com.gooddata.sdk.model.executeafm.response.ExecutionResponse executionResponse,
                                                                                                com.gooddata.sdk.model.executeafm.ResultPage page)
        Get for page of result of given response.
        Parameters:
        executionResponse - response to get the result
        page - desired result page specification
        Returns:
        future of execution result