Class DataEngineDataFileHandler
java.lang.Object
org.odpi.openmetadata.accessservices.dataengine.server.handlers.DataEngineDataFileHandler
DataFileHandler manages DataFile objects from the property server. It runs server-side in the DataEngine OMAS
and creates DataFile entities with wire relationships through the OMRSRepositoryConnector.
-
Constructor Summary
ConstructorsConstructorDescriptionDataEngineDataFileHandler
(InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, AssetHandler<DataFile> fileHandler, DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler, DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler, DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) Construct the handler information needed to interact with the repository services -
Method Summary
Modifier and TypeMethodDescriptionvoid
removeDataFile
(String userId, String dataFileGUID, String externalSourceName, String externalSourceGUID, DeleteSemantic deleteSemantic) Remove the data fileupsertFileAssetIntoCatalog
(String fileTypeName, String fileTypeGuid, DataFile file, SchemaType schemaType, Map<String, Object> extendedProperties, String externalSourceGuid, String externalSourceName, String userId, String methodName) Constructs a DataFile or CSVFile, its specific TabularSchemaType and its TabularColumns.
-
Constructor Details
-
DataEngineDataFileHandler
public DataEngineDataFileHandler(InvalidParameterHandler invalidParameterHandler, OMRSRepositoryHelper repositoryHelper, DataEngineCommonHandler dataEngineCommonHandler, AssetHandler<DataFile> fileHandler, DataEngineSchemaTypeHandler dataEngineSchemaTypeHandler, DataEngineFolderHierarchyHandler dataEngineFolderHierarchyHandler, DataEngineConnectionAndEndpointHandler dataEngineConnectionAndEndpointHandler) Construct the handler information needed to interact with the repository services- Parameters:
invalidParameterHandler
- handler for managing parameter errorsrepositoryHelper
- provides utilities for manipulating the repository services objectsdataEngineCommonHandler
- provides common Data Engine Omas utilitiesfileHandler
- provides utilities specific for manipulating DataFile and CSVFiledataEngineSchemaTypeHandler
- provides utilities specific for manipulating SchemaTypedataEngineFolderHierarchyHandler
- provides utilities specific for manipulating FileFolderdataEngineConnectionAndEndpointHandler
- provides utilities specific for manipulating Connections and Endpoints
-
-
Method Details
-
upsertFileAssetIntoCatalog
public String upsertFileAssetIntoCatalog(String fileTypeName, String fileTypeGuid, DataFile file, SchemaType schemaType, Map<String, Object> extendedProperties, String externalSourceGuid, String externalSourceName, String userId, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionConstructs a DataFile or CSVFile, its specific TabularSchemaType and its TabularColumns. It also calls for the creation of its folder structure, the Connection and Endpoint- Parameters:
fileTypeName
- file type namefileTypeGuid
- file type guidfile
- actual data fileschemaType
- file schemaextendedProperties
- extended propertiesexternalSourceGuid
- external source guidexternalSourceName
- external source nameuserId
- user idmethodName
- method name- Returns:
- guid of data file
- Throws:
InvalidParameterException
- if invalid parametersPropertyServerException
- if errors in repositoryUserNotAuthorizedException
- if user not authorized
-
removeDataFile
public void removeDataFile(String userId, String dataFileGUID, String externalSourceName, String externalSourceGUID, DeleteSemantic deleteSemantic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException, FunctionNotSupportedException Remove the data file- Parameters:
userId
- the name of the calling userdataFileGUID
- unique identifier of the file to be removedexternalSourceName
- the external data engine nameexternalSourceGUID
- the external data engine unique identifierdeleteSemantic
- 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.
-