ManageEngine Analytics Plus API Docs

com.adventnet.zoho.client.report
Class ReportClient

java.lang.Object
  extended by com.adventnet.zoho.client.report.BaseClient
      extended by com.adventnet.zoho.client.report.ReportClient

public class ReportClient
extends BaseClient

ReportClient provides the java based language binding to the https based api of ManageEngine Analytics Plus.


Field Summary
static int RETRYCOUNT
           
 
Fields inherited from class com.adventnet.zoho.client.report.BaseClient
authtoken, clientId, clientSecret, DEFAULTTIMEOUT, domainAuthorization, iamServerURL, isOAuth, password, proxyInfo, readTimeout, READTIMEOUT, refreshToken, reportServerURL, skipParseError, timeOut, userEmailId
 
Constructor Summary
ReportClient(java.lang.String authtoken)
          Creates a new ReportClient instance.
ReportClient(java.lang.String clientId, java.lang.String clientSecret, java.lang.String refreshToken)
          Creates a new ReportClient instance with OAuth.
 
Method Summary
 void activateUser(java.lang.String userURI, java.lang.String emailIds, java.util.Map config)
          Activates the specified user(s) in your ManageEngine Analytics Plus Account.
 void addColumn(java.lang.String tableURI, java.lang.String columnName, java.lang.String dataType, java.util.Map config)
          Add a specified column in ManageEngine Analytics Plus Table.
 void addDbOwner(java.lang.String dbURI, java.lang.String emailIds, java.util.Map config)
          This method is used to add new owners to the reports database.
 void addLookup(java.lang.String tableURI, java.lang.String columnName, java.lang.String referredTable, java.lang.String referredColumn, java.lang.String ifErrorOnCreation, java.util.Map config)
          Adds the lookup in the specified child table.
 java.util.Map addRow(java.lang.String tableURI, java.util.Map columnValues, java.util.Map config)
          Adds a row to the specified table identified by the URI.
 void addUser(java.lang.String userURI, java.lang.String emailIds, java.util.Map config)
          Adds the specified user(s) into your ManageEngine Analytics Plus Account.
 java.util.Map autoGenReports(java.lang.String tableURI, java.lang.String source, java.util.Map config)
          Generate reports for the particular table.
 java.lang.Long copyDatabase(java.lang.String dbURI, java.util.Map config)
          Copy a specified database identified by the URI.
 void copyFormula(java.lang.String tableURI, java.lang.String formula, java.lang.String dbName, java.lang.String dbKey, java.util.Map config)
          The Copy Formula API is used to copy one or more formula columns from one table to another within the same database or across databases and even across one user account to another.
 void copyReport(java.lang.String dbURI, java.lang.String views, java.lang.String dbName, java.lang.String dbKey, java.util.Map config)
          The Copy Reports API is used to copy one or more reports from one database to another within the same account or even across user accounts.
 void create(java.lang.String loginEmailId, java.lang.String password, java.lang.String scope)
           
 java.util.Map createSimilarViews(java.lang.String tableURI, java.lang.String refView, java.lang.String folderName, boolean customFormula, boolean aggFormula, java.util.Map config)
          Create similar reports based on another table reports.
 void createTable(java.lang.String dbURI, java.lang.String tableDesignJSON, java.util.Map config)
          Create a table in the specified database.
 void deActivateUser(java.lang.String userURI, java.lang.String emailIds, java.util.Map config)
          Deactivates the specified user(s) from your ManageEngine Analytics Plus Account.
 void delete()
           
 void deleteColumn(java.lang.String tableURI, java.lang.String columnName, java.util.Map config)
          Delete a specified column from ManageEngine Analytics Plus Table.
 void deleteData(java.lang.String tableURI, java.lang.String criteria, java.util.Map config)
          Delete the data in the specified table identified by the URI.
 void deleteDatabase(java.lang.String userURI, java.lang.String databaseName, java.util.Map config)
          Delete a specified database from a ManageEngine Analytics Plus Account.
 java.lang.String deleteView(java.lang.String userURI, java.lang.String view, boolean dependency, java.util.Map config)
           
 java.util.Map disableDomainDB(java.lang.String userURI, java.lang.String dbName, java.lang.String domainName, java.util.Map config)
          Disable database for custom domain.
 java.util.Map enableDomainDB(java.lang.String userURI, java.lang.String dbName, java.lang.String domainName, java.util.Map config)
          Enable database for custom domain.
 void exportData(java.lang.String tableOrReportURI, java.lang.String format, java.io.File exportToFile, java.lang.String criteria, java.util.Map exportConfig)
          Exports the data/report of table (or report) identified by the URI.
 void exportData(java.lang.String tableOrReportURI, java.lang.String format, java.io.OutputStream exportToStream, java.lang.String criteria, java.util.Map exportConfig)
          Exports the data/report of table (or report) identified by the URI.
 void exportDataUsingSQL(java.lang.String tableOrReportURI, java.lang.String format, java.io.File exportToFile, java.lang.String sqlQuery, java.util.Map exportConfig)
          Exports the data with the given SQL Query.
 void exportDataUsingSQL(java.lang.String tableOrReportURI, java.lang.String format, java.io.OutputStream exportToStream, java.lang.String sqlQuery, java.util.Map exportConfig)
          Exports the data with the given SQL Query.
 void exportDataUsingSQLWithMetaData(java.lang.String tableOrReportURI, java.lang.String format, java.io.OutputStream exportToStream, java.lang.String sqlQuery, java.util.Map exportConfig)
          Internally used.
 java.lang.String getAuthToken()
           
 long getConnectionTimeOut()
          Returns the timeout until a connection is etablished.A value of zero means the timeout is not used.
 java.lang.String getCopyDBKey(java.lang.String dbURI, java.util.Map config)
          Get copy database key for a specified database identified by the URI.
 java.util.ArrayList getDataAsList(java.lang.String tableOrReportURI, java.lang.String criteria, java.util.Map exportConfig)
          Internally Used.
 java.util.ArrayList getDataAsListUsingSQL(java.lang.String tableOrReportURI, java.lang.String sqlQuery, java.util.Map exportConfig)
          Internally Used.
 org.w3c.dom.Document getDatabaseMetaData(java.lang.String uri, java.lang.String metadata, java.util.Map config)
          This method is used to get the meta information about the reports.
 void getDatabaseMetaData(java.lang.String uri, java.lang.String format, java.lang.Object callBackData, java.util.Map metadataParams)
          Internally Used.
 java.lang.String getDatabaseName(java.lang.String userURI, java.lang.Long dbId)
          Fetches database name.
 java.lang.String getEmbedURL(java.lang.String tableOrReportURI, java.util.Map config)
          Returns Embed URL of table (or report) identified by the URI.
 java.util.Map getInfo(java.lang.String tableURI, java.util.Map config)
          This method returns the Database ID (DBID) and View ID (OBJID) of the corresponding Database.
 PlanInfo getPlanInfo(java.lang.String userURI, java.util.Map config)
          Getting the plan informations.
 int getReadTimeout()
          Returns the read timeout value which will wait for the packet to receive from the server end.
 java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getRelatedTablesList(java.lang.String dbURI, java.lang.String[] tableNamesArray, java.util.Map config)
          This method will return the list of related tables (For Advanced Upload Tool)
 ShareInfo getShareInfo(java.lang.String dbURI, java.util.Map config)
          Get sharing information of the particular database.
 java.lang.String getURI(java.lang.String userEmailId)
          Returns the URI for the specified user login email id.
 java.lang.String getURI(java.lang.String dbOwnerEmailId, java.lang.String dbName)
          Returns the URI for the specified database.
 java.lang.String getURI(java.lang.String dbOwnerEmailId, java.lang.String dbName, java.lang.String tableOrReportName)
          Returns the URI for the specified database table (or report).
