Class FilesAndFoldersClient
java.lang.Object
org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
org.odpi.openmetadata.accessservices.datamanager.client.FilesAndFoldersClient
- All Implemented Interfaces:
FilesAndFoldersInterface
,SchemaManagerInterface
FilesAndFoldersClient is the client for managing the creation of files and folder assets.
-
Constructor Summary
ConstructorDescriptionFilesAndFoldersClient
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.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.FilesAndFoldersClient
(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) Create a new client that is to be used within an OMAG Server.FilesAndFoldersClient
(String serverName, String serverPlatformURLRoot, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptionaddDataFileToCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, DataFileProperties dataFileProperties, String connectorProviderName) Creates a new file asset and links it to the folder structure implied in the path name.addDataFileToCatalogFromTemplate
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String templateGUID, TemplateProperties templateProperties) Add an asset description a file based on the content of a template object.addDataFolderToCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, FileFolderProperties fileFolderProperties, String connectorProviderName) Creates a new folder asset that is identified as a data asset.addDataFolderToCatalogFromTemplate
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String templateGUID, TemplateProperties templateProperties) Add an asset description a file based on the content of a template object.void
archiveDataFileInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, ArchiveProperties archiveProperties) Mark the file asset description in the catalog as archived.void
archiveDataFolderInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, ArchiveProperties archiveProperties) Mark the data folder asset description in the catalog as archived.void
attachDataFileAssetToFolder
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, String fileGUID) Link an existing file asset to a folder.void
attachTopLevelFolder
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String fileSystemGUID, String folderGUID) Links a folder to a file system.createNestedFolders
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String parentGUID, String pathName) Creates a new folder asset for each element in the pathName.void
deleteDataFileFromCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, String fullPathname) Remove the file asset description from the catalog.void
deleteDataFolderFromCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, String fullPathname) Remove the data folder asset description from the catalog.void
detachDataFileAssetFromFolder
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, String fileGUID) Remove a link between a file asset and a folder.void
detachTopLevelFolder
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String fileSystemGUID, String folderGUID) Removed the link between a folder and a file system.findFilesByPathName
(String userId, String pathName, int startFrom, int pageSize) Retrieve data files by the supplied wildcard name.getFileByGUID
(String userId, String fileGUID) Retrieve a FileFolderProperties asset by its unique identifier (GUID).getFileByPathName
(String userId, String pathName) Retrieve a folder by its fully qualified path name.getFilesByPathName
(String userId, String pathName, int startFrom, int pageSize) Retrieve data files by the supplied wildcard name.getFolderByGUID
(String userId, String folderGUID) Retrieve a FileFolderProperties asset by its unique identifier (GUID).getFolderByPathName
(String userId, String pathName) Retrieve a folder by its fully qualified path name.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.getNestedFolders
(String userId, String parentFolderGUID, int startFrom, int pageSize) Return the list of folders nested inside a folder.getTopLevelDataFiles
(String userId, String fileSystemGUID, int startFrom, int pageSize) Return the list of folders nested inside a folder.getTopLevelFolders
(String userId, String fileSystemGUID, int startFrom, int pageSize) Return the list of folders linked to the file server capability.void
moveDataFileInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, String fileGUID) 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).void
moveDataFolderInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, 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).void
updateDataFileInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, boolean isMergeUpdate, DataFileProperties dataFileProperties) Update the file asset description in the catalog.void
updateDataFolderInCatalog
(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, boolean isMergeUpdate, FileFolderProperties fileFolderProperties) Update the data folder asset description in the catalog.Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.SchemaManagerClient
clearCalculatedValue, clearQueryTargetRelationship, clearSchemaElementRelationship, clearSchemaTypes, createEnumSchemaType, createLiteralSchemaType, createMapSchemaType, createPrimitiveSchemaType, createSchemaAttribute, createSchemaAttributeFromTemplate, createSchemaTypeChoice, createSchemaTypeFromTemplate, createStructSchemaType, findSchemaAttributes, findSchemaType, findValidValueSet, getNestedAttributes, getSchemaAttributeByGUID, getSchemaAttributesByName, getSchemaTypeByGUID, getSchemaTypeByName, getSchemaTypeForElement, getSchemaTypeParent, getValidValueSetByName, removeSchemaAttribute, removeSchemaType, setupCalculatedValue, setupQueryTargetRelationship, setupSchemaElementRelationship, setupSchemaType, updateQueryTargetRelationship, updateSchemaAttribute, updateSchemaType
Methods inherited from class org.odpi.openmetadata.accessservices.datamanager.client.DataManagerBaseClient
removeReferenceable
-
Constructor Details
-
FilesAndFoldersClient
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
FilesAndFoldersClient
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
FilesAndFoldersClient
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
FilesAndFoldersClient
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
FilesAndFoldersClient
public FilesAndFoldersClient(String serverName, String serverPlatformURLRoot, DataManagerRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that is to be used within an OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- pre-initialized REST clientmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- there is a problem with the information about the remote OMAS
-
-
Method Details
-
createNestedFolders
public List<String> createNestedFolders(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, 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".- Specified by:
createNestedFolders
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullparentGUID
- unique identifier of root object to connect the folder to (fileSystemGUID or folderGUID)pathName
- 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
-
attachTopLevelFolder
public void attachTopLevelFolder(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String fileSystemGUID, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Links a folder to a file system. The folder is not changed.- Specified by:
attachTopLevelFolder
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfileSystemGUID
- unique identifier of the file systemfolderGUID
- 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
-
detachTopLevelFolder
public void detachTopLevelFolder(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String fileSystemGUID, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Removed the link between a folder and a file system.- Specified by:
detachTopLevelFolder
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfileSystemGUID
- unique identifier of the file systemfolderGUID
- 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
-
addDataFileToCatalog
public List<String> addDataFileToCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, DataFileProperties dataFileProperties, String connectorProviderName) 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".- Specified by:
addDataFileToCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFileProperties
- details of the data file to add to the catalog as an assetconnectorProviderName
- class name of connector provider for connector to access this asset- 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
-
addDataFileToCatalogFromTemplate
public List<String> addDataFileToCatalogFromTemplate(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add an asset description a file based on the content of a template object. Link this new asset 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".- Specified by:
addDataFileToCatalogFromTemplate
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulltemplateGUID
- unique identifier of the file asset to copytemplateProperties
- override properties for the asset- 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
-
updateDataFileInCatalog
public void updateDataFileInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, boolean isMergeUpdate, DataFileProperties dataFileProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the file asset description in the catalog.- Specified by:
updateDataFileInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFileGUID
- unique identifier of the data file assetisMergeUpdate
- should the supplied properties completely override the existing properties or augment them?dataFileProperties
- properties for the asset- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
archiveDataFileInCatalog
public void archiveDataFileInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, ArchiveProperties archiveProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Mark the file asset description in the catalog as archived.- Specified by:
archiveDataFileInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFileGUID
- unique identifier of the data file assetarchiveProperties
- properties to help locate the archive copy- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteDataFileFromCatalog
public void deleteDataFileFromCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFileGUID, String fullPathname) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the file asset description from the catalog.- Specified by:
deleteDataFileFromCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFileGUID
- unique identifier of the data file assetfullPathname
- unique path and file name for file (optional)- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
addDataFolderToCatalog
public List<String> addDataFolderToCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, FileFolderProperties fileFolderProperties, String connectorProviderName) 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".- Specified by:
addDataFolderToCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfileFolderProperties
- properties to describe the folder propertiesconnectorProviderName
- class name of connector provider for connector to access this asset- 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
-
addDataFolderToCatalogFromTemplate
public List<String> addDataFolderToCatalogFromTemplate(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add an asset description a file based on the content of a template object. Link this new asset 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".- Specified by:
addDataFolderToCatalogFromTemplate
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulltemplateGUID
- unique identifier of the file asset to copytemplateProperties
- override properties for the asset- 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
-
updateDataFolderInCatalog
public void updateDataFolderInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, boolean isMergeUpdate, FileFolderProperties fileFolderProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the data folder asset description in the catalog.- Specified by:
updateDataFolderInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFolderGUID
- unique identifier of the data folder assetisMergeUpdate
- should the supplied properties completely override the existing properties or augment them?fileFolderProperties
- properties for the asset- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
archiveDataFolderInCatalog
public void archiveDataFolderInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, ArchiveProperties archiveProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Mark the data folder asset description in the catalog as archived.- Specified by:
archiveDataFolderInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFolderGUID
- unique identifier of the data folder assetarchiveProperties
- properties to help locate the archive copy- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteDataFolderFromCatalog
public void deleteDataFolderFromCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String dataFolderGUID, String fullPathname) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the data folder asset description from the catalog.- Specified by:
deleteDataFolderFromCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling user (assumed to be the owner)fileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nulldataFolderGUID
- unique identifier of the data folder assetfullPathname
- unique path and file name for file (optional)- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
attachDataFileAssetToFolder
public void attachDataFileAssetToFolder(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, 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.- Specified by:
attachDataFileAssetToFolder
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfolderGUID
- 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
public void detachDataFileAssetFromFolder(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, 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.- Specified by:
detachDataFileAssetFromFolder
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfolderGUID
- 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
public void moveDataFileInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException 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). Similarly to the endpoint in the connection object.- Specified by:
moveDataFileInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfolderGUID
- 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
-
moveDataFolderInCatalog
public void moveDataFolderInCatalog(String userId, String fileManagerCapabilityGUID, String fileManagerCapabilityName, String folderGUID, 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.- Specified by:
moveDataFolderInCatalog
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileManagerCapabilityGUID
- unique identifier of the software server capability representing an owning external file manager or nullfileManagerCapabilityName
- unique name of the software server capability representing an owning external file manager or nullfolderGUID
- unique identifier of the folderdataFolderGUID
- unique identifier of the data folder to move- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderByGUID
public FileFolderElement getFolderByGUID(String userId, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve a FileFolderProperties asset by its unique identifier (GUID).- Specified by:
getFolderByGUID
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfolderGUID
- unique identifier used to locate the folder- Returns:
- FileFolder properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderByPathName
public FileFolderElement getFolderByPathName(String userId, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve a folder by its fully qualified path name.- Specified by:
getFolderByPathName
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userpathName
- path name- Returns:
- FileFolderProperties properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getTopLevelFolders
public List<FileFolderElement> getTopLevelFolders(String userId, String fileSystemGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of folders linked to the file server capability.- Specified by:
getTopLevelFolders
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileSystemGUID
- unique identifier of the software server capability representing the file systemstartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of folder properties (null means no nested folders)
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getNestedFolders
public List<FileFolderElement> getNestedFolders(String userId, String parentFolderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of folders nested inside a folder.- Specified by:
getNestedFolders
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userparentFolderGUID
- unique identifier of the parent folder or file systemstartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of folder properties (null means no nested folders)
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getTopLevelDataFiles
public List<DataFileElement> getTopLevelDataFiles(String userId, String fileSystemGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return the list of folders nested inside a folder.- Specified by:
getTopLevelDataFiles
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileSystemGUID
- unique identifier of the software server capability representing the file systemstartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of file properties (null means no top-level files)
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFolderFiles
public List<DataFileElement> getFolderFiles(String userId, String folderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Get the data files inside a folder - both those that are nested and those that are linked.- Specified by:
getFolderFiles
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfolderGUID
- unique identifier of the parent folderstartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of file properties (null means no files)
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFileByGUID
public DataFileElement getFileByGUID(String userId, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve a FileFolderProperties asset by its unique identifier (GUID).- Specified by:
getFileByGUID
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userfileGUID
- unique identifier used to locate the folder- Returns:
- FileFolder properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFileByPathName
public DataFileElement getFileByPathName(String userId, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve a folder by its fully qualified path name.- Specified by:
getFileByPathName
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userpathName
- path name- Returns:
- File properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getFilesByPathName
public List<DataFileElement> getFilesByPathName(String userId, String pathName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve data files by the supplied wildcard name. The wildcard is specified using regular expressions (RegEx) and the method matches on the pathName property.- Specified by:
getFilesByPathName
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userpathName
- path namestartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of matching file properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
findFilesByPathName
public List<DataFileElement> findFilesByPathName(String userId, String pathName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve data files by the supplied wildcard name. The wildcard is specified using regular expressions (RegEx) and the method matches on the qualifiedName, name and pathName property.- Specified by:
findFilesByPathName
in interfaceFilesAndFoldersInterface
- Parameters:
userId
- calling userpathName
- path namestartFrom
- starting point in the listpageSize
- maximum number of results- Returns:
- list of matching file properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalidPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-