Class CatalogActionHandler


  • public class CatalogActionHandler
    extends java.lang.Object
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CatalogActionHandler

        public CatalogActionHandler()
    • Method Detail

      • 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 id
        dbRoleId - dbRole id
        namespace -
        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 id
        dbRoleId - dbRole id
        namespace - Name space
        tableName - Table Name
        isRefresh - a flag to control whether we need to refresh the columnInfos or just use cache
        ignoreCase - 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 id
        dbRoleId - dbRole id
        namespace - namespace
        tableName - table name
        needRowCount - a flag to control whether we need to refresh the columnInfos or just use cache
        ignoreCase - 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 id
        dbRoleId - dbRole id
        sql - sql that will be executed against the target database
        Returns:
        Table Data Transfer Model
        Throws:
        MSTRWebAPIException
        JSONException
      • 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 ID
        dbRoleId - dbrole ID
        settingName - the name of the catalog setting
        requestTimeOut - request timeout
        settingModel - 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 id
        dbRoleId - dbrole id
        settingModel - the input json of catalog options
        requestTimeOut - 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 id
        dbRoleId - dbRole id
        namespace - namespace
        isRefresh - a flag to control whether we need to refresh the columnInfos or just use cache
        ignoreCase - a flag to indicate whether ignore case when processing namespace, table name
        Returns:
        Table Info Data Transfer Model
        Throws:
        MSTRWebAPIException
        JSONException