static java.lang.String getURIForDB(java.lang.String oldURI, java.lang.String dbName)
          Internally Used.
 java.util.ArrayList getUsers(java.lang.String userURI, java.util.Map config)
          Get list of users for the particular account.
 java.lang.String getViewName(java.lang.String userURI, java.lang.Long objId, java.util.Map config)
          This function returns the name of a view in ManageEngine Analytics Plus.
 java.lang.String getViewURL(java.lang.String tableURI, java.util.Map config)
          This method returns the URL to access the mentioned view.
protected  java.lang.Object handleResponse(org.apache.commons.httpclient.HttpMethod method, java.lang.String action, java.lang.Object callBackData)
          Internally Used.
 java.util.Map hideColumn(java.lang.String tableURI, java.util.List columnNames, java.util.Map config)
          Hide the shown columns in the particular table.
 ImportResult importData(java.lang.String tableURI, java.lang.String importType, java.io.File csvFile, java.util.Map importConfig, boolean retryOnRequestTimeout)
          Import the data contained in a CSV file into the table identified by the URI.
 ImportResult importData(java.lang.String tableURI, java.lang.String importType, java.io.InputStream iStream, java.util.Map<java.lang.String,java.lang.String> importConfig, boolean retryOnRequestTimeout)
          Import the data from the input stream into the table identified by the URI.
 ImportResult importDataInBatches(java.lang.String tableURI, java.lang.String importType, java.io.File csvFile, java.util.Map importConfig, int batchSize)
          Import the data contained in a CSV file into the table identified by the URI.
 ImportResult importDataInBatches(java.lang.String tableURI, java.lang.String importType, java.io.InputStream iStream, java.util.Map<java.lang.String,java.lang.String> importConfig, int batchSize)
          Import data from the input stream into the table identified by the URI.
protected  ImportResult importTblData(java.lang.String tableURI, java.lang.String importType, java.io.File csvFile, java.util.Map importConfig, java.util.Map dataTypeConfig, boolean retryOnRequestTimeout)
           
 boolean isDbExist(java.lang.String userURI, java.lang.String dbName, java.util.Map config)
          Check wheather the database is exist or not.
 java.util.Map<java.lang.String,java.lang.String> isSystemTable(java.lang.String dbURI, java.util.Map config)
          to check the if the particular tables is system table identified by the URI.
 boolean isValidate(java.lang.String userURI)
           
static void main(java.lang.String[] args)
           
 void removeDbOwner(java.lang.String dbURI, java.lang.String emailIds, java.util.Map config)
          This method is used to remove the existing owners from the reports database.
 void removeLookup(java.lang.String tableURI, java.lang.String columnName, java.util.Map config)
          Removes the lookup for the specified column in the given table.
 void removeShare(java.lang.String dbURI, java.lang.String emailIds, java.util.Map config)
          This method is used to remove the shared views (tables/reports/dashboards) in ManageEngine Analytics Plus from the users.
 void removeUser(java.lang.String userURI, java.lang.String emailIds, java.util.Map config)
          Removes the specified user(s) from your ManageEngine Analytics Plus Account.
 void renameColumn(java.lang.String tableURI, java.lang.String oldColumnName, java.lang.String newColumnName, java.util.Map config)
          Rename a specified column in ManageEngine Analytics Plus Table.
 void renameView(java.lang.String dbURI, java.lang.String viewName, java.lang.String newViewName, java.lang.String newViewDesc, java.util.Map config)
          Rename the specified view with the new name and description.
