Class FilesAndFoldersHandler<FILESYSTEM,FOLDER,FILE>  
java.lang.Object
org.odpi.openmetadata.commonservices.generichandlers.FilesAndFoldersHandler<FILESYSTEM,FOLDER,FILE>  
- Type Parameters:
 FILESYSTEM- the class representing a file systemFOLDER- the class representing a folder in the file systemFILE- the class representing a file in the file system
FilesAndFoldersHandler provides the support for managing catalog entries about files and folders.
- 
Constructor Summary
ConstructorsConstructorDescriptionFilesAndFoldersHandler(OpenMetadataAPIGenericConverter<FILESYSTEM> fileSystemConverter, Class<FILESYSTEM> fileSystemBeanClass, OpenMetadataAPIGenericConverter<FOLDER> folderConverter, Class<FOLDER> folderBeanClass, OpenMetadataAPIGenericConverter<FILE> fileConverter, Class<FILE> fileBeanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddFileAssetPath(String userId, String externalSourceGUID, String externalSourceName, String fileAssetGUID, String fileAssetParameterName, String fileAssetTypeName, String pathName, String pathNameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Takes a new file asset and links it to the folder structure implied in the path name.createFolderStructureInCatalog(String userId, String externalSourceGUID, String externalSourceName, String connectToGUID, String fileSystemName, List<String> folderNames, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) Creates a new folder asset for each element in the pathName that is linked from the anchor entity. 
- 
Constructor Details
- 
FilesAndFoldersHandler
public FilesAndFoldersHandler(OpenMetadataAPIGenericConverter<FILESYSTEM> fileSystemConverter, Class<FILESYSTEM> fileSystemBeanClass, OpenMetadataAPIGenericConverter<FOLDER> folderConverter, Class<FOLDER> folderBeanClass, OpenMetadataAPIGenericConverter<FILE> fileConverter, Class<FILE> fileBeanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog) Construct the handler information needed to interact with the repository services- Parameters:
 fileSystemConverter- specific converter for the FILESYSTEM bean classfileSystemBeanClass- name of bean class that is represented by the generic class FILESYSTEMfolderConverter- specific converter for the FOLDER bean classfolderBeanClass- name of bean class that is represented by the generic class FOLDERfileConverter- specific converter for the FILE bean classfileBeanClass- name of bean class that is represented by the generic class FILEserviceName- name of this serviceserverName- name of the local serverinvalidParameterHandler- handler for managing parameter errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- provides utilities for manipulating the repository services objectslocalServerUserId- userId for this serversecurityVerifier- open metadata security services verifiersupportedZones- list of zones that the access service is allowed to serve Asset instances from.defaultZones- list of zones that the access service should set in all new Asset instances.publishZones- list of zones that the access service sets up in published Asset instances.auditLog- destination for audit log events.
 
 - 
 - 
Method Details
- 
createFolderStructureInCatalog
public List<String> createFolderStructureInCatalog(String userId, String externalSourceGUID, String externalSourceName, String connectToGUID, String fileSystemName, List<String> folderNames, Date effectiveFrom, Date effectiveTo, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Creates a new folder asset for each element in the pathName that is linked from the anchor 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 userexternalSourceGUID- guid of the software capability entity that represented the external source - null for localexternalSourceName- name of the software capability entity that represented the external sourceconnectToGUID- root object to connect the folder tofileSystemName- name of the root of the file system (can be null)folderNames- list of the folder nameseffectiveFrom- starting time for this relationship (null for all time)effectiveTo- ending time for this relationship (null for all time)forLineage- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing- the request is for duplicate processing and so must not deduplicateeffectiveTime- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName- calling method- 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
 - 
addFileAssetPath
public void addFileAssetPath(String userId, String externalSourceGUID, String externalSourceName, String fileAssetGUID, String fileAssetParameterName, String fileAssetTypeName, String pathName, String pathNameParameterName, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Takes 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". Care is taken to handle the case where the file system and file folders exist in the catalog but are not visible through the user's zones.- Parameters:
 userId- calling userexternalSourceGUID- guid of the software capability entity that represented the external source - null for localexternalSourceName- name of the software capability entity that represented the external sourcefileAssetGUID- unique identifier of file assetfileAssetParameterName- parameter providing the fileAssetGUIDfileAssetTypeName- name of the type of file or folderpathName- pathname of the filepathNameParameterName- parameter providing the pathNameforLineage- the request is to support lineage retrieval this means entities with the Memento classification can be returnedforDuplicateProcessing- the request is for duplicate processing and so must not deduplicateeffectiveTime- the time that the retrieved elements must be effective for (null for any time, new Date() for now)methodName- calling method- Throws:
 InvalidParameterException- one of the parameters is null or invalidPropertyServerException- problem accessing property serverUserNotAuthorizedException- security access problem
 
 -