public class FilesAndFoldersClient extends Object implements FilesAndFoldersInterface
| Constructor and Description |
|---|
FilesAndFoldersClient(String serverName,
String serverPlatformURLRoot)
Create a new client with no authentication embedded in the HTTP request.
|
FilesAndFoldersClient(String serverName,
String serverPlatformURLRoot,
AuditLog auditLog)
Create a new client with no authentication embedded in the HTTP request.
|
FilesAndFoldersClient(String serverName,
String serverPlatformURLRoot,
DataManagerRESTClient restClient,
int maxPageSize,
AuditLog auditLog)
Create a new client that is to be used within an OMAG Server.
|
FilesAndFoldersClient(String serverName,
String serverPlatformURLRoot,
String userId,
String password)
Create a new client that passes userId and password in each HTTP request.
|
FilesAndFoldersClient(String serverName,
String serverPlatformURLRoot,
String userId,
String password,
AuditLog auditLog)
Create a new client that passes userId and password in each HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
addDataFileToCatalog(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
DataFileProperties dataFileProperties,
String connectorProviderName)
Creates a new file asset and links it to the folder structure implied in the path name.
|
List<String> |
addDataFolderToCatalog(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
FileFolderProperties fileFolderProperties,
String connectorProviderName)
Creates a new folder asset that is identified as a data asset.
|
void |
attachDataFileAssetToFolder(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String folderGUID,
String fileGUID)
Link an existing file asset to a folder.
|
void |
attachTopLevelFolder(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String folderGUID)
Links a folder to a file system.
|
List<String> |
createNestedFolders(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String pathName)
Creates a new folder asset for each element in the pathName.
|
List<String> |
createNestedFolders(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String parentFolderGUID,
String pathName)
Creates a new folder asset for each element in the pathName that is linked from the parent entity.
|
void |
detachDataFileAssetFromFolder(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String folderGUID,
String fileGUID)
Remove a link between a file asset and a folder.
|
void |
detachTopLevelFolder(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
String folderGUID)
Removed the link between a folder and a file system.
|
DataFileElement |
getFileByGUID(String userId,
String fileGUID)
Retrieve a FolderProperties asset by its unique identifier (GUID).
|
DataFileElement |
getFileByPathName(String userId,
String pathName)
Retrieve a folder by its fully qualified path name.
|
FileFolderElement |
getFolderByGUID(String userId,
String folderGUID)
Retrieve a FolderProperties asset by its unique identifier (GUID).
|
FileFolderElement |
getFolderByPathName(String userId,
String pathName)
Retrieve a folder by its fully qualified path name.
|
List<DataFileElement> |
getFolderFiles(String userId,
String folderGUID,
int startFrom,
int pageSize)
Get the data files inside a folder - both those that are nested and those that are linked.
|
List<FileFolderElement> |
getNestedFolders(String userId,
String parentFolderGUID,
int startFrom,
int pageSize)
Return the list of folders nested inside a folder.
|
List<DataFileElement> |
getTopLevelDataFiles(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
int startFrom,
int pageSize)
Return the list of folders nested inside a folder.
|
List<FileFolderElement> |
getTopLevelFolders(String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName,
int startFrom,
int pageSize)
Return the list of folders linked to the file server capability.
|
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversauditLog - logging destinationInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsauditLog - logging destinationInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversuserId - caller's userId embedded in all HTTP requestspassword - caller's userId embedded in all HTTP requestsInvalidParameterException - there is a problem creating the client-side components to issue any
REST API calls.public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize, AuditLog auditLog) throws InvalidParameterException
serverName - name of the server to connect toserverPlatformURLRoot - the network address of the server running the OMAS REST serversrestClient - pre-initialized REST clientmaxPageSize - pre-initialized parameter limitauditLog - logging destinationInvalidParameterException - there is a problem with the information about the remote OMASpublic List<String> createNestedFolders(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
createNestedFolders in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerpathName - pathname of the folder (or folders)InvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<String> createNestedFolders(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String parentFolderGUID, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
createNestedFolders in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerparentFolderGUID - root object to connect the folder topathName - pathname of the folder (or folders)InvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void attachTopLevelFolder(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
attachTopLevelFolder in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerfolderGUID - unique identifier of the folder in the catalogInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void detachTopLevelFolder(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
detachTopLevelFolder in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerfolderGUID - unique identifier of the folder in the catalogInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<String> addDataFileToCatalog(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, DataFileProperties dataFileProperties, String connectorProviderName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFileToCatalog in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerdataFileProperties - details of the data file to add to the catalog as an assetconnectorProviderName - class name of connector provider for connector to access this assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<String> addDataFolderToCatalog(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, FileFolderProperties fileFolderProperties, String connectorProviderName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFolderToCatalog in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerfileFolderProperties - properties to describe the folder propertiesconnectorProviderName - class name of connector provider for connector to access this assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void attachDataFileAssetToFolder(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String folderGUID, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
attachDataFileAssetToFolder in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerfolderGUID - unique identifier of the folderfileGUID - unique identifier of the fileInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void detachDataFileAssetFromFolder(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, String folderGUID, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
detachDataFileAssetFromFolder in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerfolderGUID - unique identifier of the folderfileGUID - unique identifier of the fileInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic FileFolderElement getFolderByGUID(String userId, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getFolderByGUID in interface FilesAndFoldersInterfaceuserId - calling userfolderGUID - unique identifier used to locate the folderInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic FileFolderElement getFolderByPathName(String userId, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getFolderByPathName in interface FilesAndFoldersInterfaceuserId - calling userpathName - path nameInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<FileFolderElement> getTopLevelFolders(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getTopLevelFolders in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerstartFrom - starting point in the listpageSize - maximum number of resultsInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<FileFolderElement> getNestedFolders(String userId, String parentFolderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNestedFolders in interface FilesAndFoldersInterfaceuserId - calling userparentFolderGUID - unique identifier of the parent folder or file systemstartFrom - starting point in the listpageSize - maximum number of resultsInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<DataFileElement> getTopLevelDataFiles(String userId, String fileServerCapabilityGUID, String fileServerCapabilityName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getTopLevelDataFiles in interface FilesAndFoldersInterfaceuserId - calling userfileServerCapabilityGUID - unique identifier of the software server capability representing the file system or file managerfileServerCapabilityName - unique name of the software server capability representing the file system or file managerstartFrom - starting point in the listpageSize - maximum number of resultsInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<DataFileElement> getFolderFiles(String userId, String folderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getFolderFiles in interface FilesAndFoldersInterfaceuserId - calling userfolderGUID - unique identifier of the parent folderstartFrom - starting point in the listpageSize - maximum number of resultsInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic DataFileElement getFileByGUID(String userId, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getFileByGUID in interface FilesAndFoldersInterfaceuserId - calling userfileGUID - unique identifier used to locate the folderInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic DataFileElement getFileByPathName(String userId, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getFileByPathName in interface FilesAndFoldersInterfaceuserId - calling userpathName - path nameInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problemCopyright © 2018–2020 ODPi. All rights reserved.