protected  java.lang.Object sendRequest(org.apache.commons.httpclient.HttpClient client, org.apache.commons.httpclient.HttpMethod method, java.lang.String action, java.lang.Object callBackData)
           
 void setConnectionTimeOut(int timeOut)
          Sets the timeout until a connection is etablished.
 void setDomainAuthorization()
           
 void setNTLMProxy(java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, java.lang.String protocol)
          Used to specify the proxy server details.
 void setProxy(java.lang.String proxyHost, int proxyPort, java.lang.String proxyUserName, java.lang.String proxyPassword, java.lang.String protocol)
          Used to specify the proxy server details.
 void setReadTimeout(int readTimeout)
          Sets the read timeout which will wait for data response from the server end.
 void shareView(java.lang.String dbURI, java.lang.String views, java.lang.String emailIds, java.util.Map config)
          This method is used to share the views (tables/reports/dashboards) created in ManageEngine Analytics Plus with users.
 java.util.Map showColumn(java.lang.String tableURI, java.util.List columnNames, java.util.Map config)
          Show the hidden columns in the particular table.
 void skipParseError()
           
 java.lang.String truncColumnHeaders(java.lang.String columnHeaders, java.util.Map importConfig)
           
 void updateData(java.lang.String tableURI, java.util.Map columnValues, java.lang.String criteria, java.util.Map config)
          update the data in the specified table identified by the URI.
 java.lang.String uriSplCharReplace(java.lang.String value)
          Internal method for handling special charecters in table or database name.
 
Methods inherited from class com.adventnet.zoho.client.report.BaseClient
eP, eQ, getClient, getOAuth, logIfNeeded, logIfNeeded, setIamServerURL, setReportServerURL, setSSLProtocol, writeLine, writeLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RETRYCOUNT

public static final int RETRYCOUNT
See Also:
Constant Field Values
Constructor Detail

ReportClient

public ReportClient(java.lang.String authtoken)
Creates a new ReportClient instance.

Parameters:
authtoken -

ReportClient

public ReportClient(java.lang.String clientId,
                    java.lang.String clientSecret,
                    java.lang.String refreshToken)
             throws java.lang.Exception
Creates a new ReportClient instance with OAuth.

Parameters:
clientId -
clientSecret -
refreshToken -
Throws:
java.lang.Exception
Method Detail

getConnectionTimeOut

public long getConnectionTimeOut()
Returns the timeout until a connection is etablished.A value of zero means the timeout is not used. The default value is 15000.

Returns:
A long value.

getReadTimeout

public int getReadTimeout()
Returns the read timeout value which will wait for the packet to receive from the server end. The default value is 0.

Returns:
A int value.

setConnectionTimeOut

public void setConnectionTimeOut(int timeOut)
Sets the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is 15000.

Parameters:
timeOut - An int value.

setReadTimeout

public void setReadTimeout(int readTimeout)
Sets the read timeout which will wait for data response from the server end. The default value is 0

Parameters:
readTimeout - An code>int value.

skipParseError

public void skipParseError()

setDomainAuthorization

public void setDomainAuthorization()

create

public void create(java.lang.String loginEmailId,
                   java.lang.String password,
                   java.lang.String scope)
            throws java.io.IOException,
                   ServerException
Throws:
java.lang.Exception
java.io.IOException
ServerException

handleResponse

protected java.lang.Object handleResponse(org.apache.commons.httpclient.HttpMethod method,
                                          java.lang.String action,
                                          java.lang.Object callBackData)
                                   throws java.io.IOException,
                                          ParseException
Internally Used.

Overrides:
handleResponse in class BaseClient
Throws:
java.io.IOException
ParseException

getAuthToken

public java.lang.String getAuthToken()
                              throws java.lang.Exception
Throws:
java.lang.Exception

getURI

public java.lang.String getURI(java.lang.String dbOwnerEmailId,
                               java.lang.String dbName,
                               java.lang.String tableOrReportName)
                        throws java.io.IOException
Returns the URI for the specified database table (or report).

Parameters:
dbOwnerEmailId - The owner of the database containing the table (or report).
dbName - The name of the database containing the table (or report).
tableOrReportName - The name of the table (or report).
Returns:
the URI for the specified table (or report).
Throws:
java.io.IOException - If an error occurs.

getURI

public java.lang.String getURI(java.lang.String userEmailId)
                        throws java.io.IOException
Returns the URI for the specified user login email id.

Parameters:
userEmailId - User email id to get the user uri.
Returns:
the URI for the specified username.
Throws:
java.io.IOException - If an error occurs.

getURI

public java.lang.String getURI(java.lang.String dbOwnerEmailId,
                               java.lang.String dbName)
                        throws java.io.IOException
Returns the URI for the specified database.

Parameters:
dbOwnerEmailId - The owner of the database.
dbName - The name of the database.
Returns:
the URI for the specified database.
Throws:
java.io.IOException - If an error occurs.

uriSplCharReplace

public java.lang.String uriSplCharReplace(java.lang.String value)
Internal method for handling special charecters in table or database name.


getURIForDB

public static java.lang.String getURIForDB(java.lang.String oldURI,
                                           java.lang.String dbName)
                                    throws org.apache.commons.httpclient.URIException
Internally Used.

Throws:
org.apache.commons.httpclient.URIException

addRow

public java.util.Map addRow(java.lang.String tableURI,
                            java.util.Map columnValues,
                            java.util.Map config)
                     throws java.io.IOException,
                            ServerException,
                            ParseException
Adds a row to the specified table identified by the URI.

Parameters:
tableURI - The URI of the table. See getURI.
columnValues - Contains the values for the row. The column name(s) are the key.
config - Contains any additional control parameters like ZOHO_DATE_FORMAT. Can be null.
Returns:
A Map of values of the row.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

updateData

public void updateData(java.lang.String tableURI,
                       java.util.Map columnValues,
                       java.lang.String criteria,
                       java.util.Map config)
                throws java.io.IOException,
                       ServerException,
                       ParseException
update the data in the specified table identified by the URI.

Parameters:
tableURI - The URI of the table. See getURI.
columnValues - Contains the values to be updated. The column name(s) are the key.
criteria - The criteria to be applied for updating. Only rows matching the criteria will be updated. Can be null. Incase it is null, then all rows will be updated.
config - contains any additional control parameters like ZOHO_DATE_FORMAT. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

deleteData

public void deleteData(java.lang.String tableURI,
                       java.lang.String criteria,
                       java.util.Map config)
                throws java.io.IOException,
                       ServerException,
                       ParseException
Delete the data in the specified table identified by the URI.

Parameters:
tableURI - The URI of the table. See getURI.
criteria - The criteria to be applied for deleting. Only rows matching the criteria will be deleted. Can be null. Incase it is null, then all rows will be deleted.
config - contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

deleteView

public java.lang.String deleteView(java.lang.String userURI,
                                   java.lang.String view,
                                   boolean dependency,
                                   java.util.Map config)
                            throws java.lang.Exception
Throws:
java.lang.Exception

exportData

public void exportData(java.lang.String tableOrReportURI,
                       java.lang.String format,
                       java.io.File exportToFile,
                       java.lang.String criteria,
                       java.util.Map exportConfig)
                throws java.io.IOException,
                       ServerException,
                       ParseException
Exports the data/report of table (or report) identified by the URI.

Parameters:
tableOrReportURI - The URI of the table. See getURI.
format - The format in which the data is to be exported. See Supported Export Formats for the supported types.
exportToFile - Specifies the file to which the data is exported.
criteria - The criteria to be applied for exporting. Only rows matching the criteria will be exported. Can be null. Incase it is null, then all rows will be updated.
exportConfig - contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

exportData

public void exportData(java.lang.String tableOrReportURI,
                       java.lang.String format,
                       java.io.OutputStream exportToStream,
                       java.lang.String criteria,
                       java.util.Map exportConfig)
                throws java.io.IOException,
                       ServerException,
                       ParseException
Exports the data/report of table (or report) identified by the URI.

Parameters:
tableOrReportURI - The URI of the table. See getURI.
format - The format in which the data is to be exported. See abc for the supported types.
exportToStream - Specifies the io stream to which the data is to be exported.
criteria - The criteria to be applied for exporting. Only rows matching the criteria will be exported. Can be null. Incase it is null, then all rows will be updated.
exportConfig - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

exportDataUsingSQL

public void exportDataUsingSQL(java.lang.String tableOrReportURI,
                               java.lang.String format,
                               java.io.File exportToFile,
                               java.lang.String sqlQuery,
                               java.util.Map exportConfig)
                        throws java.io.IOException,
                               ServerException,
                               ParseException
Exports the data with the given SQL Query.

Parameters:
tableOrReportURI - the URI of the database. See getURI.
format - the format in which the data is to be exported. See abc for the supported types.
exportToFile - Specifies the file to which the data is exported.
sqlQuery - The SQL Query whose output is exported.
exportConfig - contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

exportDataUsingSQL

public void exportDataUsingSQL(java.lang.String tableOrReportURI,
                               java.lang.String format,
                               java.io.OutputStream exportToStream,
                               java.lang.String sqlQuery,
                               java.util.Map exportConfig)
                        throws java.io.IOException,
                               ServerException,
                               ParseException
Exports the data with the given SQL Query.

Parameters:
tableOrReportURI - The URI of the database. See getURI.
format - The format in which the data is to be exported. See abc for the supported types.
exportToStream - Specifies the io stream to which the data is to be exported.
sqlQuery - The SQL Query whose output is exported.
exportConfig - contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

exportDataUsingSQLWithMetaData

public void exportDataUsingSQLWithMetaData(java.lang.String tableOrReportURI,
                                           java.lang.String format,
                                           java.io.OutputStream exportToStream,
                                           java.lang.String sqlQuery,
                                           java.util.Map exportConfig)
                                    throws java.io.IOException,
                                           ServerException,
                                           ParseException
Internally used.

Throws:
java.io.IOException
ServerException
ParseException

getDataAsListUsingSQL

public java.util.ArrayList getDataAsListUsingSQL(java.lang.String tableOrReportURI,
                                                 java.lang.String sqlQuery,
                                                 java.util.Map exportConfig)
                                          throws java.io.IOException,
                                                 ServerException,
                                                 ParseException
Internally Used.

Throws:
java.io.IOException
ServerException
ParseException

getDataAsList

public java.util.ArrayList getDataAsList(java.lang.String tableOrReportURI,
                                         java.lang.String criteria,
                                         java.util.Map exportConfig)
                                  throws java.io.IOException,
                                         ServerException,
                                         ParseException
Internally Used.

Throws:
java.io.IOException
ServerException
ParseException

copyDatabase

public java.lang.Long copyDatabase(java.lang.String dbURI,
                                   java.util.Map config)
                            throws java.io.IOException,
                                   ServerException,
                                   ParseException
Copy a specified database identified by the URI.

Parameters:
dbURI - The URI of the database. See getURI.
config - Contains any additional control parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

deleteDatabase

public void deleteDatabase(java.lang.String userURI,
                           java.lang.String databaseName,
                           java.util.Map config)
                    throws java.io.IOException,
                           ServerException,
                           ParseException
Delete a specified database from a ManageEngine Analytics Plus Account.

Parameters:
userURI - The URI of the database. See getURI.
databaseName - The name of the database to be deleted from the ManageEngine Analytics Plus Account.
config - Contains any additional control parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

enableDomainDB

public java.util.Map enableDomainDB(java.lang.String userURI,
                                    java.lang.String dbName,
                                    java.lang.String domainName,
                                    java.util.Map config)
                             throws java.io.IOException,
                                    ServerException,
                                    ParseException
Enable database for custom domain.

Parameters:
userURI - The URI of the user. See getURI.
dbName - The name of the database to be enabled to the client portal.
domainName - Client portal domain name.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of result of enableDomainDB.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

