org.wso2.carbon.dataservices.sql.driver
Class TDriverUtil
java.lang.Object
org.wso2.carbon.dataservices.sql.driver.TDriverUtil
public class TDriverUtil
- extends Object
|
Method Summary |
static com.google.gdata.client.spreadsheet.SpreadsheetQuery |
createSpreadSheetQuery(String spreadSheetName,
URL spreadSheetFeedUrl)
|
static com.google.gdata.client.spreadsheet.WorksheetQuery |
createWorkSheetQuery(URL workSheetFeedUrl)
|
static ParamInfo |
findParam(ColumnInfo columnInfo,
ParamInfo[] params)
|
static List<String> |
getAvailableDriverProperties()
|
static com.google.gdata.data.spreadsheet.CellFeed |
getCellFeed(Connection connection,
com.google.gdata.data.spreadsheet.WorksheetEntry currentWorkSheet)
|
static String |
getCellPosition(String id)
|
static int |
getColumnIndex(String id)
|
static int |
getCurrentTenantId()
Returns the best effort way of finding the current tenant id,
even if this is not in a current message request, i.e. |
static com.google.gdata.data.spreadsheet.WorksheetEntry |
getCurrentWorkSheetEntry(Connection connection,
String sheetName)
|
static
<F extends com.google.gdata.data.IFeed>
F |
|
getFeed(com.google.gdata.client.spreadsheet.SpreadsheetService service,
com.google.gdata.client.Query query,
Class<F> feedClass)
|
static ColumnInfo[] |
getHeaders(Connection connection,
String tableName)
|
static InputStream |
getInputStreamFromPath(String path)
Creates and returns an InputStream from the file path / http location given. |
static com.google.gdata.data.spreadsheet.ListFeed |
getListFeed(Connection connection,
com.google.gdata.data.spreadsheet.WorksheetEntry currentWorkSheet)
|
static int |
getRowIndex(String id)
|
static boolean |
isRegistryPath(String path)
|
static void |
writeRecords(org.apache.poi.ss.usermodel.Workbook workbook,
String filePath)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GOV_REGISTRY_PATH_PREFIX
public static final String GOV_REGISTRY_PATH_PREFIX
- See Also:
- Constant Field Values
CONF_REGISTRY_PATH_PREFIX
public static final String CONF_REGISTRY_PATH_PREFIX
- See Also:
- Constant Field Values
TDriverUtil
public TDriverUtil()
getAvailableDriverProperties
public static List<String> getAvailableDriverProperties()
getHeaders
public static ColumnInfo[] getHeaders(Connection connection,
String tableName)
throws SQLException
- Throws:
SQLException
getColumnIndex
public static int getColumnIndex(String id)
getRowIndex
public static int getRowIndex(String id)
getCellPosition
public static String getCellPosition(String id)
getCellFeed
public static com.google.gdata.data.spreadsheet.CellFeed getCellFeed(Connection connection,
com.google.gdata.data.spreadsheet.WorksheetEntry currentWorkSheet)
throws SQLException
- Throws:
SQLException
getCurrentWorkSheetEntry
public static com.google.gdata.data.spreadsheet.WorksheetEntry getCurrentWorkSheetEntry(Connection connection,
String sheetName)
throws SQLException
- Throws:
SQLException
createSpreadSheetQuery
public static com.google.gdata.client.spreadsheet.SpreadsheetQuery createSpreadSheetQuery(String spreadSheetName,
URL spreadSheetFeedUrl)
createWorkSheetQuery
public static com.google.gdata.client.spreadsheet.WorksheetQuery createWorkSheetQuery(URL workSheetFeedUrl)
getFeed
public static <F extends com.google.gdata.data.IFeed> F getFeed(com.google.gdata.client.spreadsheet.SpreadsheetService service,
com.google.gdata.client.Query query,
Class<F> feedClass)
throws SQLException
- Throws:
SQLException
findParam
public static ParamInfo findParam(ColumnInfo columnInfo,
ParamInfo[] params)
getListFeed
public static com.google.gdata.data.spreadsheet.ListFeed getListFeed(Connection connection,
com.google.gdata.data.spreadsheet.WorksheetEntry currentWorkSheet)
throws SQLException
- Throws:
SQLException
writeRecords
public static void writeRecords(org.apache.poi.ss.usermodel.Workbook workbook,
String filePath)
throws SQLException
- Throws:
SQLException
getInputStreamFromPath
public static InputStream getInputStreamFromPath(String path)
throws IOException,
SQLException
- Creates and returns an InputStream from the file path / http location given.
- Throws:
IOException, - SQLException
IOException
SQLException- See Also:
InputStream
isRegistryPath
public static boolean isRegistryPath(String path)
getCurrentTenantId
public static int getCurrentTenantId()
- Returns the best effort way of finding the current tenant id,
even if this is not in a current message request, i.e. deploying services.
Assumption: when tenants other than the super tenant is activated,
the registry service must be available. So, the service deployment and accessing the registry,
will happen in the same thread, without the callbacks being used.
- Returns:
- The tenant id
Copyright © 2015 WSO2. All rights reserved.