Class DataEnginePortHandler
java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler
PortHandler manages Port objects from the property server. It runs server-side in the DataEngine OMAS
and creates port entities with wire relationships through the OMRSRepositoryConnector.
-
Constructor Summary
ConstructorsConstructorDescriptionDataEnginePortHandler
(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, PortHandler<Port> portHandler, DataEngineRegistrationHandler registrationHandler) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptionvoid
addPortSchemaRelationship
(String userId, String portGUID, String schemaTypeGUID, String externalSourceName) Create a PortSchema relationship between a Port and the corresponding SchemaType.createPortImplementation
(String userId, PortImplementation port, String processGUID, String externalSourceName) Create the port implementation attached to a process.findPortImplementationEntity
(String userId, String qualifiedName) Find out if the PortImplementation object is already stored in the repository.findSchemaTypeForPort
(String userId, String portGUID) Retrieve the schema type that is linked to the portvoid
removePort
(String userId, String portGUID, String externalSourceName, DeleteSemantic deleteSemantic) Remove the portvoid
updatePortImplementation
(String userId, EntityDetail originalPortEntity, PortImplementation port, String externalSourceName) Update the port implementation
-
Constructor Details
-
DataEnginePortHandler
public DataEnginePortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, PortHandler<Port> portHandler, DataEngineRegistrationHandler registrationHandler) Construct the handler information needed to interact with the repository services- Parameters:
serviceName
- name of this serviceserverName
- name of the local serverinvalidParameterHandler
- handler for managing parameter errorsrepositoryHelper
- provides utilities for manipulating the repository services objectsdataEngineCommonHandler
- provides utilities for manipulating entitiesportHandler
- provides utilities for manipulating the repository services portsregistrationHandler
- provides utilities for manipulating engine entities
-
-
Method Details
-
createPortImplementation
public String createPortImplementation(String userId, PortImplementation port, String processGUID, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create the port implementation attached to a process.- Parameters:
userId
- the name of the calling userport
- the port implementation valuesprocessGUID
- the unique identifier of the processexternalSourceName
- the unique name of the external source- 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
-
updatePortImplementation
public void updatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation port, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the port implementation- Parameters:
userId
- the name of the calling useroriginalPortEntity
- the created port entityport
- the port implementation new valuesexternalSourceName
- the external data engine- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
addPortSchemaRelationship
public void addPortSchemaRelationship(String userId, String portGUID, String schemaTypeGUID, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a PortSchema relationship between a Port and the corresponding SchemaType. Verifies that the relationship is not present before creating it- Parameters:
userId
- the name of the calling userportGUID
- the unique identifier of the portschemaTypeGUID
- the unique identifier of the schema typeexternalSourceName
- the unique name of the external source- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
findSchemaTypeForPort
public Optional<EntityDetail> findSchemaTypeForPort(String userId, String portGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the schema type that is linked to the port- Parameters:
userId
- the name of the calling userportGUID
- the unique identifier of the port- Returns:
- retrieved entity or an empty optional
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-
removePort
public void removePort(String userId, String portGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException Remove the port- Parameters:
userId
- the name of the calling userportGUID
- unique identifier of the port to be removedexternalSourceName
- the external data enginedeleteSemantic
- the delete semantic- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property serverFunctionNotSupportedException
- the repository does not support this call.
-
findPortImplementationEntity
public Optional<EntityDetail> findPortImplementationEntity(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Find out if the PortImplementation object is already stored in the repository. It uses the fully qualified name to retrieve the entity- Parameters:
userId
- the name of the calling userqualifiedName
- the qualifiedName name of the process to be searched- Returns:
- optional with entity details if found, empty optional if not found
- Throws:
InvalidParameterException
- the bean properties are invalidUserNotAuthorizedException
- user not authorized to issue this requestPropertyServerException
- problem accessing the property server
-