public class FilesIntegratorContext extends Object
| Constructor and Description |
|---|
FilesIntegratorContext(FilesAndFoldersClient client,
DataManagerEventClient eventClient,
String userId,
String fileServerCapabilityGUID,
String fileServerCapabilityName)
Create a new client with no authentication embedded in the HTTP request.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
addDataFileToCatalog(DataFileProperties dataFileProperties,
String connectorProviderName)
Creates a new file asset and links it to the folder structure implied in the path name.
|
List<String> |
addDataFileToCatalogFromTemplate(String templateGUID,
TemplateProperties templateProperties)
Add an asset description a file based on the content of a template object.
|
List<String> |
addDataFolderToCatalog(FileFolderProperties fileFolderProperties,
String connectorProviderName)
Creates a new folder asset that is identified as a data asset.
|
List<String> |
addDataFolderToCatalogFromTemplate(String templateGUID,
TemplateProperties templateProperties)
Add an asset description a file based on the content of a template object.
|
void |
archiveDataFileInCatalog(String dataFileGUID,
ArchiveProperties archiveProperties)
Mark the file asset description in the catalog as archived.
|
void |
archiveDataFolderInCatalog(String dataFolderGUID,
ArchiveProperties archiveProperties)
Mark the data folder asset description in the catalog as archived.
|
void |
attachDataFileAssetToFolder(String folderGUID,
String fileGUID)
Link an existing file asset to a folder.
|
void |
attachTopLevelFolder(String fileSystemGUID,
String folderGUID)
Links a folder to a file system.
|
List<String> |
createNestedFolders(String parentGUID,
String pathName)
Creates a new folder asset for each element in the pathName.
|
void |
deleteDataFileFromCatalog(String dataFileGUID,
String fullPathname)
Remove the file asset description from the catalog.
|
void |
detachDataFileAssetFromFolder(String folderGUID,
String fileGUID)
Remove a link between a file asset and a folder.
|
void |
detachTopLevelFolder(String fileSystemGUID,
String folderGUID)
Removed the link between a folder and a file system.
|
DataFileElement |
getFileByGUID(String fileGUID)
Retrieve a FolderProperties asset by its unique identifier (GUID).
|
DataFileElement |
getFileByPathName(String pathName)
Retrieve a folder by its fully qualified path name.
|
FileFolderElement |
getFolderByGUID(String folderGUID)
Retrieve a FolderProperties asset by its unique identifier (GUID).
|
FileFolderElement |
getFolderByPathName(String pathName)
Retrieve a folder by its fully qualified path name.
|
List<DataFileElement> |
getFolderFiles(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 parentFolderGUID,
int startFrom,
int pageSize)
Return the list of folders nested inside a folder.
|
List<DataFileElement> |
getTopLevelDataFiles(String fileSystemGUID,
int startFrom,
int pageSize)
Return the list of folders nested inside a folder.
|
List<FileFolderElement> |
getTopLevelFolders(String fileSystemGUID,
int startFrom,
int pageSize)
Return the list of folders linked to the file server capability.
|
void |
registerListener(DataManagerEventListener listener)
Register a listener object that will be passed each of the events published by
the Data Manager OMAS.
|
void |
updateDataFileInCatalog(String dataFileGUID,
boolean isMergeUpdate,
DataFileProperties dataFileProperties)
Update the file asset description in the catalog.
|
void |
updateDataFolderInCatalog(String dataFolderGUID,
boolean isMergeUpdate,
FileFolderProperties fileFolderProperties)
Update the data folder asset description in the catalog.
|
public FilesIntegratorContext(FilesAndFoldersClient client, DataManagerEventClient eventClient, String userId, String fileServerCapabilityGUID, String fileServerCapabilityName)
client - client to map request toeventClient - client to register for eventsuserId - integration daemon's userIdfileServerCapabilityGUID - unique identifier of the software server capability for the file manager (or null)fileServerCapabilityName - unique name of the software server capability for the file manager (or null)public void registerListener(DataManagerEventListener listener) throws InvalidParameterException, ConnectionCheckedException, ConnectorCheckedException, PropertyServerException, UserNotAuthorizedException
listener - listener objectInvalidParameterException - one of the parameters is null or invalid.ConnectionCheckedException - there are errors in the configuration of the connection which is preventing
the creation of a connector.ConnectorCheckedException - there are errors in the initialization of the connector.PropertyServerException - there is a problem retrieving information from the property server(s).UserNotAuthorizedException - the requesting user is not authorized to issue this request.public List<String> createNestedFolders(String parentGUID, String pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
parentGUID - unique identifier of root object to connect the folder to (fileSystemGUID or folderGUID)pathName - 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 fileSystemGUID, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileSystemGUID - unique identifier of the file systemfolderGUID - 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 fileSystemGUID, String folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileSystemGUID - unique identifier of the file systemfolderGUID - 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(DataFileProperties dataFileProperties, String connectorProviderName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFileProperties - 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> addDataFileToCatalogFromTemplate(String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
templateGUID - unique identifier of the file asset to copytemplateProperties - override properties for the assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateDataFileInCatalog(String dataFileGUID, boolean isMergeUpdate, DataFileProperties dataFileProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFileGUID - unique identifier of the data file assetisMergeUpdate - should the supplied properties completely override the existing properties or augment them?dataFileProperties - properties for the assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void archiveDataFileInCatalog(String dataFileGUID, ArchiveProperties archiveProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFileGUID - unique identifier of the data file assetarchiveProperties - properties to help locate the archive copyInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void deleteDataFileFromCatalog(String dataFileGUID, String fullPathname) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFileGUID - unique identifier of the data file assetfullPathname - unique path and file name for fileInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<String> addDataFolderToCatalog(FileFolderProperties fileFolderProperties, String connectorProviderName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileFolderProperties - 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 List<String> addDataFolderToCatalogFromTemplate(String templateGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
templateGUID - unique identifier of the file asset to copytemplateProperties - override properties for the assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void updateDataFolderInCatalog(String dataFolderGUID, boolean isMergeUpdate, FileFolderProperties fileFolderProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFolderGUID - unique identifier of the data folder assetisMergeUpdate - should the supplied properties completely override the existing properties or augment them?fileFolderProperties - properties for the assetInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void archiveDataFolderInCatalog(String dataFolderGUID, ArchiveProperties archiveProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
dataFolderGUID - unique identifier of the data folder assetarchiveProperties - properties to help locate the archive copyInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic void attachDataFileAssetToFolder(String folderGUID, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
folderGUID - 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 folderGUID, String fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
folderGUID - 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 folderGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
folderGUID - 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 pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
pathName - path nameInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problempublic List<FileFolderElement> getTopLevelFolders(String fileSystemGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileSystemGUID - unique identifier of the software server capability representing the 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<FileFolderElement> getNestedFolders(String parentFolderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
parentFolderGUID - 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 fileSystemGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileSystemGUID - unique identifier of the software server capability representing the 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> getFolderFiles(String folderGUID, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
folderGUID - 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 fileGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
fileGUID - 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 pathName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
pathName - path nameInvalidParameterException - one of the parameters is null or invalidPropertyServerException - problem accessing property serverUserNotAuthorizedException - security access problemCopyright © 2018–2021 LF AI & Data Foundation. All rights reserved.