Class ViewAPI


  • public class ViewAPI
    extends java.lang.Object
    ViewAPI contains view level operations.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ViewAPI​(AnalyticsClient ac, long orgId, long workspaceId, long viewId)
      Creates a new ViewAPI instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long addAggregateFormula​(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config)
      Add a aggregate formula in the specified table.
      long addColumn​(java.lang.String columnName, java.lang.String dataType, org.json.JSONObject config)
      Add a column in the specified table.
      void addFavorite()
      Adds a specified view as favorite.
      long addFormulaColumn​(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config)
      Add a formula column in the specified table.
      void addLookup​(long columnId, long refViewId, long refColumnId, org.json.JSONObject config)
      Add a lookup in the specified child table.
      org.json.JSONObject addRow​(org.json.JSONObject columnValues, org.json.JSONObject config)
      Add a single row in the specified table.
      void autoAnalyse​(org.json.JSONObject config)
      Auto generate reports for the specified table.
      void autoAnalyseColumn​(long columnId, org.json.JSONObject config)
      Auto generate reports for the specified column.
      void copyFormulas​(org.json.JSONArray formulaNames, long destWorkspaceId, org.json.JSONObject config, java.lang.Long destOrgId)
      Copy the specified formulas from one table to another within the workspace or across workspaces.
      java.lang.String createPrivateURL​(org.json.JSONObject config)
      Create a private URL for the specified view.
      void createSimilarViews​(long refViewId, long folderId, org.json.JSONObject config)
      Create reports for the specified table based on the reference table.
      void delete​(org.json.JSONObject config)
      Delete a specified view in the workspace.
      void deleteAggregateFormula​(long formulaId, org.json.JSONObject config)
      Delete the specified aggregate formula.
      void deleteColumn​(long columnId, org.json.JSONObject config)
      Delete a specified column in the table.
      void deleteFormulaColumn​(long formulaId, org.json.JSONObject config)
      Delete the specified formula column.
      int deleteRow​(java.lang.String criteria, org.json.JSONObject config)
      Delete rows in the specified table.
      void editAggregateFormula​(long formulaId, java.lang.String expression, org.json.JSONObject config)
      Edit the specified aggregate formula.
      void editFormulaColumn​(long formulaId, java.lang.String expression, org.json.JSONObject config)
      Edit the specified formula column.
      org.json.JSONArray getAggregateFormulas()
      Returns list of all aggregate formulas for the specified table.
      org.json.JSONObject getColumnDependents​(long columnId)
      Returns list of dependents views and formulas for the specified column.
      java.lang.String getEmbedURL​(org.json.JSONObject config)
      Returns embed URL to access the specified view.
      org.json.JSONArray getFormulaColumns()
      Returns list of all formula columns for the specified table.
      org.json.JSONObject getLastImportDetails()
      Returns last import details of the specified view.
      org.json.JSONObject getMyPermissions()
      Returns permissions for the specified view.
      java.lang.String getPrivateURL​(org.json.JSONObject config)
      Returns private URL to access the specified view.
      org.json.JSONObject getPublishConfigurations()
      Returns publish configurations for the specified view.
      org.json.JSONObject getTableMetadata()
      Retrieves metadata information for the current table, including the list of available columns and their attributes.
      org.json.JSONArray getViewDependents()
      Returns list of dependents views for the specified view.
      java.lang.String getViewURL​(org.json.JSONObject config)
      Returns the URL to access the specified view.
      void hideColumns​(org.json.JSONArray columnIds)
      Hide the specified columns in the table.
      java.lang.String makeViewPublic​(org.json.JSONObject config)
      Make the specified view publically accessible.
      void refetchData​(org.json.JSONObject config)
      Sync data from available datasource for the specified view.
      void removeFavorite()
      Remove a specified view from favorite.
      void removeLookup​(long columnId, org.json.JSONObject config)
      Remove the lookup for the specified column in the table.
      void removePrivateAccess()
      Remove private link access for the specified view.
      void removePublicAccess()
      Remove public access for the specified view.
      void rename​(java.lang.String viewName, org.json.JSONObject config)
      Rename a specified view in the workspace.
      void renameColumn​(long columnId, java.lang.String columnName)
      Rename a specified column in the table.
      void reorderColumns​(org.json.JSONArray columnIds, org.json.JSONObject config)
      Updates the column order of the current table.
      long saveAs​(java.lang.String newViewName, org.json.JSONObject config)
      Copy a specified view within the workspace.
      void showColumns​(org.json.JSONArray columnIds)
      Show the specified hidden columns in the table.
      void sortDataByColumns​(org.json.JSONArray columnIds, java.lang.Integer sortOrder, boolean resetSort, org.json.JSONObject config)
      Sorts the data in the current table based on specified columns.
      void updatePublishConfigurations​(org.json.JSONObject config)
      Update publish configurations for the specified view.
      org.json.JSONObject updateRow​(org.json.JSONObject columnValues, java.lang.String criteria, org.json.JSONObject config)
      Update rows in the specified table.
      void UpdateSharedDetails​(org.json.JSONObject config)
      Update the existing sharing configuration for the specified view.
      • Methods inherited from class java.lang.Object

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

      • ViewAPI

        protected ViewAPI​(AnalyticsClient ac,
                          long orgId,
                          long workspaceId,
                          long viewId)
        Creates a new ViewAPI instance.
        Parameters:
        ac - AnalyticsClient instance.
        orgId - The ID of the organization.
        workspaceId - The ID of the workspace.
        viewId - The ID of the view.
    • Method Detail

      • addRow

        public org.json.JSONObject addRow​(org.json.JSONObject columnValues,
                                          org.json.JSONObject config)
                                   throws ServerException,
                                          ParseException,
                                          java.io.IOException,
                                          org.json.JSONException
        Add a single row in the specified table.
        Parameters:
        columnValues - Contains the values for the row. The column names are the key.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A JSONObject of values of the added rows.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • updateRow

        public org.json.JSONObject updateRow​(org.json.JSONObject columnValues,
                                             java.lang.String criteria,
                                             org.json.JSONObject config)
                                      throws ServerException,
                                             ParseException,
                                             java.io.IOException,
                                             org.json.JSONException
        Update rows in the specified table.
        Parameters:
        columnValues - Contains the values for the row. The column names are the key.
        criteria - The criteria to be applied for updating data. Only rows matching the criteria will be updated. Should be null for update all rows.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A JSONObject of values of the updated rows.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • deleteRow

        public int deleteRow​(java.lang.String criteria,
                             org.json.JSONObject config)
                      throws ServerException,
                             ParseException,
                             java.io.IOException,
                             org.json.JSONException
        Delete rows in the specified table.
        Parameters:
        criteria - The criteria to be applied for deleting data. Only rows matching the criteria will be deleted. Should be null for delete all rows.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A int of deleted rows count.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • rename

        public void rename​(java.lang.String viewName,
                           org.json.JSONObject config)
                    throws ServerException,
                           ParseException,
                           java.io.IOException,
                           org.json.JSONException
        Rename a specified view in the workspace.
        Parameters:
        viewName - The new name of the view.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • delete

        public void delete​(org.json.JSONObject config)
                    throws ServerException,
                           ParseException,
                           java.io.IOException,
                           org.json.JSONException
        Delete a specified view in the workspace.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • saveAs

        public long saveAs​(java.lang.String newViewName,
                           org.json.JSONObject config)
                    throws ServerException,
                           ParseException,
                           java.io.IOException,
                           org.json.JSONException
        Copy a specified view within the workspace.
        Parameters:
        newViewName - The name of the new view.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A long of view id.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • createSimilarViews

        public void createSimilarViews​(long refViewId,
                                       long folderId,
                                       org.json.JSONObject config)
                                throws ServerException,
                                       ParseException,
                                       java.io.IOException,
                                       org.json.JSONException
        Create reports for the specified table based on the reference table.
        Parameters:
        refViewId - The ID of the reference view.
        folderId - The folder id where the views to be saved.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • autoAnalyse

        public void autoAnalyse​(org.json.JSONObject config)
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Auto generate reports for the specified table.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • addFavorite

        public void addFavorite()
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Adds a specified view as favorite.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • removeFavorite

        public void removeFavorite()
                            throws ServerException,
                                   ParseException,
                                   java.io.IOException,
                                   org.json.JSONException
        Remove a specified view from favorite.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getViewURL

        public java.lang.String getViewURL​(org.json.JSONObject config)
                                    throws ServerException,
                                           ParseException,
                                           java.io.IOException,
                                           org.json.JSONException
        Returns the URL to access the specified view.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Returns:
        A String of view URL.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getEmbedURL

        public java.lang.String getEmbedURL​(org.json.JSONObject config)
                                     throws ServerException,
                                            ParseException,
                                            java.io.IOException,
                                            org.json.JSONException
        Returns embed URL to access the specified view.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Returns:
        A String of Embed URL.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getPrivateURL

        public java.lang.String getPrivateURL​(org.json.JSONObject config)
                                       throws ServerException,
                                              ParseException,
                                              java.io.IOException,
                                              org.json.JSONException
        Returns private URL to access the specified view.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Returns:
        A String of private URL.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • createPrivateURL

        public java.lang.String createPrivateURL​(org.json.JSONObject config)
                                          throws ServerException,
                                                 ParseException,
                                                 java.io.IOException,
                                                 org.json.JSONException
        Create a private URL for the specified view.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Returns:
        A String of private URL.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • removePrivateAccess

        public void removePrivateAccess()
                                 throws ServerException,
                                        ParseException,
                                        java.io.IOException,
                                        org.json.JSONException
        Remove private link access for the specified view.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • makeViewPublic

        public java.lang.String makeViewPublic​(org.json.JSONObject config)
                                        throws ServerException,
                                               ParseException,
                                               java.io.IOException,
                                               org.json.JSONException
        Make the specified view publically accessible.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Returns:
        A String of public URL.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • removePublicAccess

        public void removePublicAccess()
                                throws ServerException,
                                       ParseException,
                                       java.io.IOException,
                                       org.json.JSONException
        Remove public access for the specified view.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getPublishConfigurations

        public org.json.JSONObject getPublishConfigurations()
                                                     throws ServerException,
                                                            ParseException,
                                                            java.io.IOException,
                                                            org.json.JSONException
        Returns publish configurations for the specified view.
        Returns:
        A JSONObject of publish details.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • updatePublishConfigurations

        public void updatePublishConfigurations​(org.json.JSONObject config)
                                         throws ServerException,
                                                ParseException,
                                                java.io.IOException,
                                                org.json.JSONException
        Update publish configurations for the specified view.
        Parameters:
        config - Contains the control configurations.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getMyPermissions

        public org.json.JSONObject getMyPermissions()
                                             throws ServerException,
                                                    ParseException,
                                                    java.io.IOException,
                                                    org.json.JSONException
        Returns permissions for the specified view.
        Returns:
        A JSONObject of permission details.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • addColumn

        public long addColumn​(java.lang.String columnName,
                              java.lang.String dataType,
                              org.json.JSONObject config)
                       throws ServerException,
                              ParseException,
                              java.io.IOException,
                              org.json.JSONException
        Add a column in the specified table.
        Parameters:
        columnName - The name of the column.
        dataType - The data-type of the column.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A long of column id.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • renameColumn

        public void renameColumn​(long columnId,
                                 java.lang.String columnName)
                          throws ServerException,
                                 ParseException,
                                 java.io.IOException,
                                 org.json.JSONException
        Rename a specified column in the table.
        Parameters:
        columnId - The id of the column.
        columnName - The new name of the column.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • deleteColumn

        public void deleteColumn​(long columnId,
                                 org.json.JSONObject config)
                          throws ServerException,
                                 ParseException,
                                 java.io.IOException,
                                 org.json.JSONException
        Delete a specified column in the table.
        Parameters:
        columnId - The id of the column.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • addLookup

        public void addLookup​(long columnId,
                              long refViewId,
                              long refColumnId,
                              org.json.JSONObject config)
                       throws ServerException,
                              ParseException,
                              java.io.IOException,
                              org.json.JSONException
        Add a lookup in the specified child table.
        Parameters:
        columnId - The id of the column.
        refViewId - The ID of the table contains the parent column.
        refColumnId - The ID of the parent column.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • removeLookup

        public void removeLookup​(long columnId,
                                 org.json.JSONObject config)
                          throws ServerException,
                                 ParseException,
                                 java.io.IOException,
                                 org.json.JSONException
        Remove the lookup for the specified column in the table.
        Parameters:
        columnId - The id of the column.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • hideColumns

        public void hideColumns​(org.json.JSONArray columnIds)
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Hide the specified columns in the table.
        Parameters:
        columnIds - The array of column ids to be hidden.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • showColumns

        public void showColumns​(org.json.JSONArray columnIds)
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Show the specified hidden columns in the table.
        Parameters:
        columnIds - The array of column ids to be shown.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • autoAnalyseColumn

        public void autoAnalyseColumn​(long columnId,
                                      org.json.JSONObject config)
                               throws ServerException,
                                      ParseException,
                                      java.io.IOException,
                                      org.json.JSONException
        Auto generate reports for the specified column.
        Parameters:
        columnId - The id of the column.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • copyFormulas

        public void copyFormulas​(org.json.JSONArray formulaNames,
                                 long destWorkspaceId,
                                 org.json.JSONObject config,
                                 java.lang.Long destOrgId)
                          throws ServerException,
                                 ParseException,
                                 java.io.IOException,
                                 org.json.JSONException
        Copy the specified formulas from one table to another within the workspace or across workspaces.
        Parameters:
        formulaNames - The name of the formula columns to be copied.
        destWorkspaceId - The ID of the destination workspace.
        config - Contains any additional control configurations. Can be null.
        destOrgId - Id of the organization where the destination workspace is present. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • refetchData

        public void refetchData​(org.json.JSONObject config)
                         throws ServerException,
                                ParseException,
                                java.io.IOException,
                                org.json.JSONException
        Sync data from available datasource for the specified view.
        Parameters:
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getLastImportDetails

        public org.json.JSONObject getLastImportDetails()
                                                 throws ServerException,
                                                        ParseException,
                                                        java.io.IOException,
                                                        org.json.JSONException
        Returns last import details of the specified view.
        Returns:
        A JSONObject of last import details.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getFormulaColumns

        public org.json.JSONArray getFormulaColumns()
                                             throws ServerException,
                                                    ParseException,
                                                    java.io.IOException,
                                                    org.json.JSONException
        Returns list of all formula columns for the specified table.
        Returns:
        A JSONArray of custom formulas.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • addFormulaColumn

        public long addFormulaColumn​(java.lang.String formulaName,
                                     java.lang.String expression,
                                     org.json.JSONObject config)
                              throws ServerException,
                                     ParseException,
                                     java.io.IOException,
                                     org.json.JSONException
        Add a formula column in the specified table.
        Parameters:
        formulaName - Name of the formula column to be created.
        expression - Formula expression.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A long of created formula id.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • editFormulaColumn

        public void editFormulaColumn​(long formulaId,
                                      java.lang.String expression,
                                      org.json.JSONObject config)
                               throws ServerException,
                                      ParseException,
                                      java.io.IOException,
                                      org.json.JSONException
        Edit the specified formula column.
        Parameters:
        formulaId - Id of the formula column to be updated.
        expression - Formula expression.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • deleteFormulaColumn

        public void deleteFormulaColumn​(long formulaId,
                                        org.json.JSONObject config)
                                 throws ServerException,
                                        ParseException,
                                        java.io.IOException,
                                        org.json.JSONException
        Delete the specified formula column.
        Parameters:
        formulaId - Id of the formula column to be deleted.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getAggregateFormulas

        public org.json.JSONArray getAggregateFormulas()
                                                throws ServerException,
                                                       ParseException,
                                                       java.io.IOException,
                                                       org.json.JSONException
        Returns list of all aggregate formulas for the specified table.
        Returns:
        A JSONArray of aggregate formulas.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • addAggregateFormula

        public long addAggregateFormula​(java.lang.String formulaName,
                                        java.lang.String expression,
                                        org.json.JSONObject config)
                                 throws ServerException,
                                        ParseException,
                                        java.io.IOException,
                                        org.json.JSONException
        Add a aggregate formula in the specified table.
        Parameters:
        formulaName - Name of the aggregate formula to be created.
        expression - Formula expression.
        config - Contains any additional control configurations. Can be null.
        Returns:
        A long of created formula id.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • editAggregateFormula

        public void editAggregateFormula​(long formulaId,
                                         java.lang.String expression,
                                         org.json.JSONObject config)
                                  throws ServerException,
                                         ParseException,
                                         java.io.IOException,
                                         org.json.JSONException
        Edit the specified aggregate formula.
        Parameters:
        formulaId - Id of the aggregate formula to be updated.
        expression - Formula expression.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • deleteAggregateFormula

        public void deleteAggregateFormula​(long formulaId,
                                           org.json.JSONObject config)
                                    throws ServerException,
                                           ParseException,
                                           java.io.IOException,
                                           org.json.JSONException
        Delete the specified aggregate formula.
        Parameters:
        formulaId - Id of the aggregate formula to be deleted.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getViewDependents

        public org.json.JSONArray getViewDependents()
                                             throws ServerException,
                                                    ParseException,
                                                    java.io.IOException,
                                                    org.json.JSONException
        Returns list of dependents views for the specified view.
        Returns:
        A JSONArray of dependent views.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getColumnDependents

        public org.json.JSONObject getColumnDependents​(long columnId)
                                                throws ServerException,
                                                       ParseException,
                                                       java.io.IOException,
                                                       org.json.JSONException
        Returns list of dependents views and formulas for the specified column.
        Parameters:
        columnId - Id of the column.
        Returns:
        A JSONObject of dependent views and formulas.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • UpdateSharedDetails

        public void UpdateSharedDetails​(org.json.JSONObject config)
                                 throws ServerException,
                                        ParseException,
                                        java.io.IOException,
                                        org.json.JSONException
        Update the existing sharing configuration for the specified view.
        Parameters:
        config - Contains the required control configurations.
        Throws:
        ServerException - If the server has received the request but did not process the request, due to some error.
        ParseException - If the server has responded but the client was not able to parse the response.
        java.io.IOException - If any communication related errors like request time out occurs, when trying to contact the service.
        org.json.JSONException - If any errors while processing the JSON data.
      • getTableMetadata

        public org.json.JSONObject getTableMetadata()
                                             throws ServerException,
                                                    ParseException,
                                                    java.io.IOException,
                                                    org.json.JSONException
        Retrieves metadata information for the current table, including the list of available columns and their attributes.
        Returns:
        A JSONObject containing table metadata.
        Throws:
        ServerException - If the server has received the request but did not process it.
        ParseException - If the response could not be parsed.
        java.io.IOException - If communication errors occur.
        org.json.JSONException - If JSON processing fails.
      • reorderColumns

        public void reorderColumns​(org.json.JSONArray columnIds,
                                   org.json.JSONObject config)
                            throws ServerException,
                                   ParseException,
                                   java.io.IOException,
                                   org.json.JSONException
        Updates the column order of the current table.
        Parameters:
        columnIds - JSONArray containing the full set of column IDs in the new order in which they should appear.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server failed to process the request.
        ParseException - If the response could not be parsed.
        java.io.IOException - If communication errors occur.
        org.json.JSONException - If JSON processing fails.
      • sortDataByColumns

        public void sortDataByColumns​(org.json.JSONArray columnIds,
                                      java.lang.Integer sortOrder,
                                      boolean resetSort,
                                      org.json.JSONObject config)
                               throws ServerException,
                                      ParseException,
                                      java.io.IOException,
                                      org.json.JSONException
        Sorts the data in the current table based on specified columns.
        Parameters:
        columnIds - JSONArray of column IDs to sort by.
        sortOrder - Sorting order: 1 - Ascending 2 - Descending
        resetSort - If true, resets existing sort configuration.
        config - Contains any additional control configurations. Can be null.
        Throws:
        ServerException - If the server failed to process the request.
        ParseException - If the response could not be parsed.
        java.io.IOException - If communication errors occur.
        org.json.JSONException - If JSON processing fails.