Class AnalyticsModelingRestClient
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.client.AnalyticsModelingRestClient
-
public class AnalyticsModelingRestClient extends FFDCRESTClient
REST client is responsible for issuing calls to the AnalyticsModeling OMAS REST APIs.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot
-
-
Constructor Summary
Constructors Constructor Description AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot)Constructor for no authentication.AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, String userId, String password)Constructor for simple userId and password authentication.AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Constructor for simple userId and password authentication with audit log.AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Constructor for no authentication with audit log.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResponseContainerAssetscreateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact)Create assets defined by artifact.ResponseContainerAssetsdeleteAssets(String user, String serverCapability, String serverCapabilityGUID, String identifier)Delete assets defined by identifier.List<ResponseContainerDatabase>getDatabases(String userId, int startFrom, int pageSize)Get list of available databases.ResponseContainerModulegetModule(String userId, String databaseGuid, String catalog, String schema, ModuleTableFilter request)Get module.List<ResponseContainerDatabaseSchema>getSchemas(String userId, String databaseGuid, int startFrom, int pageSize)Get list of available schemas for a databases.ResponseContainerSchemaTablesgetTables(String userId, String databaseGuid, String catalog, String schema)Get list of tables for database schema.ResponseContainerAssetsupdateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact)Update assets defined by artifact.-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callOCFConnectorReportGetRESTCall, callStringMapGetRESTCall, callVoidGetRESTCall, callVoidPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
-
-
-
Constructor Detail
-
AnalyticsModelingRestClient
public AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
Constructor for no authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.auditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
AnalyticsModelingRestClient
public AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Constructor for no authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
AnalyticsModelingRestClient
public AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Constructor for simple userId and password authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.userId- user id for the HTTP requestpassword- password for the HTTP requestauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
AnalyticsModelingRestClient
public AnalyticsModelingRestClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Constructor for simple userId and password authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.userId- user id for the HTTP requestpassword- password for the HTTP request- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
getDatabases
public List<ResponseContainerDatabase> getDatabases(String userId, int startFrom, int pageSize) throws PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Get list of available databases.- Parameters:
userId- requested the operation.startFrom- this index.pageSize- amount to retrieve.- Returns:
- list of databases.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.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 PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Get list of available schemas for a databases.- Parameters:
userId- requested the operation.databaseGuid- to defined database.startFrom- this index.pageSize- amount to retrieve.- Returns:
- list of schemas.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.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 PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Get list of tables for database schema.- Parameters:
userId- requested the operation.databaseGuid- to defined database.catalog- name.schema- name.- Returns:
- list of tables.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.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 PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Get module.- Parameters:
userId- requested the operation.databaseGuid- to create module for.catalog- name of the module.schema- name of the module.request- set of tables to include.- Returns:
- created module.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
createAssets
public ResponseContainerAssets createAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) throws PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Create assets defined by artifact.- Parameters:
user- requested the operation.serverCapability- the source of artifact.serverCapabilityGUID- the source of artifact.artifact- definition.- Returns:
- list of GUIDs for created assets.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
updateAssets
public ResponseContainerAssets updateAssets(String user, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) throws PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Update assets defined by artifact.- Parameters:
user- requested the operation.serverCapability- the source of artifact.serverCapabilityGUID- the source of artifact.artifact- definition.- Returns:
- list of GUIDs for updated assets.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
deleteAssets
public ResponseContainerAssets deleteAssets(String user, String serverCapability, String serverCapabilityGUID, String identifier) throws PropertyServerException, AnalyticsModelingCheckedException, InvalidParameterException, UserNotAuthorizedException
Delete assets defined by identifier.- Parameters:
user- requested the operation.serverCapability- the source of artifact.serverCapabilityGUID- the source of artifact.identifier- defining the assets.- Returns:
- list of GUIDs for deleted assets.
- Throws:
PropertyServerException- in case REST call failed.AnalyticsModelingCheckedException- error executing request.UserNotAuthorizedException- in case user unauthorized to perform operation.InvalidParameterException- in case any passed parameter is invalid.
-
-