Class DataEnginePortHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEnginePortHandler
-
public class DataEnginePortHandler extends Object
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
Constructors Constructor Description DataEnginePortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, PortHandler<Port> portHandler, DataEngineRegistrationHandler registrationHandler)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPortDelegationRelationship(String userId, String portGUID, PortType portType, String delegatesToQualifiedName, String externalSourceName)Create a PortDelegation relationship between two ports.voidaddPortSchemaRelationship(String userId, String portGUID, String schemaTypeGUID, String externalSourceName)Create a PortSchema relationship between a Port and the corresponding SchemaType.StringcreatePortAlias(String userId, PortAlias portAlias, String processGUID, String externalSourceName)Create the port alias and attach it to the process.StringcreatePortImplementation(String userId, PortImplementation portImplementation, String processGUID, String externalSourceName)Create the port implementation attached to a process.Optional<EntityDetail>findPortAliasEntity(String userId, String qualifiedName)Find out if the PortAlias object is already stored in the repository.Optional<EntityDetail>findPortEntity(String userId, String qualifiedName)Find out if the Port object is already stored in the repository.Optional<EntityDetail>findPortImplementationEntity(String userId, String qualifiedName)Find out if the PortImplementation object is already stored in the repository.Optional<EntityDetail>findSchemaTypeForPort(String userId, String portGUID)Retrieve the schema type that is linked to the portvoidremovePort(String userId, String portGUID, String externalSourceName, DeleteSemantic deleteSemantic)Remove the portvoidupdatePortAlias(String userId, EntityDetail originalPortEntity, PortAlias portAlias, String externalSourceName)Update the port aliasvoidupdatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation portImplementation, String externalSourceName)Update the port implementation
-
-
-
Constructor Detail
-
DataEnginePortHandler
public DataEnginePortHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, 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 errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- 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 software server capability entities
-
-
Method Detail
-
createPortImplementation
public String createPortImplementation(String userId, PortImplementation portImplementation, String processGUID, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create the port implementation attached to a process.- Parameters:
userId- the name of the calling userportImplementation- 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
-
createPortAlias
public String createPortAlias(String userId, PortAlias portAlias, String processGUID, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create the port alias and attach it to the process.- Parameters:
userId- the name of the calling userportAlias- the port alias valuesprocessGUID- the unique identifier of the processexternalSourceName- the unique name of the external source- 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
-
updatePortImplementation
public void updatePortImplementation(String userId, EntityDetail originalPortEntity, PortImplementation portImplementation, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the port implementation- Parameters:
userId- the name of the calling useroriginalPortEntity- the created port entityportImplementation- 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
-
updatePortAlias
public void updatePortAlias(String userId, EntityDetail originalPortEntity, PortAlias portAlias, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the port alias- Parameters:
userId- the name of the calling useroriginalPortEntity- the created port entityportAlias- the port alias 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
-
addPortDelegationRelationship
public void addPortDelegationRelationship(String userId, String portGUID, PortType portType, String delegatesToQualifiedName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a PortDelegation relationship between two ports. Verifies that the relationship is not present before creating it- Parameters:
userId- the name of the calling userportGUID- the unique identifier of the source portportType- the type of the source portdelegatesToQualifiedName- the unique identifier of the target portexternalSourceName- 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
-
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
-
findPortAliasEntity
public Optional<EntityDetail> findPortAliasEntity(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Find out if the PortAlias 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
-
findPortEntity
public Optional<EntityDetail> findPortEntity(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Find out if the Port 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
-
-