Class DataEngineRESTClient
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.OCFRESTClient
-
- org.odpi.openmetadata.accessservices.dataengine.client.DataEngineRESTClient
-
- All Implemented Interfaces:
DataEngineClient
- Direct Known Subclasses:
DataEngineRESTConfigurationClient
public class DataEngineRESTClient extends OCFRESTClient implements DataEngineClient
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
Constructors Constructor Description DataEngineRESTClient(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLineageMappings(String userId, List<LineageMapping> lineageMappings)Add lineage mapping relationships between schema typesStringaddProcessHierarchy(String userId, ProcessHierarchy processHierarchy)Add a ProcessHierarchy relationship to a processStringcreateExternalDataEngine(String userId, SoftwareServerCapability softwareServerCapability)Create or update the software server capability entityStringcreateOrUpdatePortAlias(String userId, PortAlias portAlias, String processQualifiedName)Create or update the port alias entity with a PortDelegation relationship.StringcreateOrUpdatePortImplementation(String userId, PortImplementation portImplementation, String processQualifiedName)Create or update the port implementation entity,with the corresponding schema type and port schema relationship.StringcreateOrUpdateProcess(String userId, Process process)Create or update the process, with all the ports, schema types and corresponding relationships including the process hierarchy relationship.StringcreateOrUpdateSchemaType(String userId, SchemaType schemaType)Create or update the schema type entity, with the corresponding schema attributes and relationshipsvoiddeleteConnection(String userId, String qualifiedName, String guid)Delete the connectionvoiddeleteDatabase(String userId, String qualifiedName, String guid)Delete the databasevoiddeleteDataFile(String userId, String qualifiedName, String guid)Delete the data filevoiddeleteEndpoint(String userId, String qualifiedName, String guid)Delete the endpointvoiddeleteExternalDataEngine(String userId, String qualifiedName, String guid)Delete the external data enginevoiddeleteFolder(String userId, String qualifiedName, String guid)Delete the foldervoiddeletePortAlias(String userId, String qualifiedName, String guid)Delete the port aliasvoiddeletePortImplementation(String userId, String qualifiedName, String guid)Delete the port implementationvoiddeleteProcess(String userId, String qualifiedName, String guid)Delete a processvoiddeleteRelationalTable(String userId, String qualifiedName, String guid)Delete the relational tablevoiddeleteSchemaType(String userId, String qualifiedName, String guid)Delete the schema typeDeleteSemanticgetDeleteSemantic()StringgetExternalSourceName()Returns the name of the source system using data engine clientvoidsetDeleteSemantic(DeleteSemantic deleteSemantic)voidsetExternalSourceName(String externalSourceName)Sets external source system name using the data engine clientStringupsertDatabase(String userId, Database database)Create or update the database entityStringupsertDataFile(String userId, DataFile dataFile)Create or update the data file entityStringupsertRelationalTable(String userId, RelationalTable relationalTable)Create or update the relational table entity-
Methods inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.OCFRESTClient
callAssetGetRESTCall, callAssetsGetRESTCall, callAssetsPostRESTCall, callConnectionGetRESTCall, callTagGetRESTCall, callTagListGetRESTCall, callTagListPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callConnectorTypeGetRESTCall, callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, 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
-
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 servers- 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 serversuserId- caller's userId embedded in all HTTP requestspassword- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException- null URL or server name
-
-
Method Detail
-
getExternalSourceName
public String getExternalSourceName()
Description copied from interface:DataEngineClientReturns the name of the source system using data engine client- Specified by:
getExternalSourceNamein interfaceDataEngineClient- Returns:
- Source system name
-
setExternalSourceName
public void setExternalSourceName(String externalSourceName)
Description copied from interface:DataEngineClientSets external source system name using the data engine client- Specified by:
setExternalSourceNamein interfaceDataEngineClient- Parameters:
externalSourceName- Source system name
-
getDeleteSemantic
public DeleteSemantic getDeleteSemantic()
-
setDeleteSemantic
public void setDeleteSemantic(DeleteSemantic deleteSemantic)
-
createOrUpdateProcess
public String createOrUpdateProcess(String userId, Process process) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Description copied from interface:DataEngineClientCreate or update the process, with all the ports, schema types and corresponding relationships including the process hierarchy relationship.- Specified by:
createOrUpdateProcessin 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:DataEngineClientDelete a process- Specified by:
deleteProcessin 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, SoftwareServerCapability softwareServerCapability) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create or update the software server capability entity- Specified by:
createExternalDataEnginein interfaceDataEngineClient- Parameters:
userId- the name of the calling usersoftwareServerCapability- the software server capability 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:
deleteExternalDataEnginein 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:
createOrUpdateSchemaTypein 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:
deleteSchemaTypein 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:
createOrUpdatePortImplementationin 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:
deletePortImplementationin 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
-
createOrUpdatePortAlias
public String createOrUpdatePortAlias(String userId, PortAlias portAlias, String processQualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create or update the port alias entity with a PortDelegation relationship. It attaches the port alias to the provided process- Specified by:
createOrUpdatePortAliasin interfaceDataEngineClient- Parameters:
userId- the name of the calling userportAlias- the port alias beanprocessQualifiedName- the process qualified name- Returns:
- unique identifier of the port alias in the repository
- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
deletePortAlias
public void deletePortAlias(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException
Delete the port alias- Specified by:
deletePortAliasin interfaceDataEngineClient- Parameters:
userId- the name of the calling userqualifiedName- the qualified name of the port aliasguid- the unique identifier of the port alias- 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:
addProcessHierarchyin 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
-
addLineageMappings
public void addLineageMappings(String userId, List<LineageMapping> lineageMappings) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Add lineage mapping relationships between schema types- Specified by:
addLineageMappingsin interfaceDataEngineClient- Parameters:
userId- the name of the calling userlineageMappings- list of lineage mappings- 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:
upsertDatabasein 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
-
upsertRelationalTable
public String upsertRelationalTable(String userId, RelationalTable relationalTable) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create or update the relational table entity- Specified by:
upsertRelationalTablein interfaceDataEngineClient- Parameters:
userId- the name of the calling userrelationalTable- the relational table 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
-
upsertDataFile
public String upsertDataFile(String userId, DataFile dataFile) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create or update the data file entity- Specified by:
upsertDataFilein 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:
deleteDatabasein 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
-
deleteRelationalTable
public void deleteRelationalTable(String userId, String qualifiedName, String guid) throws InvalidParameterException, PropertyServerException
Delete the relational table- Specified by:
deleteRelationalTablein 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:
deleteDataFilein 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:
deleteFolderin 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:
deleteConnectionin 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:
deleteEndpointin 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
-
-