Class SynchronizationClient
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.analyticsmodeling.client.SynchronizationClient
-
- All Implemented Interfaces:
AnalyticsModelingSynchronization
public class SynchronizationClient extends Object implements AnalyticsModelingSynchronization
-
-
Constructor Summary
Constructors Constructor Description SynchronizationClient(String serverName, String serverPlatformURLRoot)Create a new client with no authentication embedded in the HTTP request.SynchronizationClient(String serverName, String serverPlatformURLRoot, String userId, String password)Create a new client that passes userId and password in each HTTP request.SynchronizationClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Create a new client that passes userId and password in each HTTP request.SynchronizationClient(String serverName, String serverPlatformURLRoot, AnalyticsModelingRestClient restClient, int maxPageSize)Create a new client that is to be used within an OMAG Server.SynchronizationClient(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 ResponseContainerAssetscreateArtifact(String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact)Create analytics artifact defined as input.ResponseContainerAssetsdeleteArtifact(String userId, String serverCapability, String serverCapabilityGUID, String identifier)Delete assets in repository defined by artifact unique identifier.ResponseContainerAssetsupdateArtifact(String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact)Update analytics artifact defined as json input.
-
-
-
Constructor Detail
-
SynchronizationClient
public SynchronizationClient(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.
-
SynchronizationClient
public SynchronizationClient(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.
-
SynchronizationClient
public SynchronizationClient(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.
-
SynchronizationClient
public SynchronizationClient(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.
-
SynchronizationClient
public SynchronizationClient(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
-
createArtifact
public ResponseContainerAssets createArtifact(String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Create analytics artifact defined as input.- Specified by:
createArtifactin interfaceAnalyticsModelingSynchronization- Parameters:
userId- requested the operation.serverCapability- source where artifact persist.serverCapabilityGUID- source where artifact persist.artifact- definition.- Returns:
- response with artifact or error description.
- 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.
-
updateArtifact
public ResponseContainerAssets updateArtifact(String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Update analytics artifact defined as json input.- Specified by:
updateArtifactin interfaceAnalyticsModelingSynchronization- Parameters:
userId- requested the operation.serverCapability- source where artifact persist.serverCapabilityGUID- source where artifact persist.artifact- definition.- Returns:
- response with artifact or error description.
- 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.
-
deleteArtifact
public ResponseContainerAssets deleteArtifact(String userId, String serverCapability, String serverCapabilityGUID, String identifier) throws AnalyticsModelingCheckedException, PropertyServerException, InvalidParameterException, UserNotAuthorizedException
Delete assets in repository defined by artifact unique identifier.- Specified by:
deleteArtifactin interfaceAnalyticsModelingSynchronization- Parameters:
userId- request userserverCapability- where the artifact is stored.serverCapabilityGUID- source where artifact persist.identifier- of the artifact in 3rd party system.- Returns:
- errors or list of created assets.
- 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.
-
-