Class CatalogActionHandler
- java.lang.Object
-
- com.microstrategy.web.tasks.actions.CatalogActionHandler
-
public class CatalogActionHandler extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description CatalogActionHandler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JSONObject
getCatalogSetting(java.lang.String sessionId, java.lang.String dbroleId)
static CatalogSettingsDTO
getCatalogSettingsDTO(java.lang.String sessionId, java.lang.String dbroleId)
static NamespacesDTO
getNamespacesDTO(java.lang.String sessionId, java.lang.String dbRoleId, boolean isRefresh)
static java.util.Optional<TableDataDTO>
getSqlPreviewData(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String sql)
static java.util.Optional<TableInfosDTO>
getTableInfosDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, boolean isRefresh)
static java.util.Optional<TableDataDTO>
getTablePreviewData(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, java.lang.String tableName, boolean needRowCount, boolean ignoreCase)
static java.util.Optional<TableSchemaDTO>
getTableSchemaDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, java.lang.String tableName, boolean isRefresh, boolean ignoreCase)
static java.util.Optional<TableSchemasDTO>
getTableSchemasDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, boolean isRefresh, boolean ignoreCase)
09/14/2020; Currently serves for internal api of getting all tables and their columns.static java.lang.String
setCatalogOptions(java.lang.String sessionId, java.lang.String dbRoleId, JSONObject settingModel, int requestTimeOut)
static java.lang.String
setCatalogSetting(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String settingName, JSONObject settingModel, int requestTimeOut)
-
-
-
Method Detail
-
getNamespacesDTO
public static NamespacesDTO getNamespacesDTO(java.lang.String sessionId, java.lang.String dbRoleId, boolean isRefresh) throws MSTRWebAPIException, JSONException
- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idisRefresh
-- Returns:
- Namespace Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
getTableInfosDTO
public static java.util.Optional<TableInfosDTO> getTableInfosDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, boolean isRefresh) throws MSTRWebAPIException, JSONException
- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idnamespace
-isRefresh
-- Returns:
- Table Info Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
getTableSchemaDTO
public static java.util.Optional<TableSchemaDTO> getTableSchemaDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, java.lang.String tableName, boolean isRefresh, boolean ignoreCase) throws MSTRWebAPIException, JSONException
- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idnamespace
- Name spacetableName
- Table NameisRefresh
- a flag to control whether we need to refresh the columnInfos or just use cacheignoreCase
- a flag to indicate whether ignore case when processing namespace, table name- Returns:
- Table Schema Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
getTablePreviewData
public static java.util.Optional<TableDataDTO> getTablePreviewData(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, java.lang.String tableName, boolean needRowCount, boolean ignoreCase) throws MSTRWebAPIException, JSONException
- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idnamespace
- namespacetableName
- table nameneedRowCount
- a flag to control whether we need to refresh the columnInfos or just use cacheignoreCase
- a flag to indicate whether ignore case when processing namespace, table name- Returns:
- Table Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
getSqlPreviewData
public static java.util.Optional<TableDataDTO> getSqlPreviewData(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String sql) throws MSTRWebAPIException, JSONException
- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idsql
- sql that will be executed against the target database- Returns:
- Table Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
getCatalogSetting
public static JSONObject getCatalogSetting(java.lang.String sessionId, java.lang.String dbroleId) throws JSONException, MSTRWebAPIException
- Parameters:
sessionId
- Iserver session iddbroleId
- dbRole id- Returns:
- the catalog settings contains catalogMode, catalogSQLs and warehouse catalog options
- Throws:
JSONException
MSTRWebAPIException
-
getCatalogSettingsDTO
public static CatalogSettingsDTO getCatalogSettingsDTO(java.lang.String sessionId, java.lang.String dbroleId) throws JSONException, MSTRWebAPIException
- Parameters:
sessionId
- IServer session iddbroleId
- dbRole id- Returns:
- catalog settings Data Transfer Model
- Throws:
JSONException
MSTRWebAPIException
-
setCatalogSetting
public static java.lang.String setCatalogSetting(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String settingName, JSONObject settingModel, int requestTimeOut) throws JSONException, MSTRWebAPIException
- Parameters:
sessionId
- session IDdbRoleId
- dbrole IDsettingName
- the name of the catalog settingrequestTimeOut
- request timeoutsettingModel
- the model of the catalog setting- Returns:
- xml output
- Throws:
JSONException
MSTRWebAPIException
-
setCatalogOptions
public static java.lang.String setCatalogOptions(java.lang.String sessionId, java.lang.String dbRoleId, JSONObject settingModel, int requestTimeOut) throws JSONException, MSTRWebAPIException
- Parameters:
sessionId
- session iddbRoleId
- dbrole idsettingModel
- the input json of catalog optionsrequestTimeOut
- timeout- Returns:
- xml output
- Throws:
JSONException
MSTRWebAPIException
-
getTableSchemasDTO
public static java.util.Optional<TableSchemasDTO> getTableSchemasDTO(java.lang.String sessionId, java.lang.String dbRoleId, java.lang.String namespace, boolean isRefresh, boolean ignoreCase) throws MSTRWebAPIException, JSONException
09/14/2020; Currently serves for internal api of getting all tables and their columns.- Parameters:
sessionId
- IServer session iddbRoleId
- dbRole idnamespace
- namespaceisRefresh
- a flag to control whether we need to refresh the columnInfos or just use cacheignoreCase
- a flag to indicate whether ignore case when processing namespace, table name- Returns:
- Table Info Data Transfer Model
- Throws:
MSTRWebAPIException
JSONException
-
-