Interface ArcRepositoryClient

    • Method Detail

      • getFile

        void getFile​(String arcfilename,
                     Replica replica,
                     File toFile)
        Retrieves a file from an ArcRepository and places it in a local file.
        Specified by:
        getFile in interface PreservationArcRepositoryClient
        Specified by:
        getFile in interface ViewerArcRepositoryClient
        Parameters:
        arcfilename - Name of the arcfile to retrieve.
        replica - The bitarchive to retrieve the data from. On implementations with only one replica, null may be used.
        toFile - Filename of a place where the file fetched can be put.
        Throws:
        IOFailure - if there are problems getting a reply or the file could not be found.
      • batch

        BatchStatus batch​(FileBatchJob job,
                          String replicaId,
                          String... args)
        Runs a batch batch job on each file in the ArcRepository.
        Specified by:
        batch in interface PreservationArcRepositoryClient
        Specified by:
        batch in interface ViewerArcRepositoryClient
        Parameters:
        job - An object that implements the FileBatchJob interface. The initialize() method will be called before processing and the finish() method will be called afterwards. The process() method will be called with each File entry. An optional function postProcess() allows handling the combined results of the batchjob, e.g. summing the results, sorting, etc.
        replicaId - The archive to execute the job on.
        args - The arguments for the batchjob.
        Returns:
        The status of the batch job after it ended.
      • updateAdminData

        @Deprecated
        void updateAdminData​(String fileName,
                             String bitarchiveId,
                             ReplicaStoreState newval)
        Deprecated.
        Updates the administrative data in the ArcRepository for a given file and replica.
        Specified by:
        updateAdminData in interface PreservationArcRepositoryClient
        Parameters:
        fileName - The name of a file stored in the ArcRepository.
        bitarchiveId - The id of the replica that the administrative data for fileName is wrong for.
        newval - What the administrative data will be updated to.
      • updateAdminChecksum

        @Deprecated
        void updateAdminChecksum​(String filename,
                                 String checksum)
        Deprecated.
        Updates the checksum kept in the ArcRepository for a given file. It is the responsibility of the ArcRepository implementation to ensure that this checksum matches that of the underlying files.
        Specified by:
        updateAdminChecksum in interface PreservationArcRepositoryClient
        Parameters:
        filename - The name of a file stored in the ArcRepository.
        checksum - The new checksum.
      • removeAndGetFile

        @Deprecated
        File removeAndGetFile​(String fileName,
                              String bitarchiveId,
                              String checksum,
                              String credentials)
        Deprecated.
        Remove a file from one part of the ArcRepository, retrieving a copy for security purposes. This is typically used when repairing a file that has been corrupted.
        Specified by:
        removeAndGetFile in interface PreservationArcRepositoryClient
        Parameters:
        fileName - The name of the file to remove.
        bitarchiveId - The id of the replica from which to remove the file.
        checksum - The checksum of the file to be removed.
        credentials - A string that shows that the user is allowed to perform this operation.
        Returns:
        A local copy of the file removed.