Changeset 11080


Ignore:
Timestamp:
2006-01-23T13:24:35+13:00 (18 years ago)
Author:
mdewsnip
Message:

Removed the "progress" parameter from copyFile, as part of the FileQueue rewrite.

Location:
trunk/gli/src/org/greenstone/gatherer
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java

    r11079 r11080  
    473473            try {
    474474                File collection_image_file = new File(images_folder, file.getName());
    475                 Gatherer.f_man.getQueue().copyFile(file, collection_image_file, false, null);
     475                Gatherer.f_man.getQueue().copyFile(file, collection_image_file, false);
    476476
    477477                // If we're using a remote Greenstone server, upload the image
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r11079 r11080  
    290290       
    291291        // copy the contents over
    292         Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_images, new_coll_images, null);
     292        Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_images, new_coll_images);
    293293        }
    294294    }
     
    305305       
    306306        // copy the contents over
    307         Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_macros, new_coll_macros, null);
     307        Gatherer.f_man.getQueue().copyDirectoryContents(base_coll_macros, new_coll_macros);
    308308        }
    309309    }
     
    742742    if (!metadata_set_file.exists()) {
    743743        try {
    744         Gatherer.f_man.getQueue().copyFile(external_metadata_set_file, metadata_set_file, false, null);
     744        Gatherer.f_man.getQueue().copyFile(external_metadata_set_file, metadata_set_file, false);
    745745
    746746        // If we're using a remote Greenstone server, upload the metadata file
  • trunk/gli/src/org/greenstone/gatherer/collection/LegacyCollectionImporter.java

    r11079 r11080  
    5353        try {
    5454        backup_dir.mkdirs();
    55         Gatherer.f_man.getQueue().copyFile(metadata_xml_file_file, new_metadata_xml_file_file, false, null);
     55        Gatherer.f_man.getQueue().copyFile(metadata_xml_file_file, new_metadata_xml_file_file, false);
    5656        if (!new_metadata_xml_file_file.exists()) {
    5757            throw new Exception("");
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r11079 r11080  
    336336                    // copy the file. If anything goes wrong the copy file should throw the appropriate exception. No matter what exception is thrown (bar an IOException) we display some message, perhaps take some action, then cancel the remainder of the pending file jobs. No point in being told your out of hard drive space for each one of six thousand files eh?
    337337                    try {
    338                     copyFile(source_file, target_file, false, progress);
     338                    copyFile(source_file, target_file, false);
     339                    progress.addValue(source_file.length());
    339340                    }
    340341                    // If we can't find the source file, then the most likely reason is that the file system has changed since the last time it was mapped. Warn the user that the requested file can't be found, then force a refresh of the source folder involved.
     
    583584     * @see org.greenstone.gatherer.Gatherer
    584585     */
    585     public void copyDirectoryContents(File source, File destination, GProgressBar progress)
     586    public void copyDirectoryContents(File source, File destination)
    586587    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException
    587588    {
     
    597598        File new_file = new File(destination, f_name);
    598599        if (f.isDirectory()) {
    599         copyDirectoryContents(f, new_file, progress);
     600        copyDirectoryContents(f, new_file);
    600601        } else if (f.isFile()) {
    601         copyFile(f, new_file, false, progress);
     602        copyFile(f, new_file, false);
    602603        }
    603604    }
    604    
    605     }
     605    }
     606
    606607   
    607608    /** Copy a file from the source location to the destination location.
     
    610611     * @see org.greenstone.gatherer.Gatherer
    611612     */
    612     public void copyFile(File source, File destination, boolean overwrite, GProgressBar progress)
     613    public void copyFile(File source, File destination, boolean overwrite)
    613614    throws FileAlreadyExistsException, FileNotFoundException, InsufficientSpaceException, IOException, ReadNotPermittedException, UnknownFileErrorException, WriteNotPermittedException
    614615    {
     
    674675        }
    675676        }
    676         if (progress != null) {
    677         progress.addValue(data_size);
    678         }
    679677    }
    680678
Note: See TracChangeset for help on using the changeset viewer.