Class DataEngineSchemaTypeHandler
- java.lang.Object
-
- org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineSchemaTypeHandler
-
public class DataEngineSchemaTypeHandler extends Object
DataEngineSchemaTypeHandler manages schema types objects from the property server. It runs server-side in the DataEngine OMAS and creates and retrieves schema type entities through the OMRSRepositoryConnector.
-
-
Field Summary
Fields Modifier and Type Field Description static StringSCHEMA_TYPE_GUID_PARAMETER_NAME
-
Constructor Summary
Constructors Constructor Description DataEngineSchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, SchemaTypeHandler<SchemaType> schemaTypeHandler, DataEngineRegistrationHandler dataEngineRegistrationHandler, DataEngineCommonHandler dataEngineCommonHandler, DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLineageMappingRelationship(String userId, String sourceQualifiedName, String targetQualifiedName, String externalSourceName)Create LineageMapping relationship between two entitiesOptional<EntityDetail>findSchemaTypeEntity(String userId, String qualifiedName)Find out if the SchemaType object is already stored in the repository.voidremoveSchemaType(String userId, String schemaTypeGUID, String externalSourceName, DeleteSemantic deleteSemantic)Remove the schema type with the associated schema attributesStringupsertSchemaType(String userId, SchemaType schemaType, String externalSourceName)Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or updates the existing one.
-
-
-
Field Detail
-
SCHEMA_TYPE_GUID_PARAMETER_NAME
public static final String SCHEMA_TYPE_GUID_PARAMETER_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DataEngineSchemaTypeHandler
public DataEngineSchemaTypeHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, SchemaTypeHandler<SchemaType> schemaTypeHandler, DataEngineRegistrationHandler dataEngineRegistrationHandler, DataEngineCommonHandler dataEngineCommonHandler, DataEngineSchemaAttributeHandler dataEngineSchemaAttributeHandler)
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 objectsschemaTypeHandler- handler for managing schema elements in the metadata repositoriesdataEngineRegistrationHandler- provides calls for retrieving external data engine guiddataEngineCommonHandler- provides utilities for manipulating entities
-
-
Method Detail
-
upsertSchemaType
public String upsertSchemaType(String userId, SchemaType schemaType, String externalSourceName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
Create the schema type entity, with the corresponding schema attributes and relationships if it doesn't exist or updates the existing one.- Parameters:
userId- the name of the calling userschemaType- the schema type valuesexternalSourceName- the unique name of the external source- Returns:
- unique identifier of the schema type in the repository
- Throws:
InvalidParameterException- the bean properties are invalidUserNotAuthorizedException- user not authorized to issue this requestPropertyServerException- problem accessing the property server
-
findSchemaTypeEntity
public Optional<EntityDetail> findSchemaTypeEntity(String userId, String qualifiedName) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException
Find out if the SchemaType 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 schema type 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
-
addLineageMappingRelationship
public void addLineageMappingRelationship(String userId, String sourceQualifiedName, String targetQualifiedName, String externalSourceName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create LineageMapping relationship between two entities- Parameters:
userId- the name of the calling usersourceQualifiedName- the qualified name of the source entitytargetQualifiedName- the qualified name of the target entityexternalSourceName- 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
-
removeSchemaType
public void removeSchemaType(String userId, String schemaTypeGUID, String externalSourceName, DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException
Remove the schema type with the associated schema attributes- Parameters:
userId- the name of the calling userschemaTypeGUID- the unique identifier of the schema typeexternalSourceName- 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.
-
-