Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.wso2.wsas.admin.service
Class DataServiceAdmin

    java.lang.Object
      org.wso2.utils.AbstractAdmin
          org.wso2.wsas.admin.service.DataServiceAdmin

    public class DataServiceAdmin

extends org.wso2.utils.AbstractAdmin

Admin operations for DataService

Constructor Summary
`DataServiceAdmin()`

Method Summary
`DBServerData[]` | `getDatabaseUrlDriverList()` Returns list of known database server jdbc urls and driver class names from server.xml
`org.apache.axiom.om.OMElement` | `getDataServiceContents(java.lang.String serviceId)` This method will expose the .dbs for a given data service.
`DataServiceInfo` | `getDSMetaData(java.lang.String init)` This method will give the setup for DS. if arg init is null or "", it will consider as a call for a new DS.
`java.lang.String[]` | `getHeaderColumnNames(java.lang.String resourcePath, java.lang.String hasHeaders, java.lang.String dataSourceType)` Loads first line of CSV file as the column header & returns an String array of column names TODO : implement for Excel
`void` | `saveDataServiceContents(org.apache.axiom.om.OMElement dataWrapper)` Saves a modified DS configuration
`java.lang.String` | `testJDBCConnection(java.lang.String driverClass, java.lang.String jdbcURL, java.lang.String username, java.lang.String password)` This will test a connection to a given database.

Methods inherited from class org.wso2.utils.AbstractAdmin
`getAxisConfig, getConfigContext`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DataServiceAdmin

    public DataServiceAdmin()

Method Detail

### getDSMetaData

    public DataServiceInfo getDSMetaData(java.lang.String init)
                                  throws org.apache.axis2.AxisFault

  This method will give the setup for DS. if arg init is null or "", it will consider as a call for a new DS. If new, configuration would only allow for non url repositories.

  Parameters:
    `init` - initial arg
  Returns:
    DataServiceInfo; Instance of DataServiceInfo
  Throws:
    `org.apache.axis2.AxisFault` - will be thrown

### getDataServiceContents

    public org.apache.axiom.om.OMElement getDataServiceContents(java.lang.String serviceId)
                                                         throws org.apache.axis2.AxisFault

  This method will expose the .dbs for a given data service.

  Parameters:
    `serviceId` - service name
  Returns:
    OMElement
  Throws:
    `org.apache.axis2.AxisFault` - will be thrown

### saveDataServiceContents

    public void saveDataServiceContents(org.apache.axiom.om.OMElement dataWrapper)
                                 throws org.apache.axis2.AxisFault

  Saves a modified DS configuration

  Parameters:
    `dataWrapper` - wrapps the element
  Throws:
    `org.apache.axis2.AxisFault` - will be thrown

### getDatabaseUrlDriverList

    public DBServerData[] getDatabaseUrlDriverList()

  Returns list of known database server jdbc urls and driver class names from server.xml

  Returns:
    DBServerData array

### getHeaderColumnNames

    public java.lang.String[] getHeaderColumnNames(java.lang.String resourcePath,
                                                   java.lang.String hasHeaders,
                                                   java.lang.String dataSourceType)

  Loads first line of CSV file as the column header & returns an String array of column names TODO : implement for Excel

  Parameters:
    `resourcePath` - resourcePath
    `hasHeaders` - hasHeaders
    `dataSourceType` - dataSourceType
  Returns:
    String array

### testJDBCConnection

    public java.lang.String testJDBCConnection(java.lang.String driverClass,
                                               java.lang.String jdbcURL,
                                               java.lang.String username,
                                               java.lang.String password)

  This will test a connection to a given database. If connection can be made this method will return the status as String, if not, faliour String will be return.

  Parameters:
    `driverClass` - Driver class
    `jdbcURL` - JDBC URL
    `username` - User name
    `password` - Pass word
  Returns:
    String; state

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD