Class ImportClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.client.ImportClient
-
- All Implemented Interfaces:
AnalyticsModelingImport
public class ImportClient extends Object implements AnalyticsModelingImport
-
-
Constructor Summary
Constructors Constructor Description ImportClient(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.ImportClient(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.ImportClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.ImportClient(String serverName, String serverPlatformURLRoot, AnalyticsModelingRestClient restClient, int maxPageSize)Create a new client that is to be used within an OMAG Server.ImportClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Create a new client with no authentication embedded in the HTTP request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ResponseContainerDatabase>getDatabases(String userId, int startFrom, int pageSize)Get databases available on the server for the user.ResponseContainerModulegetModule(String userId, String databaseGuid, String catalog, String schema, ModuleTableFilter request)Build module for the schema.List<ResponseContainerDatabaseSchema>getSchemas(String userId, String databaseGuid, int startFrom, int pageSize)Get schema defined by database GUID.ResponseContainerSchemaTablesgetTables(String userId, String databaseGuid, String catalog, String schema)Get tables for the schema.
-
-
-
Constructor Detail
-
ImportClient
public ImportClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ImportClient
public ImportClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST servers- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ImportClient
public ImportClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requestsauditLog- logging destination- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ImportClient
public ImportClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ImportClient
public ImportClient(String serverName, String serverPlatformURLRoot, AnalyticsModelingRestClient restClient, int maxPageSize) throws InvalidParameterException
Create a new client that is to be used within an OMAG Server.- Parameters:
serverName- name of the server to connect toserverPlatformURLRoot- the network address of the server running the OMAS REST serversrestClient- pre-initialized REST clientmaxPageSize- pre-initialized parameter limit- Throws:
InvalidParameterException- there is a problem with the information about the remote OMAS
-
-
Method Detail
-
getDatabases
public List<ResponseContainerDatabase> getDatabases(String userId, int startFrom, int pageSize) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Get databases available on the server for the user.- Specified by:
getDatabasesin interfaceAnalyticsModelingImport- Parameters:
userId- of the user.startFrom- starting element (used in paging through large result sets)pageSize- maximum number of results to return- Returns:
- list of databases for the requested server/user.
- Throws:
AnalyticsModelingCheckedException- error executing request.PropertyServerException- in case REST call failed.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
getSchemas
public List<ResponseContainerDatabaseSchema> getSchemas(String userId, String databaseGuid, int startFrom, int pageSize) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Get schema defined by database GUID.- Specified by:
getSchemasin interfaceAnalyticsModelingImport- Parameters:
userId- of the request.databaseGuid- of the requested database.startFrom- starting element (used in paging through large result sets)pageSize- maximum number of results to return- Returns:
- list of schemas for the requested database.
- Throws:
AnalyticsModelingCheckedException- error executing request.PropertyServerException- in case REST call failed.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
getTables
public ResponseContainerSchemaTables getTables(String userId, String databaseGuid, String catalog, String schema) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Get tables for the schema.- Specified by:
getTablesin interfaceAnalyticsModelingImport- Parameters:
userId- of the request.databaseGuid- of the requested database.catalog- name of the database.schema- schema name on the database.- Returns:
- list of tables for the requested schema.
- Throws:
AnalyticsModelingCheckedException- error executing request.PropertyServerException- in case REST call failed.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
getModule
public ResponseContainerModule getModule(String userId, String databaseGuid, String catalog, String schema, ModuleTableFilter request) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Build module for the schema.- Specified by:
getModulein interfaceAnalyticsModelingImport- Parameters:
userId- of the request.databaseGuid- of the requested database.catalog- catalog name of the database.schema- schema name of the database.request- table filter- Returns:
- module for the requested schema.
- Throws:
AnalyticsModelingCheckedException- error executing request.PropertyServerException- in case REST call failed.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
-