Class FilesAndFoldersHandler<FILESYSTEM,​FOLDER,​FILE>

  • Type Parameters:
    FILESYSTEM - the class representing a file system
    FOLDER - the class representing a folder in the file system
    FILE - the class representing a file in the file system

    public class FilesAndFoldersHandler<FILESYSTEM,​FOLDER,​FILE>
    extends Object
    FilesAndFoldersHandler provides the support for managing catalog entries about files and folders.
    • Constructor Detail

      • 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 class
        fileSystemBeanClass - name of bean class that is represented by the generic class FILESYSTEM
        folderConverter - specific converter for the FOLDER bean class
        folderBeanClass - name of bean class that is represented by the generic class FOLDER
        fileConverter - specific converter for the FILE bean class
        fileBeanClass - name of bean class that is represented by the generic class FILE
        serviceName - name of this service
        serverName - name of the local server
        invalidParameterHandler - handler for managing parameter errors
        repositoryHandler - manages calls to the repository services
        repositoryHelper - provides utilities for manipulating the repository services objects
        localServerUserId - userId for this server
        securityVerifier - open metadata security services verifier
        supportedZones - 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 Detail

      • createFileSystem

        public String createFileSystem​(String userId,
                                       String externalSourceGUID,
                                       String externalSourceName,
                                       String uniqueName,
                                       String displayName,
                                       String description,
                                       String type,
                                       String version,
                                       String patchLevel,
                                       String source,
                                       String format,
                                       String encryption,
                                       Map<String,​String> additionalProperties,
                                       Map<String,​String> vendorProperties,
                                       String methodName)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Files live on a file system. This method creates a top level anchor for a file system. It has its own method because ot the extra properties in the FileSystem classification
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        uniqueName - qualified name for the file system
        displayName - short display name
        description - description of the file system
        type - type of file system
        version - version of file system
        patchLevel - patchLevel of software supporting the file system
        source - supplier of the software for this file system
        format - format of files on this file system
        encryption - encryption type - null for unencrypted
        additionalProperties - additional properties
        vendorProperties - properties about the vendor and/or their product
        methodName - calling method
        Returns:
        unique identifier for the file system
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • createFolderStructureInCatalog

        public List<String> createFolderStructureInCatalog​(String userId,
                                                           String externalSourceGUID,
                                                           String externalSourceName,
                                                           String connectToGUID,
                                                           String pathName,
                                                           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 user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        connectToGUID - root object to connect the folder to
        pathName - pathname of the folder (or folders)
        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 invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • attachFolderToFileSystem

        public void attachFolderToFileSystem​(String userId,
                                             String externalSourceGUID,
                                             String externalSourceName,
                                             String fileSystemGUID,
                                             String fileSystemGUIDParameterName,
                                             String folderGUID,
                                             String folderGUIDParameterName,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Links a folder to a file system. The folder is not changed.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        fileSystemGUID - unique identifier of the file system in the catalog
        fileSystemGUIDParameterName - parameter name for the fileSystemGUID
        folderGUID - unique identifier of the folder in the catalog
        folderGUIDParameterName - parameter name for the folderGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • detachFolderFromFileSystem

        public void detachFolderFromFileSystem​(String userId,
                                               String externalSourceGUID,
                                               String externalSourceName,
                                               String fileSystemGUID,
                                               String fileSystemGUIDParameterName,
                                               String folderGUID,
                                               String folderGUIDParameterName,
                                               String methodName)
                                        throws InvalidParameterException,
                                               UserNotAuthorizedException,
                                               PropertyServerException
        Removed the link between a folder and a file system.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        fileSystemGUID - unique identifier of the file system in the catalog
        fileSystemGUIDParameterName - parameter name for the fileSystemGUID
        folderGUID - unique identifier of the folder in the catalog
        folderGUIDParameterName - parameter name for the folderGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • attachDataFileAssetToFolder

        public void attachDataFileAssetToFolder​(String userId,
                                                String externalSourceGUID,
                                                String externalSourceName,
                                                String folderGUID,
                                                String folderGUIDParameterName,
                                                String fileGUID,
                                                String fileGUIDParameterName,
                                                String methodName)
                                         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.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        folderGUID - unique identifier of the folder
        folderGUIDParameterName - parameter providing folderGUID
        fileGUID - unique identifier of the file
        fileGUIDParameterName - parameter providing fileGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • detachDataFileAssetFromFolder

        public void detachDataFileAssetFromFolder​(String userId,
                                                  String externalSourceGUID,
                                                  String externalSourceName,
                                                  String folderGUID,
                                                  String folderGUIDParameterName,
                                                  String fileGUID,
                                                  String fileGUIDParameterName,
                                                  String methodName)
                                           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.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        folderGUID - unique identifier of the folder
        folderGUIDParameterName - parameter providing folderGUID
        fileGUID - unique identifier of the file
        fileGUIDParameterName - parameter providing fileGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • moveDataFileInCatalog

        public void moveDataFileInCatalog​(String userId,
                                          String externalSourceGUID,
                                          String externalSourceName,
                                          String newParentFolder,
                                          String newParentFolderGUIDParameterName,
                                          String fileGUID,
                                          String fileGUIDParameterName,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Move a file from its current parent folder to a new parent folder - this changes the file's qualified name but not its unique identifier (guid). Also the the endpoint in the connection object.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        newParentFolder - unique identifier of the new parent folder
        newParentFolderGUIDParameterName - parameter providing newParentFolder
        fileGUID - unique identifier of the file
        fileGUIDParameterName - parameter providing fileGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • moveDataFolderInCatalog

        public void moveDataFolderInCatalog​(String userId,
                                            String externalSourceGUID,
                                            String externalSourceName,
                                            String newParentFolderGUID,
                                            String newParentFolderGUIDParameterName,
                                            String movingFolderGUID,
                                            String movingFolderGUIDParameterName,
                                            String methodName)
                                     throws InvalidParameterException,
                                            UserNotAuthorizedException,
                                            PropertyServerException
        Move a file from its current parent folder to a new parent folder - this changes the file's qualified name but not its unique identifier (guid). Also the the endpoint in the connection object.
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        newParentFolderGUID - new parent folder
        newParentFolderGUIDParameterName - name of parameter supplying newParentFolderGUID
        movingFolderGUID - unique identifier of the data folder to move
        movingFolderGUIDParameterName - name of parameter supplying movingFolderGUID
        methodName - calling method
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addDataFileAssetToCatalog

        public List<String> addDataFileAssetToCatalog​(String userId,
                                                      String externalSourceGUID,
                                                      String externalSourceName,
                                                      String displayName,
                                                      String description,
                                                      String pathName,
                                                      String methodName)
                                               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".
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        displayName - display name for the folder in the catalog
        description - description of the folder in the catalog
        pathName - pathname of the file
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addDataFolderAssetToCatalog

        public List<String> addDataFolderAssetToCatalog​(String userId,
                                                        String externalSourceGUID,
                                                        String externalSourceName,
                                                        String pathName,
                                                        String displayName,
                                                        String description,
                                                        Date createTime,
                                                        Date modifiedTime,
                                                        String encodingType,
                                                        String encodingLanguage,
                                                        String encodingDescription,
                                                        Map<String,​String> encodingProperties,
                                                        Map<String,​String> additionalProperties,
                                                        String connectorProviderClassName,
                                                        String typeName,
                                                        Map<String,​Object> extendedProperties,
                                                        String methodName)
                                                 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".
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        pathName - pathname of the file
        displayName - display name for the folder in the catalog
        description - description of the folder in the catalog
        createTime - time that the folder was created
        modifiedTime - the time of the latest change to the file
        encodingType - the type of encoding used on the file
        encodingLanguage - the language used within the file
        encodingDescription - the description of the file
        encodingProperties - the properties used to drive the encoding
        additionalProperties - additional properties for the data folder
        connectorProviderClassName - name of the class for the connector's provider - null means used standard connector provider for asset type
        typeName - type name of folder
        extendedProperties - extended properties supplied by the caller
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addDataFolderAssetToCatalog

        public List<String> addDataFolderAssetToCatalog​(String userId,
                                                        String externalSourceGUID,
                                                        String externalSourceName,
                                                        String pathName,
                                                        String displayName,
                                                        String description,
                                                        String methodName)
                                                 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".
        Parameters:
        userId - calling user
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        displayName - display name for the folder in the catalog
        description - description of the folder in the catalog
        pathName - pathname of the file
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addFileToCatalog

        public List<String> addFileToCatalog​(String userId,
                                             String externalSourceGUID,
                                             String externalSourceName,
                                             String qualifiedName,
                                             String displayName,
                                             String description,
                                             String pathName,
                                             Date createTime,
                                             Date modifiedTime,
                                             String encodingType,
                                             String encodingLanguage,
                                             String encodingDescription,
                                             Map<String,​String> encodingProperties,
                                             String suppliedFileType,
                                             Map<String,​String> additionalProperties,
                                             String connectorProviderClassName,
                                             String typeName,
                                             Map<String,​Object> extendedProperties,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Add a simple asset description linked to a connection object for a file.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        qualifiedName - unique name for the file - typically path and file name
        displayName - short display name for file (defaults to the file name without the path)
        description - description of the file
        pathName - the fully qualified physical location of the data store - default is qualified name
        createTime - the time that the file was created
        modifiedTime - the time of the latest change to the file
        encodingType - the type of encoding used on the file
        encodingLanguage - the language used within the file
        encodingDescription - the description of the file
        encodingProperties - the properties used to drive the encoding
        suppliedFileType - the type of file override (default is to use the file extension)
        additionalProperties - additional properties from the user
        connectorProviderClassName - name of the class for the connector's provider - null means used standard connector provider for asset type
        typeName - name of the type (default is File)
        extendedProperties - any additional properties for the file type
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addFileToCatalogFromTemplate

        public List<String> addFileToCatalogFromTemplate​(String userId,
                                                         String externalSourceGUID,
                                                         String externalSourceName,
                                                         String templateGUID,
                                                         String fullPath,
                                                         String displayName,
                                                         String description,
                                                         String methodName)
                                                  throws InvalidParameterException,
                                                         UserNotAuthorizedException,
                                                         PropertyServerException
        Create a new file asset based on an existing asset but with the supplied path name, display name and description.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        templateGUID - unique identifier of the asset description to copy
        fullPath - unique path and file name for file
        displayName - short display name for file (defaults to the file name without the path)
        description - description of the file
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addFolderToCatalogFromTemplate

        public List<String> addFolderToCatalogFromTemplate​(String userId,
                                                           String externalSourceGUID,
                                                           String externalSourceName,
                                                           String templateGUID,
                                                           String pathName,
                                                           String displayName,
                                                           String description,
                                                           String methodName)
                                                    throws InvalidParameterException,
                                                           UserNotAuthorizedException,
                                                           PropertyServerException
        Create a new file asset based on an existing asset but with the supplied path name, display name and description.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        templateGUID - unique identifier of the asset description to copy
        pathName - unique path and file name for file
        displayName - short display name for file (defaults to the file name without the path)
        description - description of the file
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addAvroFileToCatalog

        public List<String> addAvroFileToCatalog​(String userId,
                                                 String externalSourceGUID,
                                                 String externalSourceName,
                                                 String displayName,
                                                 String description,
                                                 String fullPath,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Add a simple asset description linked to a connection object for an Avro file.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        displayName - display name for the file in the catalog
        description - description of the file in the catalog
        fullPath - full path of the file - used to access the file through the connector
        methodName - calling method
        Returns:
        list of GUIDs from the top level to the root of the pathname
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • addCSVFileToCatalog

        public List<String> addCSVFileToCatalog​(String userId,
                                                String externalSourceGUID,
                                                String externalSourceName,
                                                String displayName,
                                                String description,
                                                String fullPath,
                                                List<String> columnHeaders,
                                                Character delimiterCharacter,
                                                Character quoteCharacter,
                                                Date effectiveTime,
                                                String methodName)
                                         throws InvalidParameterException,
                                                UserNotAuthorizedException,
                                                PropertyServerException
        Add a simple asset description linked to a connection object for a CSV file.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        displayName - display name for the file in the catalog
        description - description of the file in the catalog
        fullPath - full path of the file - used to access the file through the connector
        columnHeaders - does the first line of the file contain the column names. If not pass the list of column headers.
        delimiterCharacter - what is the delimiter character - null for default of comma
        quoteCharacter - what is the character to group a field that contains delimiter characters
        effectiveTime - 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 root of the pathname
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateFileInCatalog

        public void updateFileInCatalog​(String userId,
                                        String externalSourceGUID,
                                        String externalSourceName,
                                        String dataFileGUID,
                                        boolean isMergeUpdate,
                                        String fullPath,
                                        String displayName,
                                        String description,
                                        Date createTime,
                                        Date modifiedTime,
                                        String encodingType,
                                        String encodingLanguage,
                                        String encodingDescription,
                                        Map<String,​String> encodingProperties,
                                        String suppliedFileType,
                                        Map<String,​String> additionalProperties,
                                        Map<String,​Object> extendedProperties,
                                        String methodName)
                                 throws InvalidParameterException,
                                        UserNotAuthorizedException,
                                        PropertyServerException
        Update the properties of a DataFile asset description.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        dataFileGUID - guid of the file asset
        isMergeUpdate - should the new properties be merged with the existing properties or completely replace them?
        fullPath - unique path and file name for file
        displayName - short display name for file (defaults to the file name without the path)
        description - description of the file
        createTime - the time that the file was created
        modifiedTime - the time of the latest change to the file
        encodingType - the type of encoding used on the file
        encodingLanguage - the language used within the file
        encodingDescription - the description of the file
        encodingProperties - the properties used to drive the encoding
        suppliedFileType - the type of file override (default is to use the file extension)
        additionalProperties - additional properties from the user
        extendedProperties - any additional properties for the file type
        methodName - calling method
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • updateFolderInCatalog

        public void updateFolderInCatalog​(String userId,
                                          String externalSourceGUID,
                                          String externalSourceName,
                                          String dataFileGUID,
                                          boolean isMergeUpdate,
                                          String fullPath,
                                          String displayName,
                                          String description,
                                          Date createTime,
                                          Date modifiedTime,
                                          String encodingType,
                                          String encodingLanguage,
                                          String encodingDescription,
                                          Map<String,​String> encodingProperties,
                                          Map<String,​String> additionalProperties,
                                          Map<String,​Object> extendedProperties,
                                          String methodName)
                                   throws InvalidParameterException,
                                          UserNotAuthorizedException,
                                          PropertyServerException
        Update the properties of a DataFile asset description.
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        dataFileGUID - guid of the file asset
        isMergeUpdate - should the new properties be merged with the existing properties or completely replace them?
        fullPath - unique path and file name for file
        displayName - short display name for file (defaults to the file name without the path)
        description - description of the file
        createTime - the time that the file was created
        modifiedTime - the time of the latest change to the file
        encodingType - the type of encoding used on the file
        encodingLanguage - the language used within the file
        encodingDescription - the description of the file
        encodingProperties - the properties used to drive the encoding
        additionalProperties - additional properties from the user
        extendedProperties - any additional properties for the file type
        methodName - calling method
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • archiveFileInCatalog

        public void archiveFileInCatalog​(String userId,
                                         String externalSourceGUID,
                                         String externalSourceName,
                                         String dataFileGUID,
                                         String dataFileGUIDParameterName,
                                         Date archiveDate,
                                         String archiveProcess,
                                         Map<String,​String> archiveProperties,
                                         String methodName)
                                  throws InvalidParameterException,
                                         UserNotAuthorizedException,
                                         PropertyServerException
        Archive a DataFile asset description. This adds the Memento classification to the DataFile entity and removes the attached connection (if any).
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        dataFileGUID - guid of the file asset
        dataFileGUIDParameterName - parameter name supplying dataFileGUID
        archiveDate - date that the file was archived or discovered to have been archived. Null means now.
        archiveProcess - name of archiving process
        archiveProperties - properties to help locate the archive copy
        methodName - calling method
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • archiveFolderInCatalog

        public void archiveFolderInCatalog​(String userId,
                                           String externalSourceGUID,
                                           String externalSourceName,
                                           String dataFolderGUID,
                                           String dataFolderGUIDParameterName,
                                           Date archiveDate,
                                           String archiveProcess,
                                           Map<String,​String> archiveProperties,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Archive a DataFolder asset description. This adds the Memento classification to the DataFolder entity and removes the attached connection (if any).
        Parameters:
        userId - calling user (assumed to be the owner)
        externalSourceGUID - guid of the software server capability entity that represented the external source - null for local
        externalSourceName - name of the software server capability entity that represented the external source
        dataFolderGUID - guid of the file asset
        dataFolderGUIDParameterName - parameter name supplying dataFolderGUID
        archiveDate - date that the file was archived or discovered to have been archived. Null means now.
        archiveProcess - name of archiving process
        archiveProperties - properties to help locate the archive copy
        methodName - calling method
        Throws:
        InvalidParameterException - full path or userId is null
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • getNestedFolders

        public List<String> getNestedFolders​(String userId,
                                             String parentFolderGUID,
                                             String parentFolderParameterName,
                                             int startingFrom,
                                             int pageSize,
                                             Date effectiveTime,
                                             String methodName)
                                      throws InvalidParameterException,
                                             UserNotAuthorizedException,
                                             PropertyServerException
        Return the list of folders nested inside a folder.
        Parameters:
        userId - calling user
        parentFolderGUID - unique identifier of the parent folder
        parentFolderParameterName - name of parameter providing parentFolderGUID
        startingFrom - starting point in the list
        pageSize - maximum number of results
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of folder unique identifiers (null means no nested folders)
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • getFolderFiles

        public List<String> getFolderFiles​(String userId,
                                           String folderGUID,
                                           String folderGUIDParameterName,
                                           int startingFrom,
                                           int pageSize,
                                           Date effectiveTime,
                                           String methodName)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Get the files inside a folder - both those that are nested and those that are linked.
        Parameters:
        userId - calling user
        folderGUID - unique identifier of the anchor folder
        folderGUIDParameterName - name of parameter providing folderGUID
        startingFrom - starting point in the list
        pageSize - maximum number of results
        effectiveTime - the time that the retrieved elements must be effective for (null for any time, new Date() for now)
        methodName - calling method
        Returns:
        list of file asset unique identifiers
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem
      • findDataFileByPathName

        public List<FILE> findDataFileByPathName​(String userId,
                                                 String pathName,
                                                 String pathNameParameterName,
                                                 int startingFrom,
                                                 int pageSize,
                                                 String methodName)
                                          throws InvalidParameterException,
                                                 UserNotAuthorizedException,
                                                 PropertyServerException
        Retrieve a data file by its fully qualified path name. In theory there should be none or one asset returned. However in complex environments, duplicates are possible.
        Parameters:
        userId - calling user
        pathName - path name
        pathNameParameterName - name of parameter providing the pathName
        startingFrom - place to start returning results from
        pageSize - maximum number of results
        methodName - calling method
        Returns:
        list of matching file properties
        Throws:
        InvalidParameterException - one of the parameters is null or invalid
        PropertyServerException - problem accessing property server
        UserNotAuthorizedException - security access problem