org.wso2.carbon.dataservices.ui

## Class DataServiceAdminClient

- java.lang.Object
- - org.wso2.carbon.dataservices.ui.DataServiceAdminClient

-     public class DataServiceAdminClient
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataServiceAdminClient(String cookie, String url, org.apache.axis2.context.ConfigurationContext configContext)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getAllRoles(AuthProvider authProvider)` Method to retrieve all user roles from the back end server.
    `String[]` | `getCarbonDataSourceNames()`
    `String[]` | `getCarbonDataSourceNamesForTypes(String[] types)`
    `String` | `getCarbonDataSourceType(String dsName)`
    `String` | `getDataServiceContents(String serviceId)`
    `String[]` | `getdbSchemaList(String datasourceId)`
    `String` | `getDSService(String dataSourceId, String dbName, String[] schemas, String[] tableNames, String serviceName, String serviceNamespace)`
    `String[]` | `getDSServiceList(String dataSourceId, String dbName, String[] schemas, String[] tableNames, String serviceNamespace)`
    `String[]` | `getInputMappingNames(String query)`
    `String[]` | `getOutputColumnNames(String query)`
    `org.wso2.carbon.dataservices.ui.stub.admin.core.xsd.PaginatedTableInfo` | `getPaginatedSchemaInfo(int pageNumber, String datasourceId)`
    `org.wso2.carbon.dataservices.ui.stub.admin.core.xsd.PaginatedTableInfo` | `getPaginatedTableInfo(int pageNumber, String datasourceId, String dbName, String[] schemas)`
    `String[]` | `getTableInfo(String datasourceId, String dbName, String[] schemas)`
    `boolean` | `isDSNameAvailable(String dataService)` This method check whether data service name is already available.
    `void` | `saveDataService(String serviceName, String serviceGroup, String serviceContents)`
    `String` | `testGSpreadConnection(String clientId, String clientSecret, String refreshToken, String visibility, String documentURL)`
    `String` | `testJDBCConnection(String driverClass, String jdbcURL, String username, String password, String passwordAlias)`
    `String` | `validateJSONMapping(String jsonMapping)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataServiceAdminClient

          public DataServiceAdminClient(String cookie,
                                String url,
                                org.apache.axis2.context.ConfigurationContext configContext)
                                 throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

  - ### Method Detail

    - #### validateJSONMapping

          public String validateJSONMapping(String jsonMapping)
                                     throws RemoteException

      Throws:
        `RemoteException`

    - #### getDataServiceContents

          public String getDataServiceContents(String serviceId)
                                        throws RemoteException

      Throws:
        `RemoteException`

    - #### getCarbonDataSourceNames

          public String[] getCarbonDataSourceNames()
                                            throws RemoteException

      Throws:
        `RemoteException`

    - #### getCarbonDataSourceType

          public String getCarbonDataSourceType(String dsName)
                                         throws RemoteException

      Throws:
        `RemoteException`

    - #### isDSNameAvailable

          public boolean isDSNameAvailable(String dataService)
                                    throws RemoteException

      This method check whether data service name is already available.
      Parameters:
        `dataService` - Data service name
      Returns:
        Boolean value
      Throws:
        `RemoteException`

    - #### getCarbonDataSourceNamesForTypes

          public String[] getCarbonDataSourceNamesForTypes(String[] types)
                                                    throws RemoteException

      Throws:
        `RemoteException`

    - #### saveDataService

          public void saveDataService(String serviceName,
                             String serviceGroup,
                             String serviceContents)
                               throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### testJDBCConnection

          public String testJDBCConnection(String driverClass,
                                  String jdbcURL,
                                  String username,
                                  String password,
                                  String passwordAlias)
                                    throws org.apache.axis2.AxisFault

      Parameters:
        `driverClass` - JDBC driver class name
        `jdbcURL` - JDBC Url
        `username` - username
        `password` - password
        `protectedTokens` - password tokens
        `passwordProvider` - password provider
      Returns:
        a string representing success or the failure of the JDBC connection
      Throws:
        `org.apache.axis2.AxisFault` - axisFault

    - #### testGSpreadConnection

          public String testGSpreadConnection(String clientId,
                                     String clientSecret,
                                     String refreshToken,
                                     String visibility,
                                     String documentURL)
                                       throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

    - #### getOutputColumnNames

          public String[] getOutputColumnNames(String query)
                                        throws Exception

      Throws:
        `Exception`

    - #### getInputMappingNames

          public String[] getInputMappingNames(String query)
                                        throws Exception

      Throws:
        `Exception`

    - #### getPaginatedTableInfo

          public org.wso2.carbon.dataservices.ui.stub.admin.core.xsd.PaginatedTableInfo getPaginatedTableInfo(int pageNumber,
                                                                                                     String datasourceId,
                                                                                                     String dbName,
                                                                                                     String[] schemas)
                                                                                                       throws Exception

      Throws:
        `Exception`

    - #### getPaginatedSchemaInfo

          public org.wso2.carbon.dataservices.ui.stub.admin.core.xsd.PaginatedTableInfo getPaginatedSchemaInfo(int pageNumber,
                                                                                                      String datasourceId)
                                                                                                        throws Exception

      Throws:
        `Exception`

    - #### getTableInfo

          public String[] getTableInfo(String datasourceId,
                              String dbName,
                              String[] schemas)
                                throws Exception

      Throws:
        `Exception`

    - #### getdbSchemaList

          public String[] getdbSchemaList(String datasourceId)
                                   throws Exception

      Throws:
        `Exception`

    - #### getDSServiceList

          public String[] getDSServiceList(String dataSourceId,
                                  String dbName,
                                  String[] schemas,
                                  String[] tableNames,
                                  String serviceNamespace)
                                    throws Exception

      Throws:
        `Exception`

    - #### getDSService

          public String getDSService(String dataSourceId,
                            String dbName,
                            String[] schemas,
                            String[] tableNames,
                            String serviceName,
                            String serviceNamespace)
                              throws Exception

      Throws:
        `Exception`

    - #### getAllRoles

          public String[] getAllRoles(AuthProvider authProvider)
                               throws Exception

      Method to retrieve all user roles from the back end server.
      Returns:
        String array of user roles
      Throws:
        `Exception`

Copyright © 2017 WSO2. All rights reserved.