disableDomainDB

public java.util.Map disableDomainDB(java.lang.String userURI,
                                     java.lang.String dbName,
                                     java.lang.String domainName,
                                     java.util.Map config)
                              throws java.io.IOException,
                                     ServerException,
                                     ParseException
Disable database for custom domain.

Parameters:
userURI - the URI of the user. See getURI.
dbName - The name of the database to be disabled to the client portal.
domainName - Client portal domain name.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of result of disableDomainDB.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

createTable

public void createTable(java.lang.String dbURI,
                        java.lang.String tableDesignJSON,
                        java.util.Map config)
                 throws java.lang.Exception
Create a table in the specified database.

Parameters:
dbURI - The URI of the database.See getURI.
tableDesign - Table structure in JSON format.
Example - ("TABLENAME":"tablename","TABLEDESCRIPTION":"description","FOLDERNAME": "foldername","COLUMNS":[{"COLUMNNAME":"name","DATATYPE":"datatype","DEFAULT":"null","MANDATORY":"yes","DESCRIPTION":"Testing"},{"COLUMNNAME":"name","DATATYPE":"datatype","DEFAULT":"null","MANDATORY":"yes","DESCRIPTION":"Testing","LOOKUPCOLUMN":{"TABLENAME":"tablename","COLUMNNAME":"columnname"}}]).
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

autoGenReports

public java.util.Map autoGenReports(java.lang.String tableURI,
                                    java.lang.String source,
                                    java.util.Map config)
                             throws java.io.IOException,
                                    ServerException,
                                    ParseException
Generate reports for the particular table.

Parameters:
tableURI - The URI of the table. See getURI.
source - This will decide the report is based on TABLE or COLUMN.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of result of the generated report.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

createSimilarViews

public java.util.Map createSimilarViews(java.lang.String tableURI,
                                        java.lang.String refView,
                                        java.lang.String folderName,
                                        boolean customFormula,
                                        boolean aggFormula,
                                        java.util.Map config)
                                 throws java.io.IOException,
                                        ServerException,
                                        ParseException
Create similar reports based on another table reports.

Parameters:
tableURI - The URI of the table. See getURI.
refView - The reference table name.
folderName - Folder name where the reports to be saved.
customFormula - If true, it will create reports with custom formula.
aggFormula - If true, it will create reports with aggregate formula.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of result of createSimilarViews.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

renameView

public void renameView(java.lang.String dbURI,
                       java.lang.String viewName,
                       java.lang.String newViewName,
                       java.lang.String newViewDesc,
                       java.util.Map config)
                throws java.lang.Exception
Rename the specified view with the new name and description.

Parameters:
dbURI - The URI of the database.See getURI.
viewName - Current name of the view.
newViewName - New name for the view.
newViewDesc - New description for the view.
config - contains any additional control parameters.
Throws:
java.lang.Exception

copyReport

public void copyReport(java.lang.String dbURI,
                       java.lang.String views,
                       java.lang.String dbName,
                       java.lang.String dbKey,
                       java.util.Map config)
                throws java.io.IOException,
                       ServerException,
                       ParseException
The Copy Reports API is used to copy one or more reports from one database to another within the same account or even across user accounts.

Parameters:
dbURI - The URI of the database. See getURI.
views - This parameter holds the list of view names.
dbName - The database name where the report's had to be copied.
dbKey - The secret key used for allowing the user to copy the reports.
config - Can contains any additional parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

copyFormula

public void copyFormula(java.lang.String tableURI,
                        java.lang.String formula,
                        java.lang.String dbName,
                        java.lang.String dbKey,
                        java.util.Map config)
                 throws java.io.IOException,
                        ServerException,
                        ParseException
The Copy Formula API is used to copy one or more formula columns from one table to another within the same database or across databases and even across one user account to another.

Parameters:
tableURI - The URI of the table. See getURI.
formula - This parameter holds the list of formula names.
dbName - The database name where the formula's had to be copied.
dbKey - The secret key used for allowing the user to copy the formula.
config - Can contains any additional parameters.Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

addColumn

public void addColumn(java.lang.String tableURI,
                      java.lang.String columnName,
                      java.lang.String dataType,
                      java.util.Map config)
               throws java.lang.Exception
Add a specified column in ManageEngine Analytics Plus Table.

Parameters:
tableURI - The URI of the table. See getURI.
columnName - The name of the column to be added in the ManageEngine Analytics Plus Table.
datatype - The datatype of the column to be added in the ManageEngine Analytics Plus Table.
config - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

deleteColumn

public void deleteColumn(java.lang.String tableURI,
                         java.lang.String columnName,
                         java.util.Map config)
                  throws java.lang.Exception
Delete a specified column from ManageEngine Analytics Plus Table.

Parameters:
tableURI - The URI of the table. See getURI.
columnName - The name of the column to be deleted from the ManageEngine Analytics Plus Table.
config - Contains any additional control parameters.Can e null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

isValidate

public boolean isValidate(java.lang.String userURI)
                   throws java.lang.Exception
Throws:
java.lang.Exception

renameColumn

public void renameColumn(java.lang.String tableURI,
                         java.lang.String oldColumnName,
                         java.lang.String newColumnName,
                         java.util.Map config)
                  throws java.lang.Exception
Rename a specified column in ManageEngine Analytics Plus Table.

Parameters:
tableURI - The URI of the table. See getURI.
oldColumnName - The name of the column to be renamed in the ManageEngine Analytics Plus Table.
newColumnName - New name of the column.
config - Contains any additional control parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

hideColumn

public java.util.Map hideColumn(java.lang.String tableURI,
                                java.util.List columnNames,
                                java.util.Map config)
                         throws java.io.IOException,
                                ServerException,
                                ParseException
Hide the shown columns in the particular table.

