Package com.zoho.analytics.client
Class ViewAPI
- java.lang.Object
-
- com.zoho.analytics.client.ViewAPI
-
public class ViewAPI extends java.lang.ObjectViewAPI contains view level operations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedViewAPI(AnalyticsClient ac, long orgId, long workspaceId, long viewId)Creates a newViewAPIinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddAggregateFormula(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config)Add a aggregate formula in the specified table.longaddColumn(java.lang.String columnName, java.lang.String dataType, org.json.JSONObject config)Add a column in the specified table.voidaddFavorite()Adds a specified view as favorite.longaddFormulaColumn(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config)Add a formula column in the specified table.voidaddLookup(long columnId, long refViewId, long refColumnId, org.json.JSONObject config)Add a lookup in the specified child table.org.json.JSONObjectaddRow(org.json.JSONObject columnValues, org.json.JSONObject config)Add a single row in the specified table.voidautoAnalyse(org.json.JSONObject config)Auto generate reports for the specified table.voidautoAnalyseColumn(long columnId, org.json.JSONObject config)Auto generate reports for the specified column.voidcopyFormulas(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.StringcreatePrivateURL(org.json.JSONObject config)Create a private URL for the specified view.voidcreateSimilarViews(long refViewId, long folderId, org.json.JSONObject config)Create reports for the specified table based on the reference table.voiddelete(org.json.JSONObject config)Delete a specified view in the workspace.voiddeleteAggregateFormula(long formulaId, org.json.JSONObject config)Delete the specified aggregate formula.voiddeleteColumn(long columnId, org.json.JSONObject config)Delete a specified column in the table.voiddeleteFormulaColumn(long formulaId, org.json.JSONObject config)Delete the specified formula column.intdeleteRow(java.lang.String criteria, org.json.JSONObject config)Delete rows in the specified table.voideditAggregateFormula(long formulaId, java.lang.String expression, org.json.JSONObject config)Edit the specified aggregate formula.voideditFormulaColumn(long formulaId, java.lang.String expression, org.json.JSONObject config)Edit the specified formula column.org.json.JSONArraygetAggregateFormulas()Returns list of all aggregate formulas for the specified table.org.json.JSONObjectgetColumnDependents(long columnId)Returns list of dependents views and formulas for the specified column.java.lang.StringgetEmbedURL(org.json.JSONObject config)Returns embed URL to access the specified view.org.json.JSONArraygetFormulaColumns()Returns list of all formula columns for the specified table.org.json.JSONObjectgetLastImportDetails()Returns last import details of the specified view.org.json.JSONObjectgetMyPermissions()Returns permissions for the specified view.java.lang.StringgetPrivateURL(org.json.JSONObject config)Returns private URL to access the specified view.org.json.JSONObjectgetPublishConfigurations()Returns publish configurations for the specified view.org.json.JSONObjectgetTableMetadata()Retrieves metadata information for the current table, including the list of available columns and their attributes.org.json.JSONArraygetViewDependents()Returns list of dependents views for the specified view.java.lang.StringgetViewURL(org.json.JSONObject config)Returns the URL to access the specified view.voidhideColumns(org.json.JSONArray columnIds)Hide the specified columns in the table.java.lang.StringmakeViewPublic(org.json.JSONObject config)Make the specified view publically accessible.voidrefetchData(org.json.JSONObject config)Sync data from available datasource for the specified view.voidremoveFavorite()Remove a specified view from favorite.voidremoveLookup(long columnId, org.json.JSONObject config)Remove the lookup for the specified column in the table.voidremovePrivateAccess()Remove private link access for the specified view.voidremovePublicAccess()Remove public access for the specified view.voidrename(java.lang.String viewName, org.json.JSONObject config)Rename a specified view in the workspace.voidrenameColumn(long columnId, java.lang.String columnName)Rename a specified column in the table.voidreorderColumns(org.json.JSONArray columnIds, org.json.JSONObject config)Updates the column order of the current table.longsaveAs(java.lang.String newViewName, org.json.JSONObject config)Copy a specified view within the workspace.voidshowColumns(org.json.JSONArray columnIds)Show the specified hidden columns in the table.voidsortDataByColumns(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.voidupdatePublishConfigurations(org.json.JSONObject config)Update publish configurations for the specified view.org.json.JSONObjectupdateRow(org.json.JSONObject columnValues, java.lang.String criteria, org.json.JSONObject config)Update rows in the specified table.voidUpdateSharedDetails(org.json.JSONObject config)Update the existing sharing configuration for the specified view.
-
-
-
Constructor Detail
-
ViewAPI
protected ViewAPI(AnalyticsClient ac, long orgId, long workspaceId, long viewId)
Creates a newViewAPIinstance.- Parameters:
ac-AnalyticsClientinstance.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.JSONExceptionAdd 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
JSONObjectof 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.JSONExceptionUpdate 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
JSONObjectof 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.JSONExceptionDelete 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
intof 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.JSONExceptionRename 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.JSONExceptionDelete 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.JSONExceptionCopy 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
longof 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.JSONExceptionCreate 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.JSONExceptionAuto 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.JSONExceptionAdds 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.JSONExceptionRemove 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.JSONExceptionReturns the URL to access the specified view.- Parameters:
config- Contains any additional control configurations. Can be null.- Returns:
- A
Stringof 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.JSONExceptionReturns embed URL to access the specified view.- Parameters:
config- Contains any additional control configurations. Can be null.- Returns:
- A
Stringof 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.JSONExceptionReturns private URL to access the specified view.- Parameters:
config- Contains any additional control configurations. Can be null.- Returns:
- A
Stringof 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.JSONExceptionCreate a private URL for the specified view.- Parameters:
config- Contains any additional control configurations. Can be null.- Returns:
- A
Stringof 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.JSONExceptionRemove 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.JSONExceptionMake the specified view publically accessible.- Parameters:
config- Contains any additional control configurations. Can be null.- Returns:
- A
Stringof 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.JSONExceptionRemove 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.JSONExceptionReturns publish configurations for the specified view.- Returns:
- A
JSONObjectof 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.JSONExceptionUpdate 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.JSONExceptionReturns permissions for the specified view.- Returns:
- A
JSONObjectof 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.JSONExceptionAdd 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
longof 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.JSONExceptionRename 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.JSONExceptionDelete 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.JSONExceptionAdd 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.JSONExceptionRemove 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.JSONExceptionHide 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.JSONExceptionShow 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.JSONExceptionAuto 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.JSONExceptionCopy 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.JSONExceptionSync 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.JSONExceptionReturns last import details of the specified view.- Returns:
- A
JSONObjectof 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.JSONExceptionReturns list of all formula columns for the specified table.- Returns:
- A
JSONArrayof 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.JSONExceptionAdd 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
longof 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.JSONExceptionEdit 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.JSONExceptionDelete 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.JSONExceptionReturns list of all aggregate formulas for the specified table.- Returns:
- A
JSONArrayof 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.JSONExceptionAdd 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
longof 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.JSONExceptionEdit 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.JSONExceptionDelete 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.JSONExceptionReturns list of dependents views for the specified view.- Returns:
- A
JSONArrayof 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.JSONExceptionReturns list of dependents views and formulas for the specified column.- Parameters:
columnId- Id of the column.- Returns:
- A
JSONObjectof 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.JSONExceptionUpdate 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.JSONExceptionRetrieves metadata information for the current table, including the list of available columns and their attributes.- Returns:
- A
JSONObjectcontaining 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.JSONExceptionUpdates 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.JSONExceptionSorts 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 - DescendingresetSort- 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.
-
-