Class DataEngineRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient
org.odpi.openmetadata.accessservices.dataengine.client.DataEngineRESTClient
- All Implemented Interfaces:
DataEngineClient
- Direct Known Subclasses:
DataEngineRESTConfigurationClient
The Data Engine Open Metadata Access Service (OMAS) provides an interface for data engine tools to create
processes with ports, schemas and relationships. See interface definition for more explanation.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot
-
Constructor Summary
ConstructorsConstructorDescriptionDataEngineRESTClient
(String serverName, String serverPlatformRootURL) Create a new client without authentication.DataEngineRESTClient
(String serverName, String serverPlatformRootURL, String userId, String password) Create a new client that passes userId and password in each HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDataFlows
(String userId, List<DataFlow> dataFlows) Add data flow relationships between entitiesaddProcessHierarchy
(String userId, ProcessHierarchy processHierarchy) Add a ProcessHierarchy relationship to a processcreateExternalDataEngine
(String userId, Engine engine) Create or update the engine entitycreateOrUpdatePortImplementation
(String userId, PortImplementation portImplementation, String processQualifiedName) Create or update the port implementation entity,with the corresponding schema type and port schema relationship.createOrUpdateProcess
(String userId, Process process) Create or update the process, with all the ports, schema types and corresponding relationships including the process hierarchy relationship.createOrUpdateSchemaType
(String userId, SchemaType schemaType) Create or update the schema type entity, with the corresponding schema attributes and relationshipsvoid
deleteConnection
(String userId, String qualifiedName, String guid) Delete the connectionvoid
deleteDatabase
(String userId, String qualifiedName, String guid) Delete the databasevoid
deleteDatabaseSchema
(String userId, String qualifiedName, String guid) Delete the database schemavoid
deleteDataFile
(String userId, String qualifiedName, String guid) Delete the data filevoid
deleteEndpoint
(String userId, String qualifiedName, String guid) Delete the endpointvoid
deleteEventType
(String userId, String qualifiedName, String guid) Delete the event typevoid
deleteExternalDataEngine
(String userId, String qualifiedName, String guid) Delete the external data enginevoid
deleteFolder
(String userId, String qualifiedName, String guid) Delete the foldervoid
deletePortImplementation
(String userId, String qualifiedName, String guid) Delete the port implementationvoid
deleteProcess
(String userId, String qualifiedName, String guid) Delete a processvoid
deleteRelationalTable
(String userId, String qualifiedName, String guid) Delete the relational tablevoid
deleteSchemaType
(String userId, String qualifiedName, String guid) Delete the schema typevoid
deleteTopic
(String userId, String qualifiedName, String guid) Delete the topicfind
(String userId, FindRequestBody findRequestBody) Find an entityReturns the name of the source system using data engine clientgetProcessingState
(String userId) Get the engine's processing state classification's propertiesvoid
setDeleteSemantic
(DeleteSemantic deleteSemantic) void
setExternalSourceName
(String externalSourceName) Sets external source system name using the data engine clientupsertDatabase
(String userId, Database database) Create or update the database entityupsertDatabaseSchema
(String userId, DatabaseSchema databaseSchema, String databaseQualifiedName) Create or update the database schema entityupsertDataFile
(String userId, DataFile dataFile) Create or update the data file entityupsertEventType
(String userId, EventType eventType, String topicQualifiedName) Create or update the event type entityvoid
upsertProcessingState
(String userId, Map<String, Long> properties) Create or update the engine's processing state classification with the provided propertiesupsertRelationalTable
(String userId, RelationalTable relationalTable, String databaseSchemaQualifiedName) Create or update the relational table entityupsertTopic
(String userId, Topic topic) Create or update the topic entityMethods inherited from class org.odpi.openmetadata.frameworkservices.ocf.metadatamanagement.client.OCFRESTClient
callOCFAssetGetRESTCall, callOCFAssetsGetRESTCall, callOCFAssetsPostRESTCall, callOCFConnectionGetRESTCall, callOCFTagGetRESTCall, callOCFTagListGetRESTCall, callOCFTagListPostRESTCall
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 Details
-
DataEngineRESTClient
public DataEngineRESTClient(String serverName, String serverPlatformRootURL) throws InvalidParameterException Create a new client without authentication.- Parameters:
serverName
- name of the server to connect toserverPlatformRootURL
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- null URL or server name
-
DataEngineRESTClient
public DataEngineRESTClient(String serverName, String serverPlatformRootURL, 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 toserverPlatformRootURL
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- null URL or server name
-
-
Method Details
-
getExternalSourceName
Description copied from interface:DataEngineClient
Returns the name of the source system using data engine client- Specified by:
getExternalSourceName
in interfaceDataEngineClient
- Returns:
- Source system name
-
setExternalSourceName
Description copied from interface:DataEngineClient
Sets external source system name using the data engine client- Specified by:
setExternalSourceName
in interfaceDataEngineClient
- Parameters:
externalSourceName
- Source system name
-
getDeleteSemantic
-
setDeleteSemantic
-
createOrUpdateProcess
public String createOrUpdateProcess(String userId, Process process) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Description copied from interface:DataEngineClient
Create or update the process, with all the ports, schema types and corresponding relationships including the process hierarchy relationship.- Specified by:
createOrUpdateProcess
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userprocess
- the process- Returns:
- unique identifier of the process in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property serverUserNotAuthorizedException
- user not authorized to issue this request
-
deleteProcess
public void deleteProcess(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Description copied from interface:DataEngineClient
Delete a process- Specified by:
deleteProcess
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the process to be deletedguid
- the unique identifier of the process to be deleted- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
createExternalDataEngine
public String createExternalDataEngine(String userId, Engine engine) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the engine entity- Specified by:
createExternalDataEngine
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userengine
- the engine bean- Returns:
- unique identifier of the server in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
deleteExternalDataEngine
public void deleteExternalDataEngine(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the external data engine- Specified by:
deleteExternalDataEngine
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the external data engineguid
- the unique identifier of the external data engine- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
createOrUpdateSchemaType
public String createOrUpdateSchemaType(String userId, SchemaType schemaType) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create or update the schema type entity, with the corresponding schema attributes and relationships- Specified by:
createOrUpdateSchemaType
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userschemaType
- the schema type bean- Returns:
- unique identifier of the schema type in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property serverUserNotAuthorizedException
- user not authorized to issue this request
-
deleteSchemaType
public void deleteSchemaType(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the schema type- Specified by:
deleteSchemaType
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the schema typeguid
- the unique identifier of the schema type- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
createOrUpdatePortImplementation
public String createOrUpdatePortImplementation(String userId, PortImplementation portImplementation, String processQualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the port implementation entity,with the corresponding schema type and port schema relationship. It attaches the port implementation to the provided process- Specified by:
createOrUpdatePortImplementation
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userportImplementation
- the port implementation beanprocessQualifiedName
- the process qualified name- Returns:
- unique identifier of the port implementation in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
deletePortImplementation
public void deletePortImplementation(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the port implementation- Specified by:
deletePortImplementation
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of port implementationguid
- the unique identifier of the port implementation- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
addProcessHierarchy
public String addProcessHierarchy(String userId, ProcessHierarchy processHierarchy) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a ProcessHierarchy relationship to a process- Specified by:
addProcessHierarchy
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userprocessHierarchy
- the process hierarchy bean- Returns:
- the unique identifier (guid) of the child of the process hierarchy that was updated
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
addDataFlows
public void addDataFlows(String userId, List<DataFlow> dataFlows) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add data flow relationships between entities- Specified by:
addDataFlows
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userdataFlows
- list of data flows- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertDatabase
public String upsertDatabase(String userId, Database database) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the database entity- Specified by:
upsertDatabase
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userdatabase
- the database bean- Returns:
- unique identifier of database in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertDatabaseSchema
public String upsertDatabaseSchema(String userId, DatabaseSchema databaseSchema, String databaseQualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the database schema entity- Specified by:
upsertDatabaseSchema
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userdatabaseSchema
- the database schema beandatabaseQualifiedName
- the qualified name of the database, in case it is known- Returns:
- unique identifier of database schema in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertRelationalTable
public String upsertRelationalTable(String userId, RelationalTable relationalTable, String databaseSchemaQualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the relational table entity- Specified by:
upsertRelationalTable
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userrelationalTable
- the relational table beandatabaseSchemaQualifiedName
- the qualified name of the database schema to which it will be related- Returns:
- unique identifier of the relational table in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertDataFile
public String upsertDataFile(String userId, DataFile dataFile) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the data file entity- Specified by:
upsertDataFile
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userdataFile
- the data file bean- Returns:
- unique identifier of the relational table in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
deleteDatabase
public void deleteDatabase(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the database- Specified by:
deleteDatabase
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the databaseguid
- the unique identifier of the database- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteDatabaseSchema
public void deleteDatabaseSchema(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the database schema- Specified by:
deleteDatabaseSchema
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the database schemaguid
- the unique identifier of the database schema- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteRelationalTable
public void deleteRelationalTable(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the relational table- Specified by:
deleteRelationalTable
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the relational tableguid
- the unique identifier of the relational table- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteDataFile
public void deleteDataFile(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the data file- Specified by:
deleteDataFile
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the data fileguid
- the unique identifier of the data file- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteFolder
public void deleteFolder(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the folder- Specified by:
deleteFolder
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the data fileguid
- the unique identifier of the folder- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteConnection
public void deleteConnection(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the connection- Specified by:
deleteConnection
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the connectionguid
- the unique identifier of the connection- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteEndpoint
public void deleteEndpoint(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the endpoint- Specified by:
deleteEndpoint
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the endpointguid
- the unique identifier of the endpoint- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
find
public GUIDListResponse find(String userId, FindRequestBody findRequestBody) throws ConnectorCheckedException, InvalidParameterException, UserNotAuthorizedException, PropertyServerException Find an entity- Specified by:
find
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userfindRequestBody
- request body- Returns:
- list of found entities
- Throws:
ConnectorCheckedException
- problem with the underlying connector (if used)InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertTopic
public String upsertTopic(String userId, Topic topic) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the topic entity- Specified by:
upsertTopic
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling usertopic
- the topic bean- Returns:
- unique identifier of topic in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
upsertEventType
public String upsertEventType(String userId, EventType eventType, String topicQualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create or update the event type entity- Specified by:
upsertEventType
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling usereventType
- the event type beantopicQualifiedName
- the qualified name of the topic- Returns:
- unique identifier of event type in the repository
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
deleteTopic
public void deleteTopic(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the topic- Specified by:
deleteTopic
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the topicguid
- the unique identifier of the topic- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
deleteEventType
public void deleteEventType(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException Delete the event type- Specified by:
deleteEventType
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userqualifiedName
- the qualified name of the event typeguid
- the unique identifier of the event type- Throws:
InvalidParameterException
- the bean properties are invalidPropertyServerException
- problem accessing the property server
-
upsertProcessingState
public void upsertProcessingState(String userId, Map<String, Long> properties) throws PropertyServerException, InvalidParameterException, UserNotAuthorizedExceptionDescription copied from interface:DataEngineClient
Create or update the engine's processing state classification with the provided properties- Specified by:
upsertProcessingState
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling userproperties
- properties of the processing state- Throws:
PropertyServerException
InvalidParameterException
UserNotAuthorizedException
-
getProcessingState
Description copied from interface:DataEngineClient
Get the engine's processing state classification's properties- Specified by:
getProcessingState
in interfaceDataEngineClient
- Parameters:
userId
- the name of the calling user- Throws:
PropertyServerException
-