Parameters:
tableURI - The URI of the table. See getURI.
columnNames - Contains the name of the columns.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of values of the column details.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

showColumn

public java.util.Map showColumn(java.lang.String tableURI,
                                java.util.List columnNames,
                                java.util.Map config)
                         throws java.io.IOException,
                                ServerException,
                                ParseException
Show the hidden columns in the particular table.

Parameters:
tableURI - The URI of the table. See getURI.
columnNames - Contains the name of the columns.
config - Contains any additional control parameters. Can be null.
Returns:
A Map of values of the column details.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

addLookup

public void addLookup(java.lang.String tableURI,
                      java.lang.String columnName,
                      java.lang.String referredTable,
                      java.lang.String referredColumn,
                      java.lang.String ifErrorOnCreation,
                      java.util.Map config)
               throws java.lang.Exception
Adds the lookup in the specified child table.

Parameters:
tableURI - The URI of the table. See getURI.
columnName - The name of the column to be added in the ManageEngine Analytics Plus Table.
referredTable - Name of the referred table.
referredColumn - Name of the column in the referred table.
errorOnConversion - ABORT/EMPTY if error on conversion.
config - Contains any additional control parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

removeLookup

public void removeLookup(java.lang.String tableURI,
                         java.lang.String columnName,
                         java.util.Map config)
                  throws java.lang.Exception
Removes the lookup for the specified column in the given table.

Parameters:
tableURI - The URI of the table.See getURI.
columnName - Name of the column.
config - Contains any additional control parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

getDatabaseMetaData

public void getDatabaseMetaData(java.lang.String uri,
                                java.lang.String format,
                                java.lang.Object callBackData,
                                java.util.Map metadataParams)
                         throws java.io.IOException,
                                ServerException,
                                ParseException
Internally Used.

Throws:
java.io.IOException
ServerException
ParseException

getDatabaseMetaData

public org.w3c.dom.Document getDatabaseMetaData(java.lang.String uri,
                                                java.lang.String metadata,
                                                java.util.Map config)
                                         throws java.io.IOException,
                                                ServerException,
                                                ParseException
This method is used to get the meta information about the reports.

Parameters:
uri - The URI of the user or database.See getURI.
config - Can contains any additional parameters.
Returns:
A Document of Database meta information.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getDatabaseName

public java.lang.String getDatabaseName(java.lang.String userURI,
                                        java.lang.Long dbId)
                                 throws java.lang.Exception
Fetches database name.

Parameters:
userURI - The URL of the user. See getURI.
dbId - Contains the Database id for that database whose name has to be fetched.
Returns:
A String of Database name for the specified dbid.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

getCopyDBKey

public java.lang.String getCopyDBKey(java.lang.String dbURI,
                                     java.util.Map config)
                              throws java.io.IOException,
                                     ServerException,
                                     ParseException
Get copy database key for a specified database identified by the URI.

Parameters:
dbURI - The URI of the database. See getURI.
config - Contains any additional control parameters. Can be null.
Returns:
A String of Database key.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

isDbExist

public boolean isDbExist(java.lang.String userURI,
                         java.lang.String dbName,
                         java.util.Map config)
                  throws java.io.IOException,
                         ServerException,
                         ParseException
Check wheather the database is exist or not.

Parameters:
userURI - The URI of the user. See getURI.
dbName - Contains the database name.
config - Contains any additional control parameters. Can be null.
Returns:
A boolean of result of isdbexist.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getViewName

public java.lang.String getViewName(java.lang.String userURI,
                                    java.lang.Long objId,
                                    java.util.Map config)
                             throws java.io.IOException,
                                    ServerException,
                                    ParseException
This function returns the name of a view in ManageEngine Analytics Plus.

Parameters:
userURI - The URI of the user. See getURI.
objId - Object id for the view.
config - Can contains any additional parameters.
Returns:
A String of view name.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getInfo

public java.util.Map getInfo(java.lang.String tableURI,
                             java.util.Map config)
                      throws java.io.IOException,
                             ServerException,
                             ParseException
This method returns the Database ID (DBID) and View ID (OBJID) of the corresponding Database.

Parameters:
tableURI - The URI of the table.See getURI.
config - Can contains any additional parameters.
Returns:
A Map of DBID and OBJID.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

shareView

public void shareView(java.lang.String dbURI,
                      java.lang.String views,
                      java.lang.String emailIds,
                      java.util.Map config)
               throws java.io.IOException,
                      ServerException,
                      ParseException
This method is used to share the views (tables/reports/dashboards) created in ManageEngine Analytics Plus with users.

Parameters:
dbURI - The URI of the database.See getURI.
views - Contains the view names.
emailIds - Contains the owners email-id.
config - Can contains any additional parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

removeShare

public void removeShare(java.lang.String dbURI,
                        java.lang.String emailIds,
                        java.util.Map config)
                 throws java.io.IOException,
                        ServerException,
                        ParseException
This method is used to remove the shared views (tables/reports/dashboards) in ManageEngine Analytics Plus from the users.

Parameters:
dbURI - The URI of the database.See getURI.
emailIds - Contains the owners email-id.
config - Can contains any additional parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

addDbOwner

public void addDbOwner(java.lang.String dbURI,
                       java.lang.String emailIds,
                       java.util.Map config)
                throws java.io.IOException,
                       ServerException,
                       ParseException
This method is used to add new owners to the reports database.

Parameters:
dbURI - The URI of the database.See getURI.
emailIds - Contains the owners email-id.
config - Can contains any additional parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

removeDbOwner

public void removeDbOwner(java.lang.String dbURI,
                          java.lang.String emailIds,
                          java.util.Map config)
                   throws java.io.IOException,
                          ServerException,
                          ParseException
This method is used to remove the existing owners from the reports database.

