Changeset 10247


Ignore:
Timestamp:
2005-07-14T10:38:28+12:00 (19 years ago)
Author:
mdewsnip
Message:

Changed FileQueue.addJob to take an array of source_nodes, and deal with them itself, in preparation for adding a RemoteFileQueue.java class.

Location:
trunk/gli/src/org/greenstone/gatherer/file
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileManager.java

    r10246 r10247  
    167167        boolean cancelled = file_queue.calculateSize(source_nodes);
    168168        if (!cancelled) {
    169         // Queue the job(s) (this may fail if we are asked to delete a read only file)
    170         for (int i = 0; i < source_nodes.length; i++) {
    171             file_queue.addJob(id, source, source_nodes[i], target, target_node, type, true);
    172         }
     169        file_queue.addJob(id, source, source_nodes, target, target_node, type, true);
    173170        }
    174171
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r10245 r10247  
    9898     * @param type The type of this movement as an int, either COPY or DELETE.
    9999     */
    100     public void addJob(long id, DragComponent source, FileNode child, DragComponent target, FileNode parent, byte type, boolean folder_level) {
    101     addJob(id, source, child, target, parent, type, folder_level, -1);
    102     }
    103 
     100    public void addJob(long id, DragComponent source, FileNode[] children, DragComponent target, FileNode parent, byte type, boolean folder_level)
     101    {
     102    // Queue the sub-job(s) (this may fail if we are asked to delete a read only file)
     103    for (int i = 0; i < children.length; i++) {
     104        addJob(id, source, children[i], target, parent, type, folder_level, -1);
     105    }
     106    }
     107   
    104108    synchronized private void addJob(long id, DragComponent source, FileNode child, DragComponent target, FileNode parent, byte type, boolean folder_level, int position) {
    105109    FileJob job = new FileJob(id, source, child, target, parent, type);
Note: See TracChangeset for help on using the changeset viewer.