public class ViewAPI
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
ViewAPI(AnalyticsClient ac,
long orgId,
long workspaceId,
long viewId)
Creates a new
ViewAPI instance. |
Modifier and Type | Method and 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.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.
|
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 |
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.
|
protected ViewAPI(AnalyticsClient ac, long orgId, long workspaceId, long viewId)
ViewAPI
instance.ac
- AnalyticsClient
instance.orgId
- The ID of the organization.workspaceId
- The ID of the workspace.viewId
- The ID of the view.public org.json.JSONObject addRow(org.json.JSONObject columnValues, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnValues
- Contains the values for the row. The column names are the key.config
- Contains any additional control configurations. Can be null.JSONObject
of values of the added rows.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.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
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.JSONObject
of values of the updated rows.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.public int deleteRow(java.lang.String criteria, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.int
of deleted rows count.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.public void rename(java.lang.String viewName, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
viewName
- The new name of the view.config
- Contains any additional control configurations. Can be null.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.public void delete(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.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.public long saveAs(java.lang.String newViewName, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
newViewName
- The name of the new view.config
- Contains any additional control configurations. Can be null.long
of view id.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.public void createSimilarViews(long refViewId, long folderId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.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.public void autoAnalyse(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.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.public void addFavorite() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.public void removeFavorite() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.public java.lang.String getViewURL(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.String
of view URL.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.public java.lang.String getEmbedURL(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.String
of Embed URL.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.public java.lang.String getPrivateURL(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.String
of private URL.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.public java.lang.String createPrivateURL(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.String
of private URL.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.public void removePrivateAccess() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.public java.lang.String makeViewPublic(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.String
of public URL.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.public void removePublicAccess() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.public org.json.JSONObject getPublishConfigurations() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONObject
of publish details.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.public void updatePublishConfigurations(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains the control configurations.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.public org.json.JSONObject getMyPermissions() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONObject
of permission details.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.public long addColumn(java.lang.String columnName, java.lang.String dataType, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnName
- The name of the column.dataType
- The data-type of the column.config
- Contains any additional control configurations. Can be null.long
of column id.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.public void renameColumn(long columnId, java.lang.String columnName) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnId
- The id of the column.columnName
- The new name of the column.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.public void deleteColumn(long columnId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnId
- The id of the column.config
- Contains any additional control configurations. Can be null.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.public void addLookup(long columnId, long refViewId, long refColumnId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
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.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.public void removeLookup(long columnId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnId
- The id of the column.config
- Contains any additional control configurations. Can be null.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.public void hideColumns(org.json.JSONArray columnIds) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnIds
- The array of column ids to be hidden.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.public void showColumns(org.json.JSONArray columnIds) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnIds
- The array of column ids to be shown.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.public void autoAnalyseColumn(long columnId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnId
- The id of the column.config
- Contains any additional control configurations. Can be null.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.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
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.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.public void refetchData(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains any additional control configurations. Can be null.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.public org.json.JSONObject getLastImportDetails() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONObject
of last import details.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.public org.json.JSONArray getFormulaColumns() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of custom formulas.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.public long addFormulaColumn(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaName
- Name of the formula column to be created.expression
- Formula expression.config
- Contains any additional control configurations. Can be null.long
of created formula id.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.public void editFormulaColumn(long formulaId, java.lang.String expression, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaId
- Id of the formula column to be updated.expression
- Formula expression.config
- Contains any additional control configurations. Can be null.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.public void deleteFormulaColumn(long formulaId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaId
- Id of the formula column to be deleted.config
- Contains any additional control configurations. Can be null.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.public org.json.JSONArray getAggregateFormulas() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of aggregate formulas.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.public long addAggregateFormula(java.lang.String formulaName, java.lang.String expression, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaName
- Name of the aggregate formula to be created.expression
- Formula expression.config
- Contains any additional control configurations. Can be null.long
of created formula id.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.public void editAggregateFormula(long formulaId, java.lang.String expression, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaId
- Id of the aggregate formula to be updated.expression
- Formula expression.config
- Contains any additional control configurations. Can be null.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.public void deleteAggregateFormula(long formulaId, org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
formulaId
- Id of the aggregate formula to be deleted.config
- Contains any additional control configurations. Can be null.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.public org.json.JSONArray getViewDependents() throws ServerException, ParseException, java.io.IOException, org.json.JSONException
JSONArray
of dependent views.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.public org.json.JSONObject getColumnDependents(long columnId) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
columnId
- Id of the column.JSONObject
of dependent views and formulas.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.public void UpdateSharedDetails(org.json.JSONObject config) throws ServerException, ParseException, java.io.IOException, org.json.JSONException
config
- Contains the required control configurations.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.Copyright © 2023 AdventNet Inc. All Rights Reserved.