Parameters:
dbURI - The URI of the database.See getURI.
emailIds - Contains the owners email-id.
config - Can contains any additional parameters.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getShareInfo

public ShareInfo getShareInfo(java.lang.String dbURI,
                              java.util.Map config)
                       throws java.lang.Exception
Get sharing information of the particular database.

Parameters:
dbURI - The URI of the database. See getURI.
config - Contains any additional control parameters. Can be null. See User Configuration .
Returns:
Shareinfo object.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

getViewURL

public java.lang.String getViewURL(java.lang.String tableURI,
                                   java.util.Map config)
                            throws java.io.IOException,
                                   ServerException,
                                   ParseException
This method returns the URL to access the mentioned view.

Parameters:
tableURI - The URI of the table.See getURI.
config - Can contains any additional parameters.
Returns:
A String of view URL.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getEmbedURL

public java.lang.String getEmbedURL(java.lang.String tableOrReportURI,
                                    java.util.Map config)
                             throws java.io.IOException,
                                    ServerException,
                                    ParseException
Returns Embed URL of table (or report) identified by the URI. This API will be enabled based on the user request to analyticsplus-support@zohocorp.com.

Parameters:
tableOrReportURI - The URI of the table. See getURI.
config - Contains any additional control parameters. Can be null. See User Configuration .
Returns:
A String of Embed URL.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getUsers

public java.util.ArrayList getUsers(java.lang.String userURI,
                                    java.util.Map config)
                             throws java.io.IOException,
                                    ServerException,
                                    ParseException
Get list of users for the particular account.

Parameters:
userURI - The URI of the user. See getURI.
config - Contains any additional control parameters. Can be null.
Returns:
A ArrayList of users list.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

addUser

public void addUser(java.lang.String userURI,
                    java.lang.String emailIds,
                    java.util.Map config)
             throws java.io.IOException,
                    ServerException,
                    ParseException
Adds the specified user(s) into your ManageEngine Analytics Plus Account.

Parameters:
userURI - The URL of the user. See getURI.
emailIds - The email addresses of the users to be added to your ManageEngine Analytics Plus Account separated by comma.
config - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

removeUser

public void removeUser(java.lang.String userURI,
                       java.lang.String emailIds,
                       java.util.Map config)
                throws java.io.IOException,
                       ServerException,
                       ParseException
Removes the specified user(s) from your ManageEngine Analytics Plus Account.

Parameters:
userURI - The URL of the user. See getURI.
emailIds - The email addresses of the users to be removed from your ManageEngine Analytics Plus Account separated by comma.
config - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

activateUser

public void activateUser(java.lang.String userURI,
                         java.lang.String emailIds,
                         java.util.Map config)
                  throws java.io.IOException,
                         ServerException,
                         ParseException
Activates the specified user(s) in your ManageEngine Analytics Plus Account.

Parameters:
userURI - The URL of the user. See getURI.
emailIds - The email addresses of the users to be activated in your ManageEngine Analytics Plus Account separated by comma.
config - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

deActivateUser

public void deActivateUser(java.lang.String userURI,
                           java.lang.String emailIds,
                           java.util.Map config)
                    throws java.io.IOException,
                           ServerException,
                           ParseException
Deactivates the specified user(s) from your ManageEngine Analytics Plus Account.

Parameters:
userURI - The URL of the user. See getURI.
emailIds - The email addresses of the users to be deactivated from your ManageEngine Analytics Plus Account separated by comma.
config - Contains any additional control parameters. Can be null.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.

getPlanInfo

public PlanInfo getPlanInfo(java.lang.String userURI,
                            java.util.Map config)
                     throws java.lang.Exception
Getting the plan informations.

Parameters:
userURI - The URL of the user. See getURI.
config - Contains any additional control parameters. Can be null.
Returns:
PlainInfo object.
Throws:
java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - If the server has recieved the request but did not process the request due to some error.
ParseException - If the server has responded but client was not able to parse the response.
java.lang.Exception

getRelatedTablesList

public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getRelatedTablesList(java.lang.String dbURI,
                                                                                            java.lang.String[] tableNamesArray,
                                                                                            java.util.Map config)
                                                                                     throws java.io.IOException,
                                                                                            ServerException,
                                                                                            ParseException
This method will return the list of related tables (For Advanced Upload Tool)

Throws:
java.io.IOException
ServerException
ParseException

isSystemTable

public java.util.Map<java.lang.String,java.lang.String> isSystemTable(java.lang.String dbURI,
                                                                      java.util.Map config)
                                                               throws java.io.IOException,
                                                                      ServerException,
                                                                      ParseException
to check the if the particular tables is system table identified by the URI.

Parameters:
dbURI - the URI of the database. See getURI
config - contains any additional control parameters.
Throws:
java.io.IOException - if any communication related error(s) like request time out occurs when trying to contact the service.
ServerException - if the server has recieved the request but did not process the request due to some error.
ParseException - if the server has responded but client was not able to parse the response.

importData

public ImportResult importData(java.lang.String tableURI,
                               java.lang.String importType,
                               java.io.InputStream iStream,
                               java.util.Map<java.lang.String,java.lang.String> importConfig,
                               boolean retryOnRequestTimeout)
                        throws java.io.IOException,
                               ServerException,
                               ParseException,
                               java.lang.Exception
Import the data from the input stream into the table identified by the URI.

Parameters:
tableURI - The URI of the table. See getURI.
importType - The type of import. Can be one of
  • APPEND
  • TRUNCATEADD
  • UPDATEADD
  • See Import types for more details.
    iStream - The input stream data to be imported into the table.
    importConfig - Contains any additional control parameters. See Importing CSV for more details.
    Returns:
    An ImportResult value.
    Throws:
    java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
    ServerException - If the server has recieved the request but did not process the request due to some error.
    ParseException - If the server has responded but client was not able to parse the response.
    java.lang.Exception

importDataInBatches

public ImportResult importDataInBatches(java.lang.String tableURI,
                                        java.lang.String importType,
                                        java.io.InputStream iStream,
                                        java.util.Map<java.lang.String,java.lang.String> importConfig,
                                        int batchSize)
                                 throws java.io.IOException,
                                        ServerException,
                                        ParseException,
                                        java.lang.Exception
Import data from the input stream into the table identified by the URI. Data Will not be sent completely to the server but rather in chunks(/batches). Useful for huge amount of data. But incase of failure inbetween , already imported batches cannot be rolled back.

Parameters:
tableURI - The URI of the table. See getURI.
importType - The type of import. Can be one of
  • APPEND
  • TRUNCATEADD
  • UPDATEADD
  • See Import types for more details.
    iStream - The input stream containing the csv data to be imported into the table.
    importConfig - Contains any additional control parameters. See Importing CSV for more details.
    batchSize - The number of rows to be imported in each batch.
    Returns:
    an ImportResult value
    Throws:
    java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
    ServerException - If the server has recieved the request but did not process the request due to some error.
    ParseException - If the server has responded but client was not able to parse the response.
    java.lang.Exception

importDataInBatches

public ImportResult importDataInBatches(java.lang.String tableURI,
                                        java.lang.String importType,
                                        java.io.File csvFile,
                                        java.util.Map importConfig,
                                        int batchSize)
                                 throws java.io.IOException,
                                        ServerException,
                                        ParseException,
                                        java.lang.Exception
Import the data contained in a CSV file into the table identified by the URI. The file is not sent completely to the server but rather in chunks(/batches). Useful for large files. But incase of failure inbetween , already imported batches cannot be rolled back.

Parameters:
tableURI - The URI of the table. See getURI.
importType - The type of import. Can be one of
  • APPEND
  • TRUNCATEADD
  • UPDATEADD
  • See Import types for more details.
    csvFile - The file containing the csv data to be imported into the table.
    importConfig - Contains any additional control parameters. See Importing CSV for more details.
    batchSize - The number of rows to be imported in each batch.
    Returns:
    an ImportResult value
    Throws:
    java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
    ServerException - If the server has recieved the request but did not process the request due to some error.
    ParseException - If the server has responded but client was not able to parse the response.
    java.lang.Exception

truncColumnHeaders

public java.lang.String truncColumnHeaders(java.lang.String columnHeaders,
                                           java.util.Map importConfig)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

importData

public ImportResult importData(java.lang.String tableURI,
                               java.lang.String importType,
                               java.io.File csvFile,
                               java.util.Map importConfig,
                               boolean retryOnRequestTimeout)
                        throws java.io.IOException,
                               ServerException,
                               ParseException
Import the data contained in a CSV file into the table identified by the URI.

Parameters:
tableURI - The URI of the table. See getURI.
importType - The type of import. Can be one of
  • APPEND
  • TRUNCATEADD
  • UPDATEADD
  • See Import types for more details.
    csvFile - The file containing the csv data to be imported into the table.
    importConfig - Contains any additional control parameters.See
    retryOnRequestTimeout - If true then incase of request timeout, the request is retried 3
    Returns:
    an ImportResult value
    Throws:
    java.io.IOException - If any communication related error(s) like request time out occurs when trying to contact the service.
    ServerException - If the server has recieved the request but did not process the request due to some error.
    ParseException - If the server has responded but client was not able to parse the response.

importTblData

protected ImportResult importTblData(java.lang.String tableURI,
                                     java.lang.String importType,
                                     java.io.File csvFile,
                                     java.util.Map importConfig,
                                     java.util.Map dataTypeConfig,
                                     boolean retryOnRequestTimeout)
                              throws java.io.IOException,
                                     ServerException,
                                     ParseException
Throws:
java.io.IOException
ServerException
ParseException

setProxy

public void setProxy(java.lang.String proxyHost,
                     int proxyPort,
                     java.lang.String proxyUserName,
                     java.lang.String proxyPassword,
                     java.lang.String protocol)
Used to specify the proxy server details.

Parameters:
proxyHost - The hostname/ip address of the proxy-server.
proxyPort - The proxy server port.
proxyUserName - The user name for proxy-server authentication.
proxyPassword - The password for proxy-server authentication.
protocol - Can be any one of
  • HTTP
  • HTTPS
  • BOTH
. Specify "BOTH" if same configuration can be used for both http and https

setNTLMProxy

public void setNTLMProxy(java.lang.String proxyHost,
                         int proxyPort,
                         java.lang.String proxyUserName,
                         java.lang.String proxyPassword,
                         java.lang.String protocol)
Used to specify the proxy server details.

Parameters:
proxyHost - The host name of the NTLM proxy server
proxyPort - The NTLM proxy server port.
proxyUserName - The user name for NTLM proxy-server authentication.
proxyPassword - The password for NTLM proxy-server authentication.
protocol - Can be any one of
  • HTTP
  • HTTPS
  • BOTH
. Specify "BOTH" if same configuration can be used for both http and https

delete

public void delete()
            throws java.lang.Exception
Throws:
java.lang.Exception

sendRequest

protected java.lang.Object sendRequest(org.apache.commons.httpclient.HttpClient client,
                                       org.apache.commons.httpclient.HttpMethod method,
                                       java.lang.String action,
                                       java.lang.Object callBackData)
                                throws java.io.IOException,
                                       ServerException,
                                       ParseException,
                                       org.apache.commons.httpclient.URIException
Overrides:
sendRequest in class BaseClient
Throws:
java.io.IOException
ServerException
ParseException
org.apache.commons.httpclient.URIException

main

public static void main(java.lang.String[] args)

ManageEngine Analytics Plus API Docs

Copyright © 2018 AdventNet Inc. All Rights Reserved.