@RestController
@RequestMapping(value="/servers/{serverName}/open-metadata/access-services/data-manager/users/{userId}")
public class FilesResource
extends Object
| Constructor and Description |
|---|
FilesResource()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
GUIDListResponse |
addDataFileToCatalog(String serverName,
String userId,
String fileSystemGUID,
String fileSystemName,
DataFileRequestBody requestBody)
Add a simple asset description linked to a connection object for a file and to the folder structure implied in the path name.
|
GUIDListResponse |
addDataFolderAssetToCatalog(String serverName,
String userId,
String fileSystemGUID,
String fileSystemName,
DataFolderRequestBody requestBody)
Creates a new folder asset that is identified as a data asset.
|
VoidResponse |
attachDataFileAssetToFolder(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Link an existing file asset to a folder.
|
VoidResponse |
attachFolderToFileSystem(String serverName,
String userId,
String fileSystemGUID,
String folderGUID,
MetadataSourceRequestBody requestBody)
Links a folder to a file system.
|
GUIDListResponse |
createFolderStructureInCatalog(String serverName,
String userId,
String parentGUID,
PathNameRequestBody requestBody)
Creates a new folder asset for each element in the pathName that is linked from the anchor entity.
|
GUIDListResponse |
createFolderStructureInCatalog(String serverName,
String userId,
String fileSystemGUID,
String fileSystemName,
PathNameRequestBody requestBody)
Creates a new folder asset for each element in the pathName.
|
VoidResponse |
detachDataFileAssetFromFolder(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Remove a link between a file asset and a folder.
|
VoidResponse |
detachFolderFromFileSystem(String serverName,
String userId,
String fileSystemGUID,
String folderGUID,
MetadataSourceRequestBody requestBody)
Removed the link between a folder and a file system.
|
DataFileResponse |
getDataFileByPathName(String serverName,
String userId,
PathNameRequestBody requestBody)
Retrieve a data file by its fully qualified path name.
|
DataFileResponse |
getDataFilesByGUID(String serverName,
String userId,
String dataFileGUID)
Retrieve a data file asset by its unique identifier (GUID).
|
FileSystemResponse |
getFileSystemByGUID(String serverName,
String userId,
String fileSystemGUID)
Retrieve a FileSystemProperties asset by its unique identifier (GUID).
|
FileSystemResponse |
getFileSystemByUniqueName(String serverName,
String userId,
String uniqueName)
Retrieve a FileSystemProperties asset by its unique name.
|
GUIDListResponse |
getFileSystems(String serverName,
String userId,
int startingFrom,
int maxPageSize)
Retrieve a list of defined FileSystems assets.
|
FileFolderResponse |
getFolderByGUID(String serverName,
String userId,
String folderGUID)
Retrieve a folder asset by its unique identifier (GUID).
|
FileFolderResponse |
getFolderByPathName(String serverName,
String userId,
PathNameRequestBody requestBody)
Retrieve a folder by its fully qualified path name.
|
GUIDListResponse |
getFolderFiles(String serverName,
String userId,
String folderGUID,
int startingFrom,
int maxPageSize)
Get the files inside a folder - both those that are nested and those that are linked.
|
GUIDListResponse |
getNestedFolders(String serverName,
String userId,
String anchorGUID,
int startingFrom,
int maxPageSize)
Return the list of folders nested inside a folder.
|
VoidResponse |
moveDataFileInCatalog(String serverName,
String userId,
String folderGUID,
String fileGUID,
MetadataSourceRequestBody requestBody)
Move a data file from its current parent folder to a new parent folder - this changes the file's qualified name
but not its unique identifier (guid).
|
VoidResponse |
moveDataFolderInCatalog(String serverName,
String userId,
String folderGUID,
String dataFolderGUID,
MetadataSourceRequestBody requestBody)
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).
|
@PostMapping(path="/filesystems/folders/{parentGUID}")
public GUIDListResponse createFolderStructureInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String parentGUID,
@RequestBody
PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userparentGUID - root object to connect the folder torequestBody - pathname of the folder (or folders)@PostMapping(path="/filesystems/{fileSystemGUID}/{fileSystemName}/folders")
public GUIDListResponse createFolderStructureInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String fileSystemName,
@RequestBody
PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the software server capability that represents the root of the path namefileSystemName - unique name of the software server capability that represents the root of the path namerequestBody - pathname of the folder (or folders)@PostMapping(path="/filesystems/{fileSystemGUID}/folders/{fileSystemGUID}/attach")
public VoidResponse attachFolderToFileSystem(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String folderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the file system in the catalogfolderGUID - unique identifier of the folder in the catalogrequestBody - external source identifiers - or null for local@PostMapping(path="/filesystems/{fileSystemGUID}/folders/{fileSystemGUID}/detach")
public VoidResponse detachFolderFromFileSystem(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String folderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the file system in the catalogfolderGUID - unique identifier of the folder in the catalogrequestBody - external source identifiers - or null for local@PostMapping(path="/filesystems/{fileSystemGUID}/{fileSystemName}/data-files")
public GUIDListResponse addDataFileToCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String fileSystemName,
@RequestBody
DataFileRequestBody requestBody)
serverName - name of calling serveruserId - calling user (assumed to be the owner)fileSystemGUID - unique identifier of the software server capability that represents the root of the path namefileSystemName - unique name of the software server capability that represents the root of the path namerequestBody - properties for the asset@PostMapping(path="/filesystems/{fileSystemGUID}/{fileSystemName}/data-folders")
public GUIDListResponse addDataFolderAssetToCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID,
@PathVariable
String fileSystemName,
@RequestBody
DataFolderRequestBody requestBody)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier of the software server capability that represents the root of the path namefileSystemName - unique name of the software server capability that represents the root of the path namerequestBody - pathname of the data folder@PostMapping(path="/folders/{folderGUID}/assets/data-files/{fileGUID}/attach")
public VoidResponse attachDataFileAssetToFolder(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the folderfileGUID - unique identifier of the filerequestBody - external source identifiers - or null for local@PostMapping(path="/folders/{folderGUID}/assets/data-files/{fileGUID}/detach")
public VoidResponse detachDataFileAssetFromFolder(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the folderfileGUID - unique identifier of the filerequestBody - external source identifiers - or null for local@PostMapping(path="/folders/{folderGUID}/assets/data-files/{fileGUID}/move-to")
public VoidResponse moveDataFileInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String fileGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - new parent folderfileGUID - unique identifier of the file to moverequestBody - null request body to satisfy REST protocol@PostMapping(path="/folders/{folderGUID}/assets/data-folders/{dataFolderGUID}/move-to")
public VoidResponse moveDataFolderInCatalog(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@PathVariable
String dataFolderGUID,
@RequestBody(required=false)
MetadataSourceRequestBody requestBody)
serverName - name of calling serveruserId - calling userfolderGUID - new parent folderdataFolderGUID - unique identifier of the data folder to moverequestBody - null request body to satisfy REST protocol@GetMapping(path="/filesystems/{fileSystemGUID}")
public FileSystemResponse getFileSystemByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String fileSystemGUID)
serverName - name of calling serveruserId - calling userfileSystemGUID - unique identifier used to locate the file system@GetMapping(path="/filesystems/by-name/{uniqueName}")
public FileSystemResponse getFileSystemByUniqueName(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String uniqueName)
serverName - name of calling serveruserId - calling useruniqueName - unique name for the filesystem@GetMapping(path="/filesystems") public GUIDListResponse getFileSystems(@PathVariable String serverName, @PathVariable String userId, @RequestParam int startingFrom, @RequestParam int maxPageSize)
serverName - name of calling serveruserId - calling userstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/folders/{folderGUID}")
public FileFolderResponse getFolderByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier used to locate the folder@GetMapping(path="/folders/by-path-name") public FileFolderResponse getFolderByPathName(@PathVariable String serverName, @PathVariable String userId, @RequestBody PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userrequestBody - path name@GetMapping(path="/{anchorGUID}/folders")
public GUIDListResponse getNestedFolders(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String anchorGUID,
@RequestParam
int startingFrom,
@RequestParam
int maxPageSize)
serverName - name of calling serveruserId - calling useranchorGUID - unique identifier of the anchor folder or FilesystemstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/folders/{folderGUID}/files")
public GUIDListResponse getFolderFiles(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String folderGUID,
@RequestParam
int startingFrom,
@RequestParam
int maxPageSize)
serverName - name of calling serveruserId - calling userfolderGUID - unique identifier of the anchor folderstartingFrom - starting point in the listmaxPageSize - maximum number of results@GetMapping(path="/files/{dataFileGUID}")
public DataFileResponse getDataFilesByGUID(@PathVariable
String serverName,
@PathVariable
String userId,
@PathVariable
String dataFileGUID)
serverName - name of calling serveruserId - calling userdataFileGUID - unique identifier used to locate the folder@GetMapping(path="/files/by-path-name") public DataFileResponse getDataFileByPathName(@PathVariable String serverName, @PathVariable String userId, @RequestBody PathNameRequestBody requestBody)
serverName - name of calling serveruserId - calling userrequestBody - path nameCopyright © 2018–2020 ODPi. All rights reserved.