Ignore:
Timestamp:
2008-10-24T17:45:51+13:00 (16 years ago)
Author:
ak19
Message:

Turned class RemoteGreenstoneServer.java from an all-static class into a regular OOP class. It is now also split into three files (the other two being ActionQueue.java and RemoteGreenstoneServerAction.java).

File:
1 edited

Legend:

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

    r15105 r17612  
    180180                source_files[i] = source_nodes[i].getFile();
    181181            }
    182             RemoteGreenstoneServer.uploadFilesIntoCollection(collection_name, source_files, target_node.getFile());
     182            Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(collection_name, source_files, target_node.getFile());
    183183            }
    184184            else if (type == FileJob.DELETE) {
    185185            // Deletes: delete each top-level file/directory one at a time
    186186            for (int i = 0; i < source_nodes.length; i++) {
    187                 RemoteGreenstoneServer.deleteCollectionFile(collection_name, source_nodes[i].getFile());
     187                Gatherer.remoteGreenstoneServer.deleteCollectionFile(collection_name, source_nodes[i].getFile());
    188188            }
    189189            }
     
    191191            // Moves: move each top-level file/directory one at a time
    192192            for (int i = 0; i < source_nodes.length; i++) {
    193                 RemoteGreenstoneServer.moveCollectionFile(collection_name, source_nodes[i].getFile(), target_node.getFile());
     193                Gatherer.remoteGreenstoneServer.moveCollectionFile(
     194                                     collection_name, source_nodes[i].getFile(), target_node.getFile());
    194195            }
    195196            }
     
    272273        // ... but only if it is inside the collection and we haven't already downloaded it
    273274        if (file.getAbsolutePath().startsWith(Gatherer.getCollectDirectoryPath()) && file.length() == 0) {
    274             if (RemoteGreenstoneServer.downloadCollectionFile(CollectionManager.getLoadedCollectionName(), file).equals("")) {
     275            if (Gatherer.remoteGreenstoneServer.downloadCollectionFile(
     276                                 CollectionManager.getLoadedCollectionName(), file).equals("")) {
    275277            // Something has gone wrong downloading the file
    276278            return;
     
    347349                folder_file.createNewFile();
    348350                if (Gatherer.isGsdlRemote) {
    349                 RemoteGreenstoneServer.uploadCollectionFile(CollectionManager.getLoadedCollectionName(), folder_file);
     351                Gatherer.remoteGreenstoneServer.uploadCollectionFile(
     352                                         CollectionManager.getLoadedCollectionName(), folder_file);
    350353                }
    351354            }
     
    353356                folder_file.mkdirs();
    354357                if (Gatherer.isGsdlRemote) {
    355                 RemoteGreenstoneServer.newCollectionDirectory(CollectionManager.getLoadedCollectionName(), folder_file);
     358                Gatherer.remoteGreenstoneServer.newCollectionDirectory(
     359                                         CollectionManager.getLoadedCollectionName(), folder_file);
    356360                }
    357361            }
     
    413417        file_queue.addJob(System.currentTimeMillis(), collection_tree, new FileNode[] { collection_tree_node }, collection_tree, new_collection_tree_node, FileJob.RENAME);
    414418        if (Gatherer.isGsdlRemote) {
    415             RemoteGreenstoneServer.moveCollectionFile(CollectionManager.getLoadedCollectionName(), collection_file, new_collection_file);
     419            Gatherer.remoteGreenstoneServer.moveCollectionFile(
     420                             CollectionManager.getLoadedCollectionName(), collection_file, new_collection_file);
    416421        }
    417422        }
     
    462467        file_queue.addJob(System.currentTimeMillis(), Gatherer.g_man.gather_pane.workspace_tree, new FileNode[] { source_node }, collection_tree, (FileNode)collection_tree_node.getParent(),  FileJob.COPY_FILE_ONLY);
    463468        if (Gatherer.isGsdlRemote) {
    464         RemoteGreenstoneServer.uploadFilesIntoCollection(CollectionManager.getLoadedCollectionName(), new File[] { new_file }, target_directory);
     469        Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(
     470                         CollectionManager.getLoadedCollectionName(), new File[] { new_file }, target_directory);
    465471        }
    466472        // do a replace of old file with new file
Note: See TracChangeset for help on using the changeset viewer.