summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-08-02 20:44:24 (GMT)
committer Mike Conway <mikeconway@dhcp152-54-6-70.wireless.europa.renci.org>2011-08-02 20:44:24 (GMT)
commit5ed2d89203e2fb78a37f21859f6214a660deebf6 (patch)
treed146bdb1fde79fac878b5af91ff82272888507e8
parent86603d0b29273ddd75da67471f1216e783b5bb76 (diff)
downloadQCG-Data-5ed2d89203e2fb78a37f21859f6214a660deebf6.zip
QCG-Data-5ed2d89203e2fb78a37f21859f6214a660deebf6.tar.gz
QCG-Data-5ed2d89203e2fb78a37f21859f6214a660deebf6.tar.bz2
fix info panel behavior, queue dialog sort, misc cleanup of dead code
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java61
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java103
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java70
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java52
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java118
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsTreeListenerForBuildingInfoPanel.java154
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java6
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/RemoteChooserView.java33
8 files changed, 168 insertions, 429 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
index 023a136..8520f36 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -496,6 +496,63 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
* @param evt
*/
private void btnDeleteSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteSynchActionPerformed
+
+ final IDROPConfigurationPanel thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ if (selectedSynchronization == null) {
+ MessageManager.showError(thisPanel, "Please select a synchronization from the table", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ Synchronization synchronization = selectedSynchronization;
+
+ int result = JOptionPane.showConfirmDialog(thisPanel,
+ "Do you wish to delete this synchronization?",
+ MessageManager.TITLE_MESSAGE,
+ JOptionPane.OK_CANCEL_OPTION);
+ if (result == JOptionPane.CANCEL_OPTION) {
+ return;
+ }
+
+
+ try {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ idropCore.getIdropConfigurationService().updateSynchronization(synchronization);
+
+ ListSelectionModel lsm = (ListSelectionModel) thisPanel.getSynchTable().getSelectionModel();
+ SynchConfigTableModel model = (SynchConfigTableModel) thisPanel.getSynchTable().getModel();
+
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+ log.info("deleting synchronization:{}", synchronization);
+ synchConfigurationService.deleteSynchronization(synchronization);
+ log.info("synch deleted, refreshing model");
+ List<Synchronization> synchronizations = synchConfigurationService.listAllSynchronizations();
+
+ model.setSynchronizations(synchronizations);
+ model.fireTableDataChanged();
+
+ MessageManager.showMessage(thisPanel, "Configuration deleted", MessageManager.TITLE_MESSAGE);
+ btnDeleteSynch.setEnabled(false);
+ btnUpdateSynch.setEnabled(false);
+ btnSynchNow.setEnabled(false);
+ clearAndResetSynchPanel();
+
+ } catch (IdropException ex) {
+ MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+
+ } catch (SynchException ex) {
+ MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ } finally {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ idropCore.closeIRODSConnection(
+ idropCore.getIrodsAccount());
+ }
+ }
+ });
}//GEN-LAST:event_btnDeleteSynchActionPerformed
/**
@@ -504,7 +561,9 @@ public class IDROPConfigurationPanel extends javax.swing.JDialog {
*/
private void btnNewSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewSynchActionPerformed
clearAndResetSynchPanel();
- jTableSynch.getSelectionModel().removeIndexInterval(0, jTableSynch.getModel().getRowCount() - 1);
+ if (jTableSynch.getModel().getRowCount() > 0) {
+ jTableSynch.getSelectionModel().removeIndexInterval(0, jTableSynch.getModel().getRowCount() - 1);
+ }
selectedSynchronization = new Synchronization();
btnDeleteSynch.setEnabled(false);
btnUpdateSynch.setEnabled(true);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
index fadd46d..62ef2c4 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java
@@ -38,6 +38,7 @@ import javax.swing.JCheckBox;
import javax.swing.JDialog;
import javax.swing.JOptionPane;
import javax.swing.JToggleButton;
+import javax.swing.ListSelectionModel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
@@ -726,6 +727,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
IRODSNode node;
if (pnlIrodsInfo.isVisible()) {
+ idropGuiReference.triggerInfoPanelUpdate();
splitTargetCollections.setDividerLocation(0.5d);
}
}
@@ -2802,4 +2804,105 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
transferStatusProgressBar.setValue(0);
}
+
+ public void triggerInfoPanelUpdate() throws IdropRuntimeException {
+
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+ IRODSOutlineModel irodsFileSystemModel = (IRODSOutlineModel) getIrodsTree().getModel();
+
+ ListSelectionModel selectionModel = getIrodsTree().getSelectionModel();
+ int idx = selectionModel.getLeadSelectionIndex();
+
+ // use first selection for info
+ IRODSNode selectedNode = (IRODSNode) irodsFileSystemModel.getValueAt(
+ idx, 0);
+ log.info("selected node to initialize info panel:{}", selectedNode);
+ try {
+ identifyNodeTypeAndInitializeInfoPanel(selectedNode);
+ } catch (IdropException ex) {
+
+ throw new IdropRuntimeException(
+ "error initializing info panel for selected irods node");
+ }
+ }
+ });
+
+ }
+
+ /**
+ * Look at the kind of irods node and handle appropriately
+ *
+ * @param irodsNode
+ * @throws IdropException
+ */
+ public void identifyNodeTypeAndInitializeInfoPanel(final IRODSNode irodsNode)
+ throws IdropException {
+
+ if (!getToggleIrodsDetails().isSelected()) {
+ return;
+ }
+
+ if (irodsNode == null) {
+ return;
+ }
+
+ if (irodsNode.isLeaf()) {
+ log.info("selected node is a leaf, get a data object");
+ buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
+ } else {
+ log.info("selected node is a collection, get a collection object");
+ buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
+ }
+ }
+
+ /**
+ * When a selected node in the iRODS tree is a data object, put the data
+ * object info in the info panel
+ *
+ * @param irodsNode
+ */
+ private void buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(
+ final IRODSNode irodsNode) throws IdropException {
+ try {
+ CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
+ log.info(
+ "will be getting a data object based on entry in IRODSNode:{}",
+ irodsNode);
+ DataObjectAO dataObjectAO = getiDropCore().getIRODSAccessObjectFactory().getDataObjectAO(this.getiDropCore().getIrodsAccount());
+ DataObject dataObject = dataObjectAO.findByCollectionNameAndDataName(
+ collectionAndDataObjectListingEntry.getParentPath(),
+ collectionAndDataObjectListingEntry.getPathOrName());
+ initializeInfoPanel(dataObject);
+ } catch (Exception e) {
+ log.error("error building data object for: {}", irodsNode);
+ throw new IdropException(e);
+ }
+ }
+
+ /**
+ * When a selected node in the iRODS tree is a collection, put the
+ * collection info into the info panel
+ *
+ * @param irodsNode
+ */
+ private void buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(
+ final IRODSNode irodsNode) throws IdropException {
+ try {
+ CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
+ log.info(
+ "will be getting a collection based on entry in IRODSNode:{}",
+ irodsNode);
+ CollectionAO collectionAO = getiDropCore().getIRODSAccessObjectFactory().getCollectionAO(getIrodsAccount());
+ Collection collection = collectionAO.findByAbsolutePath(collectionAndDataObjectListingEntry.getPathOrName());
+ initializeInfoPanel(collection);
+ } catch (Exception e) {
+ log.error("error building collection object for: {}", irodsNode);
+ throw new IdropException(e);
+
+ }
+ }
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java
deleted file mode 100644
index 80dd779..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleExecutionWorker.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package org.irods.jargon.idrop.desktop.systraygui.services;
-
-import javax.swing.SwingWorker;
-
-import org.irods.jargon.core.connection.IRODSAccount;
-import org.irods.jargon.core.rule.IRODSRuleExecResult;
-import org.irods.jargon.idrop.desktop.systraygui.iDrop;
-import org.irods.jargon.idrop.exceptions.IdropException;
-import org.slf4j.LoggerFactory;
-
-/**
- * Swing worker to manage rule execution, and a bridge to handle callbacks
- * between the rule and the client
- *
- * @author Mike Conway - DICE (www.irods.org)
- */
-public final class RuleExecutionWorker extends SwingWorker {
-
- public static org.slf4j.Logger log = LoggerFactory.getLogger(RuleExecutionWorker.class);
- private final String irodsTargetAbsolutePath;
- private final String targetResource;
- private final IRODSAccount irodsAccount;
- private final iDrop idropGui;
- private IRODSRuleExecResult execResult = null;
-
- public RuleExecutionWorker(final iDrop idropGui,
- final String irodsTargetAbsolutePath, final String targetResource,
- final IRODSAccount irodsAccount) throws IdropException {
-
- if (idropGui == null) {
- throw new IdropException("null idropGui");
- }
-
- if (irodsTargetAbsolutePath == null
- || irodsTargetAbsolutePath.isEmpty()) {
- throw new IdropException("null or empty irodsTargetAbsolutePath");
- }
-
- if (targetResource == null) {
- throw new IdropException(
- "null targetResource, leave as blank if default is desired");
- }
-
- if (irodsAccount == null) {
- throw new IdropException(
- "null irodsAccount, leave as blank if default is desired");
- }
-
- this.idropGui = idropGui;
- this.irodsTargetAbsolutePath = irodsTargetAbsolutePath;
- this.targetResource = targetResource;
- this.irodsAccount = irodsAccount;
-
- }
-
- @Override
- protected Object doInBackground() throws Exception {
- log.info("initiating rule execution");
- IRODSFileService irodsFileService = new IRODSFileService(irodsAccount,
- idropGui.getiDropCore().getIrodsFileSystem());
- execResult = irodsFileService.runIRODSRule(RuleLibrary.collectionRule(irodsTargetAbsolutePath));
- return execResult;
- }
-
- @Override
- protected void done() {
- log.info("rule execution finished with result:{}", execResult);
- idropGui.showMessageFromOperation("rule execution finished");
- }
-}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java
deleted file mode 100644
index 04dbae3..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/RuleLibrary.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package org.irods.jargon.idrop.desktop.systraygui.services;
-
-import org.irods.jargon.idrop.exceptions.IdropException;
-
-/**
- * Library of rules to use from iDrop
- *
- * @author Mike Conway - DICE (www.irods.org)
- */
-public class RuleLibrary {
-
- private RuleLibrary() {
- }
-
- public static String virusScanOnCollectionRule(
- final String targetCollectionAbsolutePath) throws IdropException {
-
- if (targetCollectionAbsolutePath == null
- || targetCollectionAbsolutePath.isEmpty()) {
- throw new IdropException(
- "null or empty targetCollectionAbsolutePath");
- }
-
- // FIXME: currently a dummy rule
- StringBuilder sb = new StringBuilder();
- sb.append("flagWithTimestamp||msiGetSystemTime(*Time, human)##msiAddKeyVal(*KVP,\"TIMESTAMP\",*Time)##msiAssociateKeyValuePairsToObj(*KVP,*Collection,\"-C\")##writeLine(stdout, *Time)|nop\n");
- sb.append("*Collection=");
- sb.append(targetCollectionAbsolutePath.trim());
- sb.append("\n");
- sb.append("ruleExecOut");
- return sb.toString();
- }
-
- public static String collectionRule(
- final String targetCollectionAbsolutePath) throws IdropException {
- if (targetCollectionAbsolutePath == null
- || targetCollectionAbsolutePath.isEmpty()) {
- throw new IdropException(
- "null or empty targetCollectionAbsolutePath");
- }
-
- // FIXME: currently a dummy rule
- StringBuilder sb = new StringBuilder();
- sb.append("scanAndFlag||acScanLoadingRescAndFlagColl(*collection)|nop\n");
- sb.append("*collection=");
- sb.append(targetCollectionAbsolutePath.trim());
- sb.append("\n");
- sb.append("ruleExecOut");
- return sb.toString();
-
- }
-}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java
index 34497c7..aa377ab 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsSelectionListenerForBuildingInfoPanel.java
@@ -47,27 +47,6 @@ public class IrodsSelectionListenerForBuildingInfoPanel implements
}
- public void valueChanged(final TreeSelectionEvent e) {
- // FIXME: reimplement
-
- /*
- * if (!(idrop.getIrodsTree().getLastSelectedPathComponent() instanceof
- * IRODSNode)) { log.info("last selected is not a Node"); return; }
- *
- *
- * final IRODSNode node = (IRODSNode)
- * idrop.getIrodsTree().getLastSelectedPathComponent(); try {
- * identifyNodeTypeAndInitializeInfoPanel(node); } catch (IdropException
- * ex) {
- * Logger.getLogger(IrodsTreeListenerForBuildingInfoPanel.class.getName
- * ()).log(Level.SEVERE, null, ex); throw new IdropRuntimeException(
- * "exception processing valueChanged() event for IRODSNode selection");
- * }
- *
- * *
- */
- }
-
public void treeExpanded(final TreeExpansionEvent event) {
/*
* TreePath expandedTreePath = event.getPath(); IRODSNode expandedNode =
@@ -86,106 +65,13 @@ public class IrodsSelectionListenerForBuildingInfoPanel implements
// operation not needed, left for interface contract
}
- /**
- * Look at the kind of irods node and handle appropriately
- *
- * @param irodsNode
- * @throws IdropException
- */
- public void identifyNodeTypeAndInitializeInfoPanel(final IRODSNode irodsNode)
- throws IdropException {
-
- if (!idrop.getToggleIrodsDetails().isSelected()) {
- return;
- }
-
- /* FIXME: shim */
- if (irodsNode == null) {
- return;
- }
-
- if (irodsNode.isLeaf()) {
- log.info("selected node is a leaf, get a data object");
- buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
- } else {
- log.info("selected node is a collection, get a collection object");
- buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
- }
- }
-
- /**
- * When a selected node in the iRODS tree is a data object, put the data
- * object info in the info panel
- *
- * @param irodsNode
- */
- private void buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(
- final IRODSNode irodsNode) throws IdropException {
- try {
- CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
- log.info(
- "will be getting a data object based on entry in IRODSNode:{}",
- irodsNode);
- DataObjectAO dataObjectAO = idrop.getiDropCore().getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
- DataObject dataObject = dataObjectAO.findByCollectionNameAndDataName(
- collectionAndDataObjectListingEntry.getParentPath(),
- collectionAndDataObjectListingEntry.getPathOrName());
- idrop.initializeInfoPanel(dataObject);
- } catch (Exception e) {
- log.error("error building data object for: {}", irodsNode);
- throw new IdropException(e);
- }
- }
-
- /**
- * When a selected node in the iRODS tree is a collection, put the
- * collection info into the info panel
- *
- * @param irodsNode
- */
- private void buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(
- final IRODSNode irodsNode) throws IdropException {
- try {
- CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
- log.info(
- "will be getting a collection based on entry in IRODSNode:{}",
- irodsNode);
- CollectionAO collectionAO = idrop.getiDropCore().getIRODSAccessObjectFactory().getCollectionAO(idrop.getIrodsAccount());
- Collection collection = collectionAO.findByAbsolutePath(collectionAndDataObjectListingEntry.getPathOrName());
- idrop.initializeInfoPanel(collection);
- } catch (Exception e) {
- log.error("error building collection object for: {}", irodsNode);
- throw new IdropException(e);
-
- }
- }
-
+
@Override
public void valueChanged(final ListSelectionEvent lse) {
if (lse.getValueIsAdjusting()) {
return;
}
log.info("lse: {}", lse);
-
- if (irodsFileSystemModel == null) {
- irodsFileSystemModel = (IRODSOutlineModel) idrop.getIrodsTree().getModel();
- }
-
- ListSelectionModel selectionModel = idrop.getIrodsTree().getSelectionModel();
- int idx = selectionModel.getLeadSelectionIndex();
-
- // use first selection for info
- IRODSNode selectedNode = (IRODSNode) irodsFileSystemModel.getValueAt(
- idx, 0);
- log.info("selected node to initialize info panel:{}", selectedNode);
- try {
- identifyNodeTypeAndInitializeInfoPanel(selectedNode);
- } catch (IdropException ex) {
- Logger.getLogger(
- IrodsSelectionListenerForBuildingInfoPanel.class.getName()).log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException(
- "error initializing info panel for selected irods node");
- }
-
+ idrop.triggerInfoPanelUpdate();
}
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsTreeListenerForBuildingInfoPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsTreeListenerForBuildingInfoPanel.java
deleted file mode 100644
index 50de879..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IrodsTreeListenerForBuildingInfoPanel.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *A listener for iRODS tree selected
- */
-package org.irods.jargon.idrop.desktop.systraygui.viscomponents;
-
-import javax.swing.event.TreeExpansionEvent;
-import javax.swing.event.TreeExpansionListener;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-
-import org.irods.jargon.core.pub.CollectionAO;
-import org.irods.jargon.core.pub.DataObjectAO;
-import org.irods.jargon.core.pub.domain.Collection;
-import org.irods.jargon.core.pub.domain.DataObject;
-import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
-import org.irods.jargon.idrop.desktop.systraygui.iDrop;
-import org.irods.jargon.idrop.exceptions.IdropException;
-import org.slf4j.LoggerFactory;
-
-/**
- * Class to encapsulate handling of info panel. This object will listen to tree
- * selection events in the iDROP iRODS tree, and initialize the info panel.
- *
- *
- *
- * @author Mike Conway - DICE (www.irods.org)
- */
-public class IrodsTreeListenerForBuildingInfoPanel implements
- TreeSelectionListener, TreeExpansionListener {
-
- public static org.slf4j.Logger log = LoggerFactory.getLogger(IrodsTreeListenerForBuildingInfoPanel.class);
- private final iDrop idrop;
-
- public IrodsTreeListenerForBuildingInfoPanel(final iDrop idrop)
- throws IdropException {
- if (idrop == null) {
- throw new IdropException("null iDrop");
- }
-
- this.idrop = idrop;
-
- }
-
- @Override
- public void valueChanged(final TreeSelectionEvent e) {
- // FIXME: reimplement
-
- /*
- * if (!(idrop.getIrodsTree().getLastSelectedPathComponent() instanceof
- * IRODSNode)) { log.info("last selected is not a Node"); return; }
- *
- *
- * final IRODSNode node = (IRODSNode)
- * idrop.getIrodsTree().getLastSelectedPathComponent(); try {
- * identifyNodeTypeAndInitializeInfoPanel(node); } catch (IdropException
- * ex) {
- * Logger.getLogger(IrodsTreeListenerForBuildingInfoPanel.class.getName
- * ()).log(Level.SEVERE, null, ex); throw new IdropRuntimeException(
- * "exception processing valueChanged() event for IRODSNode selection");
- * }
- *
- * *
- */
- }
-
- @Override
- public void treeExpanded(final TreeExpansionEvent event) {
- /*
- * TreePath expandedTreePath = event.getPath(); IRODSNode expandedNode =
- * (IRODSNode) expandedTreePath.getLastPathComponent(); try {
- * identifyNodeTypeAndInitializeInfoPanel(expandedNode); } catch
- * (IdropException ex) {
- * Logger.getLogger(IrodsTreeListenerForBuildingInfoPanel
- * .class.getName()).log(Level.SEVERE, null, ex); throw new
- * IdropRuntimeException
- * ("exception processing treeExpanded() event for IRODSNode selection"
- * ); }
- */
- }
-
- @Override
- public void treeCollapsed(final TreeExpansionEvent event) {
- // operation not needed, left for interface contract
- }
-
- /**
- * Look at the kind of irods node and handle appropriately
- *
- * @param irodsNode
- * @throws IdropException
- */
- public void identifyNodeTypeAndInitializeInfoPanel(final IRODSNode irodsNode)
- throws IdropException {
-
- if (!idrop.getToggleIrodsDetails().isSelected()) {
- return;
- }
-
- if (irodsNode.isLeaf()) {
- log.info("selected node is a leaf, get a data object");
- buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
- } else {
- log.info("selected node is a collection, get a collection object");
- buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(irodsNode);
- }
- }
-
- /**
- * When a selected node in the iRODS tree is a data object, put the data
- * object info in the info panel
- *
- * @param irodsNode
- */
- private void buildDataObjectFromSelectedIRODSNodeAndGiveToInfoPanel(
- final IRODSNode irodsNode) throws IdropException {
- try {
- CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
- log.info(
- "will be getting a data object based on entry in IRODSNode:{}",
- irodsNode);
- DataObjectAO dataObjectAO = idrop.getiDropCore().getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
- DataObject dataObject = dataObjectAO.findByCollectionNameAndDataName(
- collectionAndDataObjectListingEntry.getParentPath(),
- collectionAndDataObjectListingEntry.getPathOrName());
- idrop.initializeInfoPanel(dataObject);
- } catch (Exception e) {
- log.error("error building data object for: {}", irodsNode);
- throw new IdropException(e);
- }
- }
-
- /**
- * When a selected node in the iRODS tree is a collection, put the
- * collection info into the info panel
- *
- * @param irodsNode
- */
- private void buildCollectionFromSelectedIRODSNodeAndGiveToInfoPanel(
- final IRODSNode irodsNode) throws IdropException {
- try {
- CollectionAndDataObjectListingEntry collectionAndDataObjectListingEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
- log.info(
- "will be getting a collection based on entry in IRODSNode:{}",
- irodsNode);
- CollectionAO collectionAO = idrop.getiDropCore().getIRODSAccessObjectFactory().getCollectionAO(idrop.getIrodsAccount());
- Collection collection = collectionAO.findByAbsolutePath(collectionAndDataObjectListingEntry.getPathOrName());
- idrop.initializeInfoPanel(collection);
- } catch (Exception e) {
- log.error("error building collection object for: {}", irodsNode);
- throw new IdropException(e);
-
- }
- }
-}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java
index eaec5a4..d60e8e6 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/QueueManagerMasterTableModel.java
@@ -163,19 +163,19 @@ public class QueueManagerMasterTableModel extends DefaultTableModel {
// 1 = status
if (columnIndex == 1) {
- return localIRODSTransfer.getTransferState();
+ return localIRODSTransfer.getTransferState().name();
}
// 2 = state
if (columnIndex == 2) {
- return localIRODSTransfer.getTransferStatus();
+ return localIRODSTransfer.getTransferStatus().name();
}
// 3 =operation
if (columnIndex == 3) {
- return localIRODSTransfer.getTransferType();
+ return localIRODSTransfer.getTransferType().name();
}
// 4 = source path
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/RemoteChooserView.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/RemoteChooserView.java
deleted file mode 100644
index d37ce09..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/RemoteChooserView.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package org.irods.jargon.idrop.desktop.systraygui.viscomponents;
-
-import java.io.File;
-
-/**
- *
- * @author mikeconway
- */
-public interface RemoteChooserView {
- /**
- * Returns the children of the parent directory.
- */
- public File[] getChildren(File aDir);
- /**
- * Returns the root (in this case, Baseball).
- */
- public File getRoot();
-
- /**
- * Creates a new folder in the containing directory.
- */
- public File createNewFolder(File aContainingDir);
- /**
- * Determines if the file should be displayed
- * based on the current filter.
- */
- public boolean acceptFilter(File aFile,
- String aCurrentFilter);
-}