Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* SPDX-License-Identifier: Apache 2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.accessservices.assetowner.api;
import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FileSystemElement;
import org.odpi.openmetadata.accessservices.assetowner.metadataelements.FolderElement;
import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException;
import java.util.List;
import java.util.Map;
/**
* AssetOnboardingFileSystem provides specialist methods for building up folder structures for a file system
* and cataloguing the files within them. In addition to this client, there are specialist methods for
* adding avro files and CSV files in the AvroFileAssetOwner and CSVFileAssetOwner respectively.
*/
public interface AssetOnboardingFileSystem
{
/**
* Files live on a file system. This method creates a top level parent for a file system.
*
* @param userId calling user
* @param uniqueName qualified name for the file system
* @param displayName short display name
* @param description description of the file system
* @param type type of file system
* @param version version of file system
* @param patchLevel patchLevel of software supporting the file system
* @param source supplier of the software for this file system
* @param format format of files on this file system
* @param encryption encryption type - null for unencrypted
* @param additionalProperties additional properties
*
* @return unique identifier for the file system
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
String createFileSystemInCatalog(String userId,
String uniqueName,
String displayName,
String description,
String type,
String version,
String patchLevel,
String source,
String format,
String encryption,
Map additionalProperties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Creates a new folder asset for each element in the pathName that is linked from the parent entity.
* For example, a pathName of "one/two/three" creates 3 new folder assets, one called "one", the next called
* "one/two" and the last one called "one/two/three".
*
* @param userId calling user
* @param parentGUID root object to connect the folder to
* @param pathName pathname of the folder (or folders)
*
* @return list of GUIDs from the top level to the leaf of the supplied pathname
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List createFolderStructureInCatalog(String userId,
String parentGUID,
String pathName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Creates a new folder asset for each element in the pathName.
* For example, a pathName of "one/two/three" creates 3 new folder assets, one called "one", the next called
* "one/two" and the last one called "one/two/three".
*
* @param userId calling user
* @param pathName pathname of the folder (or folders)
*
* @return list of GUIDs from the top level to the leaf of the supplied pathname
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List createFolderStructureInCatalog(String userId,
String pathName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Links a folder to a file system. The folder is not changed.
*
* @param userId calling user
* @param fileSystemGUID unique identifier of the file system in the catalog
* @param folderGUID unique identifier of the folder in the catalog
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void attachFolderToFileSystem(String userId,
String fileSystemGUID,
String folderGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Removed the link between a folder and a file system.
*
* @param userId calling user
* @param fileSystemGUID unique identifier of the file system in the catalog
* @param folderGUID unique identifier of the folder in the catalog
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void detachFolderFromFileSystem(String userId,
String fileSystemGUID,
String folderGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Creates a new file asset and links it to the folder structure implied in the path name. If the folder
* structure is not catalogued already, this is created automatically using the createFolderStructureInCatalog() method.
* For example, a pathName of "one/two/three/MyFile.txt" potentially creates 3 new folder assets, one called "one",
* the next called "one/two" and the last one called "one/two/three" plus a file asset called
* "one/two/three/MyFile.txt".
*
* @param userId calling user
* @param displayName display name for the file in the catalog
* @param description description of the file in the catalog
* @param pathName pathname of the data file
*
* @return list of GUIDs from the top level to the root of the pathname
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List addDataFileAssetToCatalog(String userId,
String displayName,
String description,
String pathName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Creates a new folder asset that is identified as a data asset. This means the files and sub-folders within
* it collectively make up the contents of the data asset. As with other types of file-based asset, links
* are made to the folder structure implied in the path name. If the folder
* structure is not catalogued already, this is created automatically using the createFolderStructureInCatalog() method.
* For example, a pathName of "one/two/three/MyDataFolder" potentially creates 3 new folder assets, one called "one",
* the next called "one/two" and the last one called "one/two/three" plus a DataFolder asset called
* "one/two/three/MyDataFolder".
*
* @param userId calling user
* @param displayName display name for the file in the catalog
* @param description description of the file in the catalog
* @param pathName pathname of the data folder
*
* @return list of GUIDs from the top level to the root of the pathname
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List addDataFolderAssetToCatalog(String userId,
String displayName,
String description,
String pathName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Link an existing file asset to a folder. The file is not changed as this is used to create a logical link
* to the folder.
*
* @param userId calling user
* @param folderGUID unique identifier of the folder
* @param fileGUID unique identifier of the file
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void attachDataFileAssetToFolder(String userId,
String folderGUID,
String fileGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Remove a link between a file asset and a folder. The file is not changed. Use moveDataFileInCatalog to record
* the fact that the physical file has moved. Use attachDataFileAssetToFolder to create logical link to a new
* folder.
*
* @param userId calling user
* @param folderGUID unique identifier of the folder
* @param fileGUID unique identifier of the file
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void detachDataFileAssetFromFolder(String userId,
String folderGUID,
String fileGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Move a file from its current parent folder to a new parent folder - this changes the file's qualified name
* but not its unique identifier (guid). Also the the endpoint in the connection object.
*
* @param userId calling user
* @param folderGUID new parent folder
* @param fileGUID unique identifier of the file to move
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void moveDataFileInCatalog(String userId,
String folderGUID,
String fileGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Move a data folder from its current parent folder to a new parent folder - this changes the folder's qualified name
* but not its unique identifier (guid). Also the the endpoint in the connection object.
*
* @param userId calling user
* @param folderGUID new parent folder
* @param dataFolderGUID unique identifier of the file to move
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
void moveDataFolderInCatalog(String userId,
String folderGUID,
String dataFolderGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Retrieve a FileSystemProperties asset by its unique identifier (GUID).
*
* @param userId calling user
* @param fileSystemGUID unique identifier used to locate the file system
*
* @return FileSystemElement properties
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
FileSystemElement getFileSystemByGUID(String userId,
String fileSystemGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Retrieve a FileSystemProperties asset by its unique name.
*
* @param userId calling user
* @param uniqueName unique name ofr the file system
*
* @return Filesystem properties
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
FileSystemElement getFileSystemByUniqueName(String userId,
String uniqueName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Retrieve a list of defined FileSystems assets.
*
* @param userId calling user
* @param startingFrom starting point in the list
* @param maxPageSize maximum number of results
*
* @return List of Filesystem unique identifiers
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List getFileSystems(String userId,
int startingFrom,
int maxPageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Retrieve a FolderProperties asset by its unique identifier (GUID).
*
* @param userId calling user
* @param folderGUID unique identifier used to locate the folder
*
* @return FolderProperties properties
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
FolderElement getFolderByGUID(String userId,
String folderGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Retrieve a folder by its fully qualified path name.
*
* @param userId calling user
* @param pathName path name
*
* @return FolderProperties properties
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
FolderElement getFolderByPathName(String userId,
String pathName) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Return the list of folders nested inside a folder.
*
* @param userId calling user
* @param parentGUID unique identifier of the parent folder or file system
* @param startingFrom starting point in the list
* @param maxPageSize maximum number of results
*
* @return list of folder unique identifiers (null means no nested folders)
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List getNestedFolders(String userId,
String parentGUID,
int startingFrom,
int maxPageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
/**
* Get the data files inside a folder - both those that are nested and those that are linked.
*
* @param userId calling user
* @param folderGUID unique identifier of the parent folder
* @param startingFrom starting point in the list
* @param maxPageSize maximum number of results
*
* @return list of file asset unique identifiers
*
* @throws InvalidParameterException one of the parameters is null or invalid
* @throws PropertyServerException problem accessing property server
* @throws UserNotAuthorizedException security access problem
*/
List getFolderFiles(String userId,
String folderGUID,
int startingFrom,
int maxPageSize) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
}