Interface AssetOnboardingFileSystem
-
- All Known Implementing Classes:
FileSystemAssetOwner
public interface AssetOnboardingFileSystem
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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<java.lang.String>
addDataFileAssetToCatalog(java.lang.String userId, java.lang.String displayName, java.lang.String description, java.lang.String pathName)
Creates a new file asset and links it to the folder structure implied in the path name.java.util.List<java.lang.String>
addDataFolderAssetToCatalog(java.lang.String userId, java.lang.String displayName, java.lang.String description, java.lang.String pathName)
Creates a new folder asset that is identified as a data asset.void
attachDataFileAssetToFolder(java.lang.String userId, java.lang.String folderGUID, java.lang.String fileGUID)
Link an existing file asset to a folder.void
attachFolderToFileSystem(java.lang.String userId, java.lang.String fileSystemGUID, java.lang.String folderGUID)
Links a folder to a file system.java.lang.String
createFileSystemInCatalog(java.lang.String userId, java.lang.String uniqueName, java.lang.String displayName, java.lang.String description, java.lang.String type, java.lang.String version, java.lang.String patchLevel, java.lang.String source, java.lang.String format, java.lang.String encryption, java.util.Map<java.lang.String,java.lang.String> additionalProperties)
Files live on a file system.java.util.List<java.lang.String>
createFolderStructureInCatalog(java.lang.String userId, java.lang.String pathName)
Creates a new folder asset for each element in the pathName.java.util.List<java.lang.String>
createFolderStructureInCatalog(java.lang.String userId, java.lang.String parentGUID, java.lang.String pathName)
Creates a new folder asset for each element in the pathName that is linked from the parent entity.void
detachDataFileAssetFromFolder(java.lang.String userId, java.lang.String folderGUID, java.lang.String fileGUID)
Remove a link between a file asset and a folder.void
detachFolderFromFileSystem(java.lang.String userId, java.lang.String fileSystemGUID, java.lang.String folderGUID)
Removed the link between a folder and a file system.FileSystemElement
getFileSystemByGUID(java.lang.String userId, java.lang.String fileSystemGUID)
Retrieve a FileSystemProperties asset by its unique identifier (GUID).FileSystemElement
getFileSystemByUniqueName(java.lang.String userId, java.lang.String uniqueName)
Retrieve a FileSystemProperties asset by its unique name.java.util.List<java.lang.String>
getFileSystems(java.lang.String userId, int startingFrom, int maxPageSize)
Retrieve a list of defined FileSystems assets.FolderElement
getFolderByGUID(java.lang.String userId, java.lang.String folderGUID)
Retrieve a FolderProperties asset by its unique identifier (GUID).FolderElement
getFolderByPathName(java.lang.String userId, java.lang.String pathName)
Retrieve a folder by its fully qualified path name.java.util.List<java.lang.String>
getFolderFiles(java.lang.String userId, java.lang.String folderGUID, int startingFrom, int maxPageSize)
Get the data files inside a folder - both those that are nested and those that are linked.java.util.List<java.lang.String>
getNestedFolders(java.lang.String userId, java.lang.String parentGUID, int startingFrom, int maxPageSize)
Return the list of folders nested inside a folder.void
moveDataFileInCatalog(java.lang.String userId, java.lang.String folderGUID, java.lang.String fileGUID)
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).void
moveDataFolderInCatalog(java.lang.String userId, java.lang.String folderGUID, java.lang.String dataFolderGUID)
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).
-
-
-
Method Detail
-
createFileSystemInCatalog
java.lang.String createFileSystemInCatalog(java.lang.String userId, java.lang.String uniqueName, java.lang.String displayName, java.lang.String description, java.lang.String type, java.lang.String version, java.lang.String patchLevel, java.lang.String source, java.lang.String format, java.lang.String encryption, java.util.Map<java.lang.String,java.lang.String> additionalProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Files live on a file system. This method creates a top level parent for a file system.- Parameters:
userId
- calling useruniqueName
- qualified name for the file systemdisplayName
- short display namedescription
- description of the file systemtype
- type of file systemversion
- version of file systempatchLevel
- patchLevel of software supporting the file systemsource
- supplier of the software for this file systemformat
- format of files on this file systemencryption
- encryption type - null for unencryptedadditionalProperties
- additional properties- Returns:
- unique identifier for the file system
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
createFolderStructureInCatalog
java.util.List<java.lang.String> createFolderStructureInCatalog(java.lang.String userId, java.lang.String parentGUID, java.lang.String pathName) 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".- Parameters:
userId
- calling userparentGUID
- root object to connect the folder topathName
- pathname of the folder (or folders)- Returns:
- list of GUIDs from the top level to the leaf of the supplied pathname
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
createFolderStructureInCatalog
java.util.List<java.lang.String> createFolderStructureInCatalog(java.lang.String userId, java.lang.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".- Parameters:
userId
- calling userpathName
- pathname of the folder (or folders)- Returns:
- list of GUIDs from the top level to the leaf of the supplied pathname
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
attachFolderToFileSystem
void attachFolderToFileSystem(java.lang.String userId, java.lang.String fileSystemGUID, java.lang.String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Links a folder to a file system. The folder is not changed.- Parameters:
userId
- calling userfileSystemGUID
- unique identifier of the file system in the catalogfolderGUID
- unique identifier of the folder in the catalog- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
detachFolderFromFileSystem
void detachFolderFromFileSystem(java.lang.String userId, java.lang.String fileSystemGUID, java.lang.String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Removed the link between a folder and a file system.- Parameters:
userId
- calling userfileSystemGUID
- unique identifier of the file system in the catalogfolderGUID
- unique identifier of the folder in the catalog- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
addDataFileAssetToCatalog
java.util.List<java.lang.String> addDataFileAssetToCatalog(java.lang.String userId, java.lang.String displayName, java.lang.String description, java.lang.String pathName) 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".- Parameters:
userId
- calling userdisplayName
- display name for the file in the catalogdescription
- description of the file in the catalogpathName
- pathname of the data file- Returns:
- list of GUIDs from the top level to the root of the pathname
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
addDataFolderAssetToCatalog
java.util.List<java.lang.String> addDataFolderAssetToCatalog(java.lang.String userId, java.lang.String displayName, java.lang.String description, java.lang.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".- Parameters:
userId
- calling userdisplayName
- display name for the file in the catalogdescription
- description of the file in the catalogpathName
- pathname of the data folder- Returns:
- list of GUIDs from the top level to the root of the pathname
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
attachDataFileAssetToFolder
void attachDataFileAssetToFolder(java.lang.String userId, java.lang.String folderGUID, java.lang.String fileGUID) 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.- Parameters:
userId
- calling userfolderGUID
- unique identifier of the folderfileGUID
- unique identifier of the file- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
detachDataFileAssetFromFolder
void detachDataFileAssetFromFolder(java.lang.String userId, java.lang.String folderGUID, java.lang.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.- Parameters:
userId
- calling userfolderGUID
- unique identifier of the folderfileGUID
- unique identifier of the file- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
moveDataFileInCatalog
void moveDataFileInCatalog(java.lang.String userId, java.lang.String folderGUID, java.lang.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). Similarly to the endpoint in the connection object.- Parameters:
userId
- calling userfolderGUID
- new parent folderfileGUID
- unique identifier of the file to move- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
moveDataFolderInCatalog
void moveDataFolderInCatalog(java.lang.String userId, java.lang.String folderGUID, java.lang.String dataFolderGUID) 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). Similarly to the endpoint in the connection object.- Parameters:
userId
- calling userfolderGUID
- new parent folderdataFolderGUID
- unique identifier of the file to move- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFileSystemByGUID
FileSystemElement getFileSystemByGUID(java.lang.String userId, java.lang.String fileSystemGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a FileSystemProperties asset by its unique identifier (GUID).- Parameters:
userId
- calling userfileSystemGUID
- unique identifier used to locate the file system- Returns:
- FileSystemElement properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFileSystemByUniqueName
FileSystemElement getFileSystemByUniqueName(java.lang.String userId, java.lang.String uniqueName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a FileSystemProperties asset by its unique name.- Parameters:
userId
- calling useruniqueName
- unique name ofr the file system- Returns:
- Filesystem properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFileSystems
java.util.List<java.lang.String> getFileSystems(java.lang.String userId, int startingFrom, int maxPageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a list of defined FileSystems assets.- Parameters:
userId
- calling userstartingFrom
- starting point in the listmaxPageSize
- maximum number of results- Returns:
- List of Filesystem unique identifiers
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderByGUID
FolderElement getFolderByGUID(java.lang.String userId, java.lang.String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a FolderProperties asset by its unique identifier (GUID).- Parameters:
userId
- calling userfolderGUID
- unique identifier used to locate the folder- Returns:
- FolderProperties properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderByPathName
FolderElement getFolderByPathName(java.lang.String userId, java.lang.String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve a folder by its fully qualified path name.- Parameters:
userId
- calling userpathName
- path name- Returns:
- FolderProperties properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getNestedFolders
java.util.List<java.lang.String> getNestedFolders(java.lang.String userId, java.lang.String parentGUID, int startingFrom, int maxPageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Return the list of folders nested inside a folder.- Parameters:
userId
- calling userparentGUID
- unique identifier of the parent folder or file systemstartingFrom
- starting point in the listmaxPageSize
- maximum number of results- Returns:
- list of folder unique identifiers (null means no nested folders)
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderFiles
java.util.List<java.lang.String> getFolderFiles(java.lang.String userId, java.lang.String folderGUID, 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.- Parameters:
userId
- calling userfolderGUID
- unique identifier of the parent folderstartingFrom
- starting point in the listmaxPageSize
- maximum number of results- Returns:
- list of file asset unique identifiers
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
-