Class DataEngineResource
java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.server.spring.DataEngineResource
@RestController
@RequestMapping("/servers/{serverName}/open-metadata/access-services/data-engine/users/{userId}")
public class DataEngineResource
extends Object
The DataEngineResource provides the server-side implementation of the Data Engine Open Metadata Assess Service
(OMAS). This interface facilitates the creation of processes, ports and schema types, with all the needed
relationships.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDataFlows
(String userId, String serverName, DataFlowsRequestBody dataFlowsRequestBody) Adds DataFlow relationshipsaddProcessHierarchy
(String userId, String serverName, ProcessHierarchyRequestBody processHierarchyRequestBody) Adds a ProcessHierarchy relationship between Process entitiescreateExternalDataEngine
(String serverName, String userId, DataEngineRegistrationRequestBody requestBody) Registers an external data engine as source of metadata by creating an engine entitycreateOrUpdatePortImplementation
(String userId, String serverName, PortImplementationRequestBody portImplementationRequestBody) Creates the PortImplementation entitycreateOrUpdateProcess
(String userId, String serverName, ProcessRequestBody processRequestBody) Create or update the Process entity with ports, schema types and all needed relationshipscreateOrUpdateSchemaType
(String userId, String serverName, SchemaTypeRequestBody requestBody) Creates a SchemaType entity with schema attributes and relationshipsdeleteConnection
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the connectiondeleteDatabase
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the databasedeleteDatabaseSchema
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the database schemadeleteDataFile
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the data file with columnsdeleteEndpoint
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the endpointdeleteEventType
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the event typedeleteExternalDataEngine
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the external data enginedeleteFolder
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the folderdeletePortImplementation
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the PortImplementation entitydeleteProcess
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the ProcessdeleteRelationalTable
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the relational table with columnsdeleteSchemaType
(String userId, String serverName, DeleteRequestBody requestBody) Removes a SchemaType entity with all the needed relationshipsdeleteTopic
(String userId, String serverName, DeleteRequestBody requestBody) Deletes the topicgetExternalDataEngineByQualifiedName
(String serverName, String userId, String qualifiedName) Returns the unique identifier of an external data engine from an engine definition.getInTopicConnection
(String serverName, String userId) Gets the connection details used to access Data Engine OMAS input topicgetProcessingState
(String userId, String serverName, String externalSourceName) Gets the data engine's processing state classification propertiessearch
(String userId, String serverName, FindRequestBody findRequestBody) Find assetsupsertDatabase
(String userId, String serverName, DatabaseRequestBody requestBody) Creates a Database entity with all the needed relationshipsupsertDatabaseSchema
(String userId, String serverName, DatabaseSchemaRequestBody requestBody) Creatse a Database Schema entity with a relationship to a database, if provided and not virtualupsertDataFile
(String serverName, String userId, DataFileRequestBody dataFileRequestBody) Adds a DataFile asset or any of its subtypeupsertEventType
(String userId, String serverName, EventTypeRequestBody requestBody) Creates or updates an Event Type entity with all the needed relationshipsupsertProcessingState
(String userId, String serverName, ProcessingStateRequestBody requestBody) Creates or updates a data engine's processing state classification with the provided propertiesupsertRelationalTable
(String userId, String serverName, RelationalTableRequestBody requestBody) Creates a RelationalTable entity with all the needed relationshipsupsertTopic
(String userId, String serverName, TopicRequestBody requestBody) Creates or updates a Topic entity with all the needed relationships
-
Constructor Details
-
DataEngineResource
public DataEngineResource()Default Constructor
-
-
Method Details
-
createExternalDataEngine
@PostMapping(path="/registration") public GUIDResponse createExternalDataEngine(@PathVariable("serverName") String serverName, @PathVariable("userId") String userId, @RequestBody DataEngineRegistrationRequestBody requestBody) Registers an external data engine as source of metadata by creating an engine entity- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties of the entity- Returns:
- unique identifier of the engine
-
getExternalDataEngineByQualifiedName
@GetMapping(path="/registration/{qualifiedName}") public GUIDResponse getExternalDataEngineByQualifiedName(@PathVariable String serverName, @PathVariable String userId, @PathVariable String qualifiedName) Returns the unique identifier of an external data engine from an engine definition.- Parameters:
serverName
- name of server instance to calluserId
- identifier of calling userqualifiedName
- qualified name of the engine- Returns:
- unique identified of the engine
-
deleteExternalDataEngine
@DeleteMapping(path="/registration") public VoidResponse deleteExternalDataEngine(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the external data engine- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties of the data engine- Returns:
- void response
-
createOrUpdateSchemaType
@PostMapping(path="/schema-types") public GUIDResponse createOrUpdateSchemaType(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody SchemaTypeRequestBody requestBody) Creates a SchemaType entity with schema attributes and relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the schema type- Returns:
- unique identifier of the created entity
-
deleteSchemaType
@DeleteMapping(path="/schema-types") public VoidResponse deleteSchemaType(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Removes a SchemaType entity with all the needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the schema type- Returns:
- void response
-
createOrUpdatePortImplementation
@PostMapping(path="/port-implementations") public GUIDResponse createOrUpdatePortImplementation(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody PortImplementationRequestBody portImplementationRequestBody) Creates the PortImplementation entity- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userportImplementationRequestBody
- properties of the port implementation- Returns:
- unique identifier of the created port implementation
-
deletePortImplementation
@DeleteMapping(path="/port-implementations") public VoidResponse deletePortImplementation(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the PortImplementation entity- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties of the port implementation- Returns:
- void response
-
addProcessHierarchy
@PostMapping(path="/process-hierarchies") public GUIDResponse addProcessHierarchy(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody ProcessHierarchyRequestBody processHierarchyRequestBody) Adds a ProcessHierarchy relationship between Process entities- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userprocessHierarchyRequestBody
- properties of the process hierarchy- Returns:
- the unique identifier (guid) of the child of the process hierarchy that was updated
-
createOrUpdateProcess
@PostMapping(path="/processes") public GUIDResponse createOrUpdateProcess(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody ProcessRequestBody processRequestBody) Create or update the Process entity with ports, schema types and all needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userprocessRequestBody
- properties of the process- Returns:
- unique identifier of the created process
-
deleteProcess
@DeleteMapping(path="/processes") public VoidResponse deleteProcess(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the Process- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties of the process- Returns:
- void response
-
addDataFlows
@PostMapping(path="/data-flows") public VoidResponse addDataFlows(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DataFlowsRequestBody dataFlowsRequestBody) Adds DataFlow relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userdataFlowsRequestBody
- properties of the data flows- Returns:
- unique identifier of the created entity
-
getInTopicConnection
@GetMapping(path="/topics/in-topic-connection") public ConnectionResponse getInTopicConnection(@PathVariable String serverName, @PathVariable String userId) Gets the connection details used to access Data Engine OMAS input topic- Parameters:
serverName
- name of server instance to calluserId
- name of the calling user- Returns:
- OCF API ConnectionResponse object describing the details for the in topic connection used or * InvalidParameterException one of the parameters is null or invalid or * UserNotAuthorizedException user not authorized to issue this request or * PropertyServerException problem retrieving the discovery engine definition
-
upsertDatabase
@PostMapping(path="/databases") public GUIDResponse upsertDatabase(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DatabaseRequestBody requestBody) Creates a Database entity with all the needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- unique identifier of the created entity
-
deleteDatabase
@DeleteMapping(path="/databases") public VoidResponse deleteDatabase(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the database- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- void response
-
upsertDatabaseSchema
@PostMapping(path="/database-schemas") public GUIDResponse upsertDatabaseSchema(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DatabaseSchemaRequestBody requestBody) Creatse a Database Schema entity with a relationship to a database, if provided and not virtual- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- unique identifier of the created entity
-
deleteDatabaseSchema
@DeleteMapping(path="/database-schemas") public VoidResponse deleteDatabaseSchema(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the database schema- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- void response
-
upsertRelationalTable
@PostMapping(path="/relational-tables") public GUIDResponse upsertRelationalTable(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody RelationalTableRequestBody requestBody) Creates a RelationalTable entity with all the needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the relational table- Returns:
- unique identifier of the created entity
-
deleteRelationalTable
@DeleteMapping(path="/relational-tables") public VoidResponse deleteRelationalTable(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the relational table with columns- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the relational table- Returns:
- void response
-
upsertDataFile
@PostMapping(path="/data-files") public GUIDResponse upsertDataFile(@PathVariable String serverName, @PathVariable String userId, @RequestBody DataFileRequestBody dataFileRequestBody) Adds a DataFile asset or any of its subtype- Parameters:
serverName
- name of server instance to calluserId
- name of the calling userdataFileRequestBody
- properties of data file- Returns:
- unique identifier of the created entity
-
deleteDataFile
@DeleteMapping(path="/data-files") public VoidResponse deleteDataFile(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the data file with columns- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the data file- Returns:
- void response
-
deleteFolder
@DeleteMapping(path="/folders") public VoidResponse deleteFolder(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the folder- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the folder- Returns:
- void response
-
deleteConnection
@DeleteMapping(path="/connections") public VoidResponse deleteConnection(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the connection- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the connection- Returns:
- void response
-
deleteEndpoint
@DeleteMapping(path="/endpoints") public VoidResponse deleteEndpoint(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the endpoint- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the connection- Returns:
- void response
-
search
@PostMapping(path="/find") public GUIDListResponse search(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody FindRequestBody findRequestBody) Find assets- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userfindRequestBody
- properties for the connection- Returns:
- asset if found
-
upsertTopic
@PostMapping(path="/topics") public GUIDResponse upsertTopic(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody TopicRequestBody requestBody) Creates or updates a Topic entity with all the needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the topic- Returns:
- unique identifier of the created entity
-
deleteTopic
@DeleteMapping(path="/topics") public VoidResponse deleteTopic(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the topic- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- void response
-
upsertEventType
@PostMapping(path="/event-types") public GUIDResponse upsertEventType(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody EventTypeRequestBody requestBody) Creates or updates an Event Type entity with all the needed relationships- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the event type- Returns:
- unique identifier of the created entity
-
deleteEventType
@DeleteMapping(path="/event-types") public VoidResponse deleteEventType(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody DeleteRequestBody requestBody) Deletes the event type- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties for the database- Returns:
- void response
-
upsertProcessingState
@PostMapping(path="/processing-state") public VoidResponse upsertProcessingState(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestBody ProcessingStateRequestBody requestBody) Creates or updates a data engine's processing state classification with the provided properties- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling userrequestBody
- properties of the processing state- Returns:
- void response
-
getProcessingState
@GetMapping(path="/processing-state") public PropertiesResponse getProcessingState(@PathVariable("userId") String userId, @PathVariable("serverName") String serverName, @RequestParam("dataEngine") String externalSourceName) Gets the data engine's processing state classification properties- Parameters:
serverName
- name of server instance to calluserId
- the name of the calling user- Returns:
- PropertiesResponse response
-