summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhanna <nowakh3d@wp.pl>2013-09-10 09:12:55 (GMT)
committer hanna <nowakh3d@wp.pl>2013-09-10 09:12:55 (GMT)
commit9794dc10c810d9d7b3e95bcaa82ff73b53b1c687 (patch)
treeb6f6093e4365c4d51dd62cc47a49caf85d61a0e7
parent49f461d8539c2a75d494135ab4c6a86c400dfce2 (diff)
downloadQCG-Data-9794dc10c810d9d7b3e95bcaa82ff73b53b1c687.zip
QCG-Data-9794dc10c810d9d7b3e95bcaa82ff73b53b1c687.tar.gz
QCG-Data-9794dc10c810d9d7b3e95bcaa82ff73b53b1c687.tar.bz2
metasearch
-rw-r--r--idrop-swing/idrop-swing.iml54
-rw-r--r--idrop-swing/pom.xml44
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form1
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java4559
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPDesktop.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form83
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java735
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form105
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java165
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form97
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java132
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form82
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java462
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form4
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java170
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form37
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java27
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java99
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java15
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java963
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java348
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java867
-rw-r--r--idrop-swing/src/main/resources/icon_metasearch.pngbin0 -> 3149 bytes
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.pngbin0 -> 24000 bytes
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties1
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/splashWindow.xml2
28 files changed, 5055 insertions, 4003 deletions
diff --git a/idrop-swing/idrop-swing.iml b/idrop-swing/idrop-swing.iml
new file mode 100644
index 0000000..df3d30c
--- /dev/null
+++ b/idrop-swing/idrop-swing.iml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="Maven: org.irods.jargon:jargon-data-utils:3.3.0" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.8.2" level="project" />
+ <orderEntry type="library" name="Maven: org.irods.jargon:jargon-core:3.3.0" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-io:commons-io:2.0.1" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.commons:commons-exec:1.0.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.4" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: com.claymoresystems:puretls:1.1" level="project" />
+ <orderEntry type="library" name="Maven: org.globus.jglobus:cog-jglobus:1.8.0" level="project" />
+ <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.5.10" level="project" />
+ <orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.5.10" level="project" />
+ <orderEntry type="library" name="Maven: log4j:log4j:1.2.16" level="project" />
+ <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.5.6" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.tika:tika-core:1.1" level="project" />
+ <orderEntry type="library" name="Maven: org.irods.jargon:jargon-user-tagging:3.3.0" level="project" />
+ <orderEntry type="library" name="Maven: org.irods.jargon.transfer:jargon-transfer-dao-spring:3.3.0" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.dbunit:dbunit:2.2" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: junit-addons:junit-addons:1.4" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: xerces:xercesImpl:2.6.2" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: xerces:xmlParserAPIs:2.6.2" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: poi:poi:2.5.1-final-20040804" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: commons-lang:commons-lang:2.1" level="project" />
+ <orderEntry type="library" name="Maven: org.apache.derby:derby:10.6.1.0" level="project" />
+ <orderEntry type="library" name="Maven: org.irods.jargon.transfer:jargon-transfer-engine:3.3.0" level="project" />
+ <orderEntry type="library" name="Maven: javassist:javassist:3.8.0.GA" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: org.hibernate:hibernate-core:3.3.2.GA" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: antlr:antlr:2.7.7" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: dom4j:dom4j:1.6.1" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
+ <orderEntry type="library" scope="RUNTIME" name="Maven: javax.transaction:jta:1.1" level="project" />
+ <orderEntry type="library" name="Maven: org.irods.jargon:jargon-ticket:3.3.0" level="project" />
+ <orderEntry type="library" name="Maven: org.netbeans.api:org-netbeans-swing-outline:RELEASE711" level="project" />
+ <orderEntry type="library" name="Maven: org.swinglabs:swing-layout:1.0.3" level="project" />
+ <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-all:1.8.1" level="project" />
+ <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util:RELEASE711" level="project" />
+ <orderEntry type="library" name="Maven: org.netbeans.api:org-openide-util-lookup:RELEASE711" level="project" />
+ </component>
+</module>
+
diff --git a/idrop-swing/pom.xml b/idrop-swing/pom.xml
index 18f612b..530627a 100644
--- a/idrop-swing/pom.xml
+++ b/idrop-swing/pom.xml
@@ -52,6 +52,11 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>org.irods.jargon</groupId>
+ <artifactId>jargon-ticket</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -71,6 +76,37 @@
<version>3.3.2.GA</version>
<scope>runtime</scope>
</dependency>
+ <!-- required for GSI support -->
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix32</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>cryptix</groupId>
+ <artifactId>cryptix-asn1</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk16</artifactId>
+ <version>1.40</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.10</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.10</version>
+ </dependency>
</dependencies>
<build>
<plugins>
@@ -152,7 +188,7 @@
<!--install>false</install-->
<!-- not yet supported -->
- <verbose>false</verbose>
+ <verbose>true</verbose>
</configuration>
</plugin>
<plugin>
@@ -160,7 +196,7 @@
<configuration>
<archive>
<manifest>
- <mainClass>org.irods.jargon.idrop.desktop.systraygui.StartupSequencer</mainClass>
+ <mainClass>org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop</mainClass>
</manifest>
</archive>
</configuration>
@@ -173,7 +209,7 @@
</descriptorRefs>
<archive>
<manifest>
- <mainClass>org.irods.jargon.idrop.desktop.systraygui.StartupSequencer</mainClass>
+ <mainClass>org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop</mainClass>
</manifest>
</archive>
</configuration>
@@ -199,7 +235,7 @@
</execution>
</executions>
<configuration>
- <mainClass>org.irods.jargon.idrop.desktop.systraygui.StartupSequencer</mainClass>
+ <mainClass>org.irods.jargon.idrop.desktop.systraygui.IDROPDesktop</mainClass>
</configuration>
</plugin>
<plugin>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form
index 4ec4767..097ab59 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form
@@ -15,7 +15,6 @@
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
- <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
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 9a32abe..9e941e0 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
@@ -1,3 +1,4 @@
+
/*
* IDROPConfigurationPanel.java
*
@@ -5,25 +6,19 @@
*/
package org.irods.jargon.idrop.desktop.systraygui;
-import java.awt.Color;
-import java.awt.Cursor;
-import java.awt.Dimension;
-import java.awt.Toolkit;
+import java.awt.*;
+import java.awt.event.FocusEvent;
+import java.awt.event.FocusListener;
import java.awt.event.ItemEvent;
+import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
-
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JOptionPane;
-import javax.swing.JTable;
-import javax.swing.ListSelectionModel;
+import java.util.Set;
+import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
-
import org.irods.jargon.core.connection.DefaultPropertiesJargonConfig;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.connection.JargonProperties;
@@ -37,2571 +32,2025 @@ import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
import org.irods.jargon.idrop.finder.IRODSFinderDialog;
import org.irods.jargon.transfer.dao.domain.FrequencyType;
+import org.irods.jargon.transfer.dao.domain.LocalIRODSTransfer;
import org.irods.jargon.transfer.dao.domain.Synchronization;
import org.irods.jargon.transfer.dao.domain.SynchronizationType;
import org.irods.jargon.transfer.dao.domain.TransferStatus;
+import org.irods.jargon.transfer.engine.synch.ConflictingSynchException;
import org.irods.jargon.transfer.engine.synch.SynchException;
import org.irods.jargon.transfer.engine.synch.SynchManagerService;
import org.irods.jargon.transfer.util.HibernateUtil;
+import org.openide.util.Exceptions;
import org.slf4j.LoggerFactory;
/**
* Tools/Preferences dialog to set preferences
- *
+ *
* @author mikeconway
*/
public class IDROPConfigurationPanel extends javax.swing.JDialog {
- /**
- *
- */
- private static final long serialVersionUID = 6853489664356886078L;
- private final IDROPCore idropCore;
- private static final org.slf4j.Logger log = LoggerFactory
- .getLogger(IDROPConfigurationPanel.class);
- private JTable jTableSynch = null;
- private Synchronization selectedSynchronization = null;
- private DateFormat dateFormat = SimpleDateFormat.getDateTimeInstance();
- private final iDrop idropGui;
- private boolean initializing = true;
-
- /**
- * Creates new form IDROPConfigurationPanel
- */
- public IDROPConfigurationPanel(final java.awt.Frame parent,
- final boolean modal, final IDROPCore idropCore) {
- super(parent, modal);
- this.idropCore = idropCore;
- idropGui = (iDrop) parent;
- initComponents();
- initWithConfigData();
- }
-
- private boolean checkIfSynchChanged() throws IdropRuntimeException {
- // compare data and update synch first if necessary
-
- boolean areEqual = true;
-
- if (!selectedSynchronization.getLocalSynchDirectory().equals(
- txtLocalPath.getText())) {
- areEqual = false;
- }
-
- if (!selectedSynchronization.getName().equals(txtSynchName.getText())) {
- areEqual = false;
- }
-
- if (!selectedSynchronization.getIrodsSynchDirectory().equals(
- txtIrodsPath.getText())) {
- areEqual = false;
- }
-
- SynchronizationType currentSynchronizationType = getSynchTypeFromGUI();
-
- if (currentSynchronizationType != selectedSynchronization
- .getSynchronizationMode()) {
- areEqual = false;
- }
-
- FrequencyType currentFrequencyType = null;
- currentFrequencyType = getSynchFrequencyFromGUI();
-
- if (selectedSynchronization.getFrequencyType() != currentFrequencyType) {
- areEqual = false;
- }
-
- return areEqual;
- }
-
- private FrequencyType getSynchFrequencyFromGUI() {
- FrequencyType currentFrequencyType = null;
- if (jcomboSynchFrequency.getSelectedIndex() == 0) {
- currentFrequencyType = FrequencyType.EVERY_HOUR;
- } else if (jcomboSynchFrequency.getSelectedIndex() == 1) {
- currentFrequencyType = FrequencyType.EVERY_WEEK;
- } else if (jcomboSynchFrequency.getSelectedIndex() == 2) {
- currentFrequencyType = FrequencyType.EVERY_DAY;
- } else if (jcomboSynchFrequency.getSelectedIndex() == 3) {
- currentFrequencyType = FrequencyType.EVERY_TWO_MINUTES;
- }
- return currentFrequencyType;
- }
-
- private SynchronizationType getSynchTypeFromGUI()
- throws IdropRuntimeException {
- SynchronizationType currentSynchronizationType;
- if (radioBackup.isSelected()) {
- currentSynchronizationType = SynchronizationType.ONE_WAY_LOCAL_TO_IRODS;
- } else if (radioFeed.isSelected()) {
- currentSynchronizationType = SynchronizationType.ONE_WAY_IRODS_TO_LOCAL;
- } else if (radioSynch.isSelected()) {
- currentSynchronizationType = SynchronizationType.BI_DIRECTIONAL;
- } else {
- log.error("unknown synchronization type in GUI");
- throw new IdropRuntimeException(
- "unknown synchroization type in GUI");
- }
- return currentSynchronizationType;
- }
-
- /**
- * This method is called from within the constructor to initialize the form.
- * WARNING: Do NOT modify this code. The content of this method is always
- * regenerated by the Form Editor.
- */
- @SuppressWarnings("unchecked")
- // <editor-fold defaultstate="collapsed"
- // desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
- java.awt.GridBagConstraints gridBagConstraints;
-
- buttonGroupSynchMode = new javax.swing.ButtonGroup();
- pnlTop = new javax.swing.JPanel();
- pnlCenter = new javax.swing.JPanel();
- tabConfig = new javax.swing.JTabbedPane();
- pnlConfigIdrop = new javax.swing.JPanel();
- checkShowGUI = new javax.swing.JCheckBox();
- checkShowFileProgress = new javax.swing.JCheckBox();
- pnlConfigGrids = new javax.swing.JPanel();
- pnlCurrentGrid = new javax.swing.JPanel();
- lblHostLabel = new javax.swing.JLabel();
- lblHost = new javax.swing.JLabel();
- lblPortLabel = new javax.swing.JLabel();
- lblPort = new javax.swing.JLabel();
- lblZoneLabel = new javax.swing.JLabel();
- lblZone = new javax.swing.JLabel();
- lblResourceLabel = new javax.swing.JLabel();
- lblUserNameLabel = new javax.swing.JLabel();
- lblUserName = new javax.swing.JLabel();
- pnlCurrentGridToolbar = new javax.swing.JPanel();
- btnLogout = new javax.swing.JButton();
- btnChangePassword = new javax.swing.JButton();
- comboPrefsDefaultResource = new javax.swing.JComboBox();
- pnlConfigTransfers = new javax.swing.JPanel();
- pnlTransferManagement = new javax.swing.JPanel();
- checkLogSuccessfulTransfer = new javax.swing.JCheckBox();
- checkVerifyChecksumOnTransfer = new javax.swing.JCheckBox();
- checkAllowRerouting = new javax.swing.JCheckBox();
- checkConnectionRestart = new javax.swing.JCheckBox();
- plnPipelineConfiguration = new javax.swing.JPanel();
- lblIrodsSocketTimeout = new javax.swing.JLabel();
- spinnerIrodsSocketTimeout = new javax.swing.JSpinner();
- pnlParallelTransferOptions = new javax.swing.JPanel();
- checkAllowParallelTransfers = new javax.swing.JCheckBox();
- checkUseNIOForParallelTransfers = new javax.swing.JCheckBox();
- checkUseExecutorPool = new javax.swing.JCheckBox();
- lblIrodsParallelSocketTimeout = new javax.swing.JLabel();
- spinnerIrodsParallelSocketTimeout = new javax.swing.JSpinner();
- lblMaximumParallelTransferThreads = new javax.swing.JLabel();
- spinnerIrodsMaxParallelThreads = new javax.swing.JSpinner();
- pnlBuffers = new javax.swing.JPanel();
- lblInternalInputBufferSize = new javax.swing.JLabel();
- txtInternalInputBufferSize = new javax.swing.JTextField();
- lblInternalOutputBufferSize = new javax.swing.JLabel();
- txtInternalOutputBufferSize = new javax.swing.JTextField();
- lblLocalFileInputBufferSize = new javax.swing.JLabel();
- txtLocalFileInputBufferSize = new javax.swing.JTextField();
- lblLocalFileOutputBufferSize = new javax.swing.JLabel();
- txtLocalFileOutputBufferSize = new javax.swing.JTextField();
- lblPutBufferSize = new javax.swing.JLabel();
- txtPutBufferSize = new javax.swing.JTextField();
- lblGetBufferSize = new javax.swing.JLabel();
- txtGetBufferSize = new javax.swing.JTextField();
- lblIputToOutputCopyBufferSize = new javax.swing.JLabel();
- txtInputToOutputCopyBufferSize = new javax.swing.JTextField();
- lblInternalCacheBufferSize = new javax.swing.JLabel();
- txtInternalCacheBufferSize = new javax.swing.JTextField();
- btnRestoreDefaults = new javax.swing.JButton();
- btnApplyPipelineConfig = new javax.swing.JButton();
- pnlConfigSynch = new javax.swing.JPanel();
- pnlConfigSynchListing = new javax.swing.JPanel();
- pnlSynchRefresh = new javax.swing.JPanel();
- btnRefreshSynch = new javax.swing.JButton();
- scrollSynchTable = new javax.swing.JScrollPane();
- pnlConfigSynchDetails = new javax.swing.JPanel();
- pnlSynchData = new javax.swing.JPanel();
- pnlSynchName = new javax.swing.JPanel();
- lblSynchName = new javax.swing.JLabel();
- txtSynchName = new javax.swing.JTextField();
- lblSynchDateLabel = new javax.swing.JLabel();
- lblSynchDate = new javax.swing.JLabel();
- pnlSynchIcon = new javax.swing.JPanel();
- lblSynchStatus = new javax.swing.JLabel();
- pnlLocalSynch = new javax.swing.JPanel();
- txtLocalPath = new javax.swing.JTextField();
- btnChooseLocalSynch = new javax.swing.JButton();
- pnlSynchMode = new javax.swing.JPanel();
- jLabel1 = new javax.swing.JLabel();
- radioBackup = new javax.swing.JRadioButton();
- radioFeed = new javax.swing.JRadioButton();
- radioSynch = new javax.swing.JRadioButton();
- pnlSynchFrequency = new javax.swing.JPanel();
- jLabel5 = new javax.swing.JLabel();
- jcomboSynchFrequency = new javax.swing.JComboBox();
- pnlIrodsSynch = new javax.swing.JPanel();
- txtIrodsPath = new javax.swing.JTextField();
- btnChooseIrodsSynch = new javax.swing.JButton();
- panelSynchToolbar = new javax.swing.JPanel();
- btnDeleteSynch = new javax.swing.JButton();
- btnNewSynch = new javax.swing.JButton();
- btnUpdateSynch = new javax.swing.JButton();
- btnSynchNow = new javax.swing.JButton();
- pnlBottom = new javax.swing.JPanel();
- btnOK = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class, "IDROPConfigurationPanel.title")); // NOI18N
-
- org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(
- pnlTop);
- pnlTop.setLayout(pnlTopLayout);
- pnlTopLayout.setHorizontalGroup(pnlTopLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(0, 1067,
- Short.MAX_VALUE));
- pnlTopLayout.setVerticalGroup(pnlTopLayout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(0, 0,
- Short.MAX_VALUE));
-
- getContentPane().add(pnlTop, java.awt.BorderLayout.NORTH);
-
- pnlConfigIdrop.setLayout(new java.awt.GridBagLayout());
-
- checkShowGUI.setMnemonic('s');
- checkShowGUI.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkShowGUI.text")); // NOI18N
- checkShowGUI.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkShowGUI.toolTipText")); // NOI18N
- checkShowGUI.addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(final java.awt.event.ItemEvent evt) {
- checkShowGUIItemStateChanged(evt);
- }
- });
- checkShowGUI.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- checkShowGUIActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlConfigIdrop.add(checkShowGUI, gridBagConstraints);
-
- checkShowFileProgress.setMnemonic('w');
- checkShowFileProgress.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkShowFileProgress.text")); // NOI18N
- checkShowFileProgress
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkShowFileProgress.toolTipText")); // NOI18N
- checkShowFileProgress
- .addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(
- final java.awt.event.ItemEvent evt) {
- checkShowFileProgressItemStateChanged(evt);
- }
- });
- checkShowFileProgress
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- checkShowFileProgressActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlConfigIdrop.add(checkShowFileProgress, gridBagConstraints);
-
- tabConfig
- .addTab(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle"),
- pnlConfigIdrop); // NOI18N
-
- pnlConfigGrids.setLayout(new java.awt.BorderLayout());
-
- pnlCurrentGrid
- .setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlCurrentGrid.border.title"))); // NOI18N
- pnlCurrentGrid.setLayout(new java.awt.GridBagLayout());
-
- lblHostLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblHostLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblHostLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlCurrentGrid.add(lblHostLabel, gridBagConstraints);
-
- lblHost.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblHost.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlCurrentGrid.add(lblHost, gridBagConstraints);
- lblHost.getAccessibleContext()
- .setAccessibleDescription(
- org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblHost.AccessibleContext.accessibleDescription")); // NOI18N
-
- lblPortLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblPortLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblPortLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlCurrentGrid.add(lblPortLabel, gridBagConstraints);
-
- lblPort.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblPort.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlCurrentGrid.add(lblPort, gridBagConstraints);
- lblPort.getAccessibleContext()
- .setAccessibleDescription(
- org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblPort.AccessibleContext.accessibleDescription")); // NOI18N
-
- lblZoneLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblZoneLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblZoneLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlCurrentGrid.add(lblZoneLabel, gridBagConstraints);
-
- lblZone.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblZone.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlCurrentGrid.add(lblZone, gridBagConstraints);
- lblZone.getAccessibleContext()
- .setAccessibleDescription(
- org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblZone.AccessibleContext.accessibleDescription")); // NOI18N
-
- lblResourceLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblResourceLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblResourceLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlCurrentGrid.add(lblResourceLabel, gridBagConstraints);
-
- lblUserNameLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
- lblUserNameLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblUserNameLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlCurrentGrid.add(lblUserNameLabel, gridBagConstraints);
-
- lblUserName.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblUserName.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlCurrentGrid.add(lblUserName, gridBagConstraints);
- lblUserName
- .getAccessibleContext()
- .setAccessibleName(
- org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblUserName.AccessibleContext.accessibleName")); // NOI18N
-
- btnLogout.setMnemonic('l');
- btnLogout.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnLogout.text")); // NOI18N
- btnLogout.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnLogout.toolTipText")); // NOI18N
- btnLogout.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnLogoutActionPerformed(evt);
- }
- });
- pnlCurrentGridToolbar.add(btnLogout);
-
- btnChangePassword.setMnemonic('c');
- btnChangePassword.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChangePassword.text")); // NOI18N
- btnChangePassword.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChangePassword.toolTipText")); // NOI18N
- btnChangePassword
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnChangePasswordActionPerformed(evt);
- }
- });
- pnlCurrentGridToolbar.add(btnChangePassword);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
- gridBagConstraints.insets = new java.awt.Insets(20, 0, 0, 0);
- pnlCurrentGrid.add(pnlCurrentGridToolbar, gridBagConstraints);
-
- comboPrefsDefaultResource
- .setModel(new javax.swing.DefaultComboBoxModel(new String[] {
- "Item 1", "Item 2", "Item 3", "Item 4" }));
- comboPrefsDefaultResource
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- comboPrefsDefaultResourceActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlCurrentGrid.add(comboPrefsDefaultResource, gridBagConstraints);
-
- pnlConfigGrids.add(pnlCurrentGrid, java.awt.BorderLayout.CENTER);
-
- tabConfig
- .addTab(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle"),
- pnlConfigGrids); // NOI18N
-
- pnlConfigTransfers.setLayout(new java.awt.GridBagLayout());
-
- pnlTransferManagement
- .setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlTransferManagement.border.title"))); // NOI18N
- pnlTransferManagement.setLayout(new javax.swing.BoxLayout(
- pnlTransferManagement, javax.swing.BoxLayout.PAGE_AXIS));
-
- checkLogSuccessfulTransfer
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkLogSuccessfulTransfer.text")); // NOI18N
- checkLogSuccessfulTransfer
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkLogSuccessfulTransfer.toolTipText")); // NOI18N
- checkLogSuccessfulTransfer
- .addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(
- final java.awt.event.ItemEvent evt) {
- checkLogSuccessfulTransferItemStateChanged(evt);
- }
- });
- checkLogSuccessfulTransfer
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- checkLogSuccessfulTransferActionPerformed(evt);
- }
- });
- pnlTransferManagement.add(checkLogSuccessfulTransfer);
-
- checkVerifyChecksumOnTransfer
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkVerifyChecksumOnTransfer.text")); // NOI18N
- checkVerifyChecksumOnTransfer
- .addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(
- final java.awt.event.ItemEvent evt) {
- checkVerifyChecksumOnTransferItemStateChanged(evt);
- }
- });
- checkVerifyChecksumOnTransfer
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- checkVerifyChecksumOnTransferActionPerformed(evt);
- }
- });
- pnlTransferManagement.add(checkVerifyChecksumOnTransfer);
-
- checkAllowRerouting.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkAllowRerouting.text")); // NOI18N
- checkAllowRerouting
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkAllowRerouting.toolTipText")); // NOI18N
- checkAllowRerouting.addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(final java.awt.event.ItemEvent evt) {
- checkAllowReroutingItemStateChanged(evt);
- }
- });
- pnlTransferManagement.add(checkAllowRerouting);
-
- checkConnectionRestart.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkConnectionRestart.text")); // NOI18N
- checkConnectionRestart
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkConnectionRestart.toolTipText")); // NOI18N
- checkConnectionRestart
- .addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(
- final java.awt.event.ItemEvent evt) {
- checkConnectionRestartItemStateChanged(evt);
- }
- });
- checkConnectionRestart
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- checkConnectionRestartActionPerformed(evt);
- }
- });
- pnlTransferManagement.add(checkConnectionRestart);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
- gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- pnlConfigTransfers.add(pnlTransferManagement, gridBagConstraints);
-
- plnPipelineConfiguration
- .setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.plnPipelineConfiguration.border.title"))); // NOI18N
- plnPipelineConfiguration.setLayout(new java.awt.GridBagLayout());
-
- lblIrodsSocketTimeout.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblIrodsSocketTimeout.text")); // NOI18N
- lblIrodsSocketTimeout.setPreferredSize(null);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- plnPipelineConfiguration.add(lblIrodsSocketTimeout, gridBagConstraints);
-
- spinnerIrodsSocketTimeout.setModel(new javax.swing.SpinnerNumberModel(
- 0, 0, 600, 10));
- spinnerIrodsSocketTimeout
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.spinnerIrodsSocketTimeout.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- plnPipelineConfiguration.add(spinnerIrodsSocketTimeout,
- gridBagConstraints);
-
- pnlParallelTransferOptions
- .setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlParallelTransferOptions.border.title"))); // NOI18N
- pnlParallelTransferOptions.setLayout(new java.awt.GridBagLayout());
-
- checkAllowParallelTransfers.setMnemonic('p');
- checkAllowParallelTransfers
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkAllowParallelTransfers.text")); // NOI18N
- checkAllowParallelTransfers
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkAllowParallelTransfers.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.gridwidth = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlParallelTransferOptions.add(checkAllowParallelTransfers,
- gridBagConstraints);
-
- checkUseNIOForParallelTransfers
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkUseNIOForParallelTransfers.text")); // NOI18N
- checkUseNIOForParallelTransfers
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkUseNIOForParallelTransfers.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.gridwidth = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlParallelTransferOptions.add(checkUseNIOForParallelTransfers,
- gridBagConstraints);
-
- checkUseExecutorPool.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.checkUseExecutorPool.text")); // NOI18N
- checkUseExecutorPool.addItemListener(new java.awt.event.ItemListener() {
- @Override
- public void itemStateChanged(final java.awt.event.ItemEvent evt) {
- checkUseExecutorPoolItemStateChanged(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlParallelTransferOptions
- .add(checkUseExecutorPool, gridBagConstraints);
-
- lblIrodsParallelSocketTimeout
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblIrodsParallelSocketTimeout.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- gridBagConstraints.insets = new java.awt.Insets(28, 0, 0, 0);
- pnlParallelTransferOptions.add(lblIrodsParallelSocketTimeout,
- gridBagConstraints);
-
- spinnerIrodsParallelSocketTimeout
- .setModel(new javax.swing.SpinnerNumberModel(0, 0, 600, 10));
- spinnerIrodsParallelSocketTimeout
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.spinnerIrodsParallelSocketTimeout.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.ipadx = 159;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.insets = new java.awt.Insets(22, 0, 0, 0);
- pnlParallelTransferOptions.add(spinnerIrodsParallelSocketTimeout,
- gridBagConstraints);
-
- lblMaximumParallelTransferThreads
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblMaximumParallelTransferThreads.text")); // NOI18N
- lblMaximumParallelTransferThreads
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblMaximumParallelTransferThreads.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.insets = new java.awt.Insets(6, 180, 0, 0);
- pnlParallelTransferOptions.add(lblMaximumParallelTransferThreads,
- gridBagConstraints);
-
- spinnerIrodsMaxParallelThreads
- .setModel(new javax.swing.SpinnerNumberModel(4, 0, 16, 1));
- spinnerIrodsMaxParallelThreads
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.spinnerIrodsMaxParallelThreads.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.gridheight = 2;
- gridBagConstraints.ipadx = 171;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
- gridBagConstraints.insets = new java.awt.Insets(0, 0, 22, 0);
- pnlParallelTransferOptions.add(spinnerIrodsMaxParallelThreads,
- gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- plnPipelineConfiguration.add(pnlParallelTransferOptions,
- gridBagConstraints);
-
- pnlBuffers.setBorder(javax.swing.BorderFactory
- .createTitledBorder(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlBuffers.border.title"))); // NOI18N
- pnlBuffers.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlBuffers.toolTipText")); // NOI18N
- pnlBuffers.setLayout(new java.awt.GridBagLayout());
-
- lblInternalInputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblInternalInputBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlBuffers.add(lblInternalInputBufferSize, gridBagConstraints);
-
- txtInternalInputBufferSize.setColumns(20);
- txtInternalInputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalInputBufferSize.text")); // NOI18N
- txtInternalInputBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalInputBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlBuffers.add(txtInternalInputBufferSize, gridBagConstraints);
-
- lblInternalOutputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblInternalOutputBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlBuffers.add(lblInternalOutputBufferSize, gridBagConstraints);
-
- txtInternalOutputBufferSize.setColumns(20);
- txtInternalOutputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalOutputBufferSize.text")); // NOI18N
- txtInternalOutputBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalOutputBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlBuffers.add(txtInternalOutputBufferSize, gridBagConstraints);
-
- lblLocalFileInputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblLocalFileInputBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblLocalFileInputBufferSize, gridBagConstraints);
-
- txtLocalFileInputBufferSize.setColumns(20);
- txtLocalFileInputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalFileInputBufferSize.text")); // NOI18N
- txtLocalFileInputBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalFileInputBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtLocalFileInputBufferSize, gridBagConstraints);
-
- lblLocalFileOutputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblLocalFileOutputBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblLocalFileOutputBufferSize, gridBagConstraints);
-
- txtLocalFileOutputBufferSize.setColumns(20);
- txtLocalFileOutputBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalFileOutputBufferSize.text")); // NOI18N
- txtLocalFileOutputBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalFileOutputBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtLocalFileOutputBufferSize, gridBagConstraints);
-
- lblPutBufferSize.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblPutBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblPutBufferSize, gridBagConstraints);
-
- txtPutBufferSize.setColumns(20);
- txtPutBufferSize.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtPutBufferSize.text")); // NOI18N
- txtPutBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtPutBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtPutBufferSize, gridBagConstraints);
-
- lblGetBufferSize.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblGetBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblGetBufferSize, gridBagConstraints);
-
- txtGetBufferSize.setColumns(20);
- txtGetBufferSize.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtGetBufferSize.text")); // NOI18N
- txtGetBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtGetBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtGetBufferSize, gridBagConstraints);
-
- lblIputToOutputCopyBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblIputToOutputCopyBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblIputToOutputCopyBufferSize, gridBagConstraints);
-
- txtInputToOutputCopyBufferSize.setColumns(20);
- txtInputToOutputCopyBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInputToOutputCopyBufferSize.text")); // NOI18N
- txtInputToOutputCopyBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInputToOutputCopyBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtInputToOutputCopyBufferSize, gridBagConstraints);
-
- lblInternalCacheBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblInternalCacheBufferSize.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlBuffers.add(lblInternalCacheBufferSize, gridBagConstraints);
-
- txtInternalCacheBufferSize.setColumns(20);
- txtInternalCacheBufferSize
- .setText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalCacheBufferSize.text")); // NOI18N
- txtInternalCacheBufferSize
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtInternalCacheBufferSize.toolTipText")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlBuffers.add(txtInternalCacheBufferSize, gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.gridwidth = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- plnPipelineConfiguration.add(pnlBuffers, gridBagConstraints);
-
- btnRestoreDefaults.setMnemonic('a');
- btnRestoreDefaults.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnRestoreDefaults.text")); // NOI18N
- btnRestoreDefaults.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnRestoreDefaults.toolTipText")); // NOI18N
- btnRestoreDefaults
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnRestoreDefaultsActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 3;
- plnPipelineConfiguration.add(btnRestoreDefaults, gridBagConstraints);
-
- btnApplyPipelineConfig.setMnemonic('a');
- btnApplyPipelineConfig.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnApplyPipelineConfig.text")); // NOI18N
- btnApplyPipelineConfig
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnApplyPipelineConfig.toolTipText")); // NOI18N
- btnApplyPipelineConfig
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnApplyPipelineConfigActionPerformed(evt);
- }
- });
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 3;
- gridBagConstraints.gridy = 3;
- plnPipelineConfiguration
- .add(btnApplyPipelineConfig, gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- pnlConfigTransfers.add(plnPipelineConfiguration, gridBagConstraints);
-
- tabConfig
- .addTab(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlConfigTransfers.TabConstraints.tabTitle"),
- pnlConfigTransfers); // NOI18N
-
- pnlConfigSynch
- .addComponentListener(new java.awt.event.ComponentAdapter() {
- @Override
- public void componentShown(
- final java.awt.event.ComponentEvent evt) {
- pnlConfigSynchComponentShown(evt);
- }
- });
- pnlConfigSynch.setLayout(new java.awt.BorderLayout());
-
- pnlConfigSynchListing.setMinimumSize(new java.awt.Dimension(23, 100));
- pnlConfigSynchListing.setLayout(new java.awt.BorderLayout());
-
- btnRefreshSynch.setMnemonic('r');
- btnRefreshSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnRefreshSynch.text")); // NOI18N
- btnRefreshSynch.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnRefreshSynch.toolTipText")); // NOI18N
- btnRefreshSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnRefreshSynchActionPerformed(evt);
- }
- });
- pnlSynchRefresh.add(btnRefreshSynch);
-
- pnlConfigSynchListing.add(pnlSynchRefresh, java.awt.BorderLayout.NORTH);
-
- scrollSynchTable.setMinimumSize(new java.awt.Dimension(23, 100));
- scrollSynchTable.setPreferredSize(new java.awt.Dimension(100, 100));
- pnlConfigSynchListing.add(scrollSynchTable,
- java.awt.BorderLayout.CENTER);
-
- pnlConfigSynch.add(pnlConfigSynchListing, java.awt.BorderLayout.CENTER);
-
- pnlConfigSynchDetails.setLayout(new java.awt.BorderLayout());
-
- pnlSynchData.setBorder(javax.swing.BorderFactory
- .createBevelBorder(javax.swing.border.BevelBorder.RAISED));
- pnlSynchData.setLayout(new java.awt.GridBagLayout());
-
- pnlSynchName.setLayout(new java.awt.GridBagLayout());
-
- lblSynchName.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblSynchName.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlSynchName.add(lblSynchName, gridBagConstraints);
-
- txtSynchName.setColumns(40);
- txtSynchName.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtSynchName.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlSynchName.add(txtSynchName, gridBagConstraints);
-
- lblSynchDateLabel.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblSynchDateLabel.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlSynchName.add(lblSynchDateLabel, gridBagConstraints);
-
- lblSynchDate.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblSynchDate.text")); // NOI18N
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlSynchName.add(lblSynchDate, gridBagConstraints);
-
- lblSynchStatus.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.lblSynchStatus.text")); // NOI18N
- lblSynchStatus.setMaximumSize(null);
- lblSynchStatus.setMinimumSize(new java.awt.Dimension(10, 10));
- lblSynchStatus.setPreferredSize(new java.awt.Dimension(10, 10));
- pnlSynchIcon.add(lblSynchStatus);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 2;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.gridwidth = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- pnlSynchName.add(pnlSynchIcon, gridBagConstraints);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 0;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.insets = new java.awt.Insets(20, 20, 30, 20);
- pnlSynchData.add(pnlSynchName, gridBagConstraints);
-
- txtLocalPath.setColumns(80);
- txtLocalPath.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalPath.text")); // NOI18N
- txtLocalPath.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtLocalPath.toolTipText")); // NOI18N
- txtLocalPath.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- txtLocalPathActionPerformed(evt);
- }
- });
- pnlLocalSynch.add(txtLocalPath);
-
- btnChooseLocalSynch.setMnemonic('c');
- btnChooseLocalSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChooseLocalSynch.text")); // NOI18N
- btnChooseLocalSynch
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChooseLocalSynch.toolTipText")); // NOI18N
- btnChooseLocalSynch
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnChooseLocalSynchActionPerformed(evt);
- }
- });
- pnlLocalSynch.add(btnChooseLocalSynch);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.gridwidth = 9;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
- pnlSynchData.add(pnlLocalSynch, gridBagConstraints);
-
- pnlSynchMode.setBorder(javax.swing.BorderFactory
- .createLineBorder(new java.awt.Color(0, 0, 0)));
- pnlSynchMode.setLayout(new java.awt.GridLayout(0, 1));
-
- jLabel1.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.jLabel1.text")); // NOI18N
- pnlSynchMode.add(jLabel1);
-
- buttonGroupSynchMode.add(radioBackup);
- radioBackup.setSelected(true);
- radioBackup.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.radioBackup.text")); // NOI18N
- pnlSynchMode.add(radioBackup);
-
- buttonGroupSynchMode.add(radioFeed);
- radioFeed.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.radioFeed.text")); // NOI18N
- radioFeed.setEnabled(false);
- pnlSynchMode.add(radioFeed);
-
- buttonGroupSynchMode.add(radioSynch);
- radioSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.radioSynch.text")); // NOI18N
- radioSynch.setEnabled(false);
- pnlSynchMode.add(radioSynch);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.gridwidth = 9;
- gridBagConstraints.gridheight = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
- pnlSynchData.add(pnlSynchMode, gridBagConstraints);
-
- pnlSynchFrequency.setBorder(javax.swing.BorderFactory
- .createLineBorder(new java.awt.Color(0, 0, 0)));
- pnlSynchFrequency.setLayout(new java.awt.GridLayout(0, 1));
-
- jLabel5.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.jLabel5.text")); // NOI18N
- pnlSynchFrequency.add(jLabel5);
-
- jcomboSynchFrequency.setModel(new javax.swing.DefaultComboBoxModel(
- new String[] { "Hourly", "Weekly", "Daily",
- "Every 2 Minutes (testing)", "", "" }));
- jcomboSynchFrequency
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.jcomboSynchFrequency.toolTipText")); // NOI18N
- pnlSynchFrequency.add(jcomboSynchFrequency);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.gridwidth = 9;
- gridBagConstraints.gridheight = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
- pnlSynchData.add(pnlSynchFrequency, gridBagConstraints);
-
- txtIrodsPath.setColumns(80);
- txtIrodsPath.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtIrodsPath.text")); // NOI18N
- txtIrodsPath.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.txtIrodsPath.toolTipText")); // NOI18N
- txtIrodsPath.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- txtIrodsPathActionPerformed(evt);
- }
- });
- pnlIrodsSynch.add(txtIrodsPath);
-
- btnChooseIrodsSynch.setMnemonic('i');
- btnChooseIrodsSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChooseIrodsSynch.text")); // NOI18N
- btnChooseIrodsSynch
- .setToolTipText(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnChooseIrodsSynch.toolTipText")); // NOI18N
- btnChooseIrodsSynch
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnChooseIrodsSynchActionPerformed(evt);
- }
- });
- pnlIrodsSynch.add(btnChooseIrodsSynch);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.gridwidth = 9;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
- pnlSynchData.add(pnlIrodsSynch, gridBagConstraints);
-
- pnlConfigSynchDetails.add(pnlSynchData, java.awt.BorderLayout.CENTER);
-
- btnDeleteSynch.setMnemonic('d');
- btnDeleteSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnDeleteSynch.text")); // NOI18N
- btnDeleteSynch.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnDeleteSynch.toolTipText")); // NOI18N
- btnDeleteSynch.setEnabled(false);
- btnDeleteSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnDeleteSynchActionPerformed(evt);
- }
- });
- panelSynchToolbar.add(btnDeleteSynch);
-
- btnNewSynch.setMnemonic('n');
- btnNewSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnNewSynch.text")); // NOI18N
- btnNewSynch.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnNewSynch.toolTipText")); // NOI18N
- btnNewSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnNewSynchActionPerformed(evt);
- }
- });
- panelSynchToolbar.add(btnNewSynch);
-
- btnUpdateSynch.setMnemonic('u');
- btnUpdateSynch.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnUpdateSynch.text")); // NOI18N
- btnUpdateSynch.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnUpdateSynch.toolTipText")); // NOI18N
- btnUpdateSynch.setEnabled(false);
- btnUpdateSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnUpdateSynchActionPerformed(evt);
- }
- });
- panelSynchToolbar.add(btnUpdateSynch);
-
- btnSynchNow.setMnemonic('s');
- btnSynchNow.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnSynchNow.text")); // NOI18N
- btnSynchNow.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnSynchNow.toolTipText")); // NOI18N
- btnSynchNow.setEnabled(false);
- btnSynchNow.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnSynchNowActionPerformed(evt);
- }
- });
- panelSynchToolbar.add(btnSynchNow);
-
- pnlConfigSynchDetails.add(panelSynchToolbar,
- java.awt.BorderLayout.SOUTH);
-
- pnlConfigSynch.add(pnlConfigSynchDetails, java.awt.BorderLayout.SOUTH);
-
- tabConfig
- .addTab(org.openide.util.NbBundle
- .getMessage(IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.pnlConfigSynch.TabConstraints.tabTitle"),
- pnlConfigSynch); // NOI18N
-
- pnlCenter.add(tabConfig);
-
- getContentPane().add(pnlCenter, java.awt.BorderLayout.CENTER);
-
- pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
-
- btnOK.setMnemonic('O');
- btnOK.setText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnOK.text")); // NOI18N
- btnOK.setToolTipText(org.openide.util.NbBundle.getMessage(
- IDROPConfigurationPanel.class,
- "IDROPConfigurationPanel.btnOK.toolTipText")); // NOI18N
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlBottom.add(btnOK);
-
- getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- /**
- * Refresh the displayed synch
- *
- * @param evt
- */
- private void btnRefreshSynchActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRefreshSynchActionPerformed
- refreshSynchConfigPanel();
- }// GEN-LAST:event_btnRefreshSynchActionPerformed
-
- private void checkShowFileProgressActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_checkShowFileProgressActionPerformed
- //
- }// GEN-LAST:event_checkShowFileProgressActionPerformed
-
- private void checkShowGUIItemStateChanged(final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkShowGUIItemStateChanged
-
- boolean isSelected = false;
- if (evt.getStateChange() == ItemEvent.SELECTED) {
- isSelected = true;
- }
- log.info("updating show gui at startup to:{}", isSelected);
- try {
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.SHOW_GUI,
- Boolean.toString(isSelected));
- } catch (IdropException ex) {
- log.error("error setting show gui property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_checkShowGUIItemStateChanged
-
- private void checkShowFileProgressItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkShowFileProgressItemStateChanged
- boolean isSelected = false;
- if (evt.getStateChange() == ItemEvent.SELECTED) {
- isSelected = true;
- }
- log.info("updating show intra-file progress to:{}", isSelected);
- try {
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.INTRA_FILE_STATUS_CALLBACKS,
- Boolean.toString(isSelected));
- idropCore.getIdropConfigurationService()
- .updateJargonPropertiesBasedOnIDROPConfig();
- } catch (Exception ex) {
- log.error("error setting property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_checkShowFileProgressItemStateChanged
-
- private void checkVerifyChecksumOnTransferItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkVerifyChecksumOnTransferItemStateChanged
- updateConfigForGivenPropertyBasedOnCheckboxStateChange(evt,
- IdropConfigurationService.VERIFY_CHECKSUM_ON_TRANSFER);
- }
-
- private void updateConfigForGivenPropertyBasedOnCheckboxStateChange(
- final ItemEvent evt, final String propertyName)
- throws IdropRuntimeException {
- boolean isSelected = false;
- if (evt.getStateChange() == ItemEvent.SELECTED) {
- isSelected = true;
- }
- log.info("updating verify checksum to:{}", isSelected);
- try {
- idropCore.getIdropConfigurationService().updateConfig(propertyName,
- Boolean.toString(isSelected));
- idropCore.getIdropConfigurationService()
- .updateJargonPropertiesBasedOnIDROPConfig();
- } catch (Exception ex) {
- log.error("error setting property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_checkVerifyChecksumOnTransferItemStateChanged
-
- private void checkLogSuccessfulTransferItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkLogSuccessfulTransferItemStateChanged
-
- updateConfigForGivenPropertyBasedOnCheckboxStateChange(
- evt,
- IdropConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
- }// GEN-LAST:event_checkLogSuccessfulTransferItemStateChanged
-
- private void checkUseExecutorPoolItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkUseExecutorPoolItemStateChanged
- updateConfigForGivenPropertyBasedOnCheckboxStateChange(evt,
- IdropConfigurationService.IRODS_PARALLEL_USE_POOL);
- }// GEN-LAST:event_checkUseExecutorPoolItemStateChanged
-
- private void checkAllowReroutingItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkAllowReroutingItemStateChanged
- boolean isSelected = false;
- if (evt.getStateChange() == ItemEvent.SELECTED) {
- isSelected = true;
- }
- log.info("updating allow rerouting to:{}", isSelected);
- try {
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.ALLOW_CONNECTION_REROUTING,
- Boolean.toString(isSelected));
- idropCore.getIdropConfigurationService()
- .updateJargonPropertiesBasedOnIDROPConfig();
- } catch (Exception ex) {
- log.error("error setting property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_checkAllowReroutingItemStateChanged
-
- private void resetTransferPipelineEditColors() {
- txtInternalInputBufferSize.setBackground(Color.white);
- txtInternalOutputBufferSize.setBackground(Color.white);
- txtLocalFileInputBufferSize.setBackground(Color.white);
- txtLocalFileOutputBufferSize.setBackground(Color.white);
- txtGetBufferSize.setBackground(Color.white);
- txtPutBufferSize.setBackground(Color.white);
- txtInputToOutputCopyBufferSize.setBackground(Color.white);
- txtInternalCacheBufferSize.setBackground(Color.white);
- }
-
- /**
- * Update the pipeline configuration information properties based on the
- * screen data
- *
- * @param evt
- */
- private void btnApplyPipelineConfigActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnApplyPipelineConfigActionPerformed
- try {
-
- resetTransferPipelineEditColors();
- // edit and set
-
- // internal input buffer size
- String actual = txtInternalInputBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtInternalInputBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid internal input buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // internal output buffer size
- actual = txtInternalOutputBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtInternalOutputBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid internal output buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // local file input buffer size
- actual = txtLocalFileInputBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtLocalFileInputBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid local file input buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // local file output buffer size
- actual = txtLocalFileOutputBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtLocalFileOutputBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid local file output buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // get buffer size
- actual = txtGetBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_IO_GET_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtGetBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this, "Invalid get buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // put buffer size
- actual = txtPutBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_IO_PUT_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtPutBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this, "Invalid put buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // input to output copy buffer size
- actual = txtInputToOutputCopyBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtInputToOutputCopyBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid input to output copy buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- // internal cache buffer size
- actual = txtInternalCacheBufferSize.getText();
- if (actual.isEmpty()) {
- } else {
- try {
- Integer.parseInt(actual);
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE,
- actual);
- } catch (NumberFormatException nfe) {
- txtInternalCacheBufferSize.setBackground(Color.red);
- MessageManager.showWarning(this,
- "Invalid internal cache buffer size",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- }
-
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_PARALLEL_USE_PARALLEL,
- Boolean.toString(checkAllowParallelTransfers.isSelected()));
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_PARALLEL_USE_NIO,
- Boolean.toString(checkUseNIOForParallelTransfers
- .isSelected()));
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS,
- spinnerIrodsMaxParallelThreads.getValue()
- .toString());
- idropCore
- .getIdropConfigurationService()
- .updateConfig(
- IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT,
- spinnerIrodsParallelSocketTimeout.getValue()
- .toString());
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_CONNECTION_TIMEOUT,
- spinnerIrodsSocketTimeout.getValue().toString());
-
- idropCore.getIdropConfigurationService()
- .updateJargonPropertiesBasedOnIDROPConfig();
- } catch (Exception ex) {
- log.error("error setting property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_btnApplyPipelineConfigActionPerformed
-
- private void btnRestoreDefaultsActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRestoreDefaultsActionPerformed
- log.info("restoring pipeline config to jargon properties settings");
- try {
- JargonProperties defaultJargonProperties = new DefaultPropertiesJargonConfig();
- IdropConfigurationService configService = idropCore
- .getIdropConfigurationService();
- configService
- .restoreIDROPConfigFromJargonProperties(defaultJargonProperties);
- initWithConfigData();
- MessageManager.showMessage(this,
- "Values restored to defaults, hit apply to update",
- MessageManager.TITLE_MESSAGE);
- } catch (JargonException ex) {
- log.error("unable to restore jargon properties", ex);
- throw new IdropRuntimeException(
- "unable to restore jargon properties", ex);
- }
-
- }// GEN-LAST:event_btnRestoreDefaultsActionPerformed
-
- private void comboPrefsDefaultResourceActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_comboPrefsDefaultResourceActionPerformed
- String newResource = (String) comboPrefsDefaultResource
- .getSelectedItem();
- idropCore.getIrodsAccount().setDefaultStorageResource(newResource);
- if (!initializing) {
- idropGui.reinitializeForChangedIRODSAccount();
- } else {
- initializing = false;
- }
- }// GEN-LAST:event_comboPrefsDefaultResourceActionPerformed
-
- private void checkConnectionRestartActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_checkConnectionRestartActionPerformed
-
- }// GEN-LAST:event_checkConnectionRestartActionPerformed
-
- private void checkConnectionRestartItemStateChanged(
- final java.awt.event.ItemEvent evt) {// GEN-FIRST:event_checkConnectionRestartItemStateChanged
- boolean isSelected = false;
- if (evt.getStateChange() == ItemEvent.SELECTED) {
- isSelected = true;
- }
- log.info("updating connection restart to:{}", isSelected);
- try {
- idropCore.getIdropConfigurationService().updateConfig(
- IdropConfigurationService.IRODS_CONNECTION_RESTART,
- Boolean.toString(isSelected));
- idropCore.getIdropConfigurationService()
- .updateJargonPropertiesBasedOnIDROPConfig();
- } catch (Exception ex) {
- log.error("error setting property", ex);
- throw new IdropRuntimeException(ex);
- }
- }// GEN-LAST:event_checkConnectionRestartItemStateChanged
-
- private void btnOKActionPerformed(final java.awt.event.ActionEvent evt) {
- dispose();
- }
-
- private void checkShowGUIActionPerformed(
- final java.awt.event.ActionEvent evt) {
- //
- }
-
- private void checkLogSuccessfulTransferActionPerformed(
- final java.awt.event.ActionEvent evt) {
- //
- }
-
- private void pnlConfigSynchComponentShown(
- final java.awt.event.ComponentEvent evt) {
-
- refreshSynchConfigPanel();
-
- }
-
- private void refreshSynchConfigPanel() {
- log.info("lazily loading synch data");
-
- final IDROPConfigurationPanel thisPanel = this;
-
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
-
- SynchManagerService synchConfigurationService = idropCore
- .getTransferManager().getTransferServiceFactory()
- .instanceSynchManagerService();
-
- try {
- thisPanel.setCursor(Cursor
- .getPredefinedCursor(Cursor.WAIT_CURSOR));
- List<Synchronization> synchronizations = synchConfigurationService
- .listAllSynchronizations();
- SynchConfigTableModel synchConfigTableModel = null;
- if (jTableSynch == null) {
- synchConfigTableModel = new SynchConfigTableModel(
- idropCore, synchronizations);
- jTableSynch = new JTable(synchConfigTableModel);
- jTableSynch
- .getSelectionModel()
- .addListSelectionListener(
- new SynchListSelectionHandler(thisPanel));
- scrollSynchTable.setViewportView(jTableSynch);
- scrollSynchTable.validate();
- pnlConfigSynchListing.validate();
- } else {
- synchConfigTableModel = (SynchConfigTableModel) jTableSynch
- .getModel();
- synchConfigTableModel
- .setSynchronizations(synchronizations);
- synchConfigTableModel.fireTableDataChanged();
- }
-
- if (synchConfigTableModel.getRowCount() > 0) {
- jTableSynch.setRowSelectionInterval(0, 0);
- } else {
- lockSynchPanelForNewOnly();
- }
- } catch (SynchException ex) {
- log.error("error setting up synchs table", ex);
- throw new IdropRuntimeException(ex);
- } finally {
- thisPanel.setCursor(Cursor
- .getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- }
- }
-
- private void lockSynchPanelForNewOnly() {
- clearAndResetSynchPanel();
- setLockStatusSynchPanel(false);
- }
- });
- }
-
- private void txtLocalPathActionPerformed(
- final java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
-
- private void btnChooseLocalSynchActionPerformed(
- final java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- JFileChooser localFileChooser = new JFileChooser();
- localFileChooser.setMultiSelectionEnabled(false);
- localFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
- localFileChooser.showOpenDialog(this);
- txtLocalPath.setText(localFileChooser.getSelectedFile()
- .getAbsolutePath());
- }
-
- private void txtIrodsPathActionPerformed(
- final java.awt.event.ActionEvent evt) {
- // TODO add your handling code here:
- }
-
- private void btnChooseIrodsSynchActionPerformed(
- final java.awt.event.ActionEvent evt) {
- try {
- IRODSFinderDialog irodsFileSystemChooserView = new IRODSFinderDialog(
- null, true, idropCore);
- final Toolkit toolkit = Toolkit.getDefaultToolkit();
- final Dimension screenSize = toolkit.getScreenSize();
- final int x = (screenSize.width - irodsFileSystemChooserView
- .getWidth()) / 2;
- final int y = (screenSize.height - irodsFileSystemChooserView
- .getHeight()) / 2;
- irodsFileSystemChooserView.setLocation(x, y);
- irodsFileSystemChooserView.setVisible(true);
- String absPath = irodsFileSystemChooserView
- .getSelectedAbsolutePath();
- irodsFileSystemChooserView.dispose();
- if (absPath != null) {
- txtIrodsPath.setText(irodsFileSystemChooserView
- .getSelectedAbsolutePath());
- }
-
- // int returnVal = irodsFileChooser.showSaveDialog(this);
- } catch (Exception e) {
- log.error("exception choosings iRODS file");
- throw new IdropRuntimeException("exception choosing irods fie", e);
- } finally {
- idropCore.getIrodsFileSystem().closeAndEatExceptions();
- }
- }
-
- /**
- * Delete the selected synchronization
- *
- * @param evt
- */
- private void btnDeleteSynchActionPerformed(
- final java.awt.event.ActionEvent evt) {
-
- 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));
- SynchManagerService synchConfigurationService = idropCore
- .getTransferManager().getTransferServiceFactory()
- .instanceSynchManagerService();
- log.info("deleting synchronization:{}", synchronization);
-
- if (synchConfigurationService
- .isSynchRunning(synchronization)) {
- MessageManager
- .showMessage(
- thisPanel,
- "Cannot delete the synchronization, a synch is currently running",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- thisPanel.getSynchTable().getSelectionModel();
- SynchConfigTableModel model = (SynchConfigTableModel) thisPanel
- .getSynchTable().getModel();
-
- 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);
- refreshSynchConfigPanel();
- } catch (Exception ex) {
- MessageManager.showError(thisPanel, ex.getMessage(),
- MessageManager.TITLE_MESSAGE);
- } finally {
- thisPanel.setCursor(Cursor
- .getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- idropCore.closeIRODSConnection(idropCore.getIrodsAccount());
- }
- }
- });
- }
-
- /**
- * Called to clear and prepare for adding a new synchronization
- *
- * @param evt
- */
- private void btnNewSynchActionPerformed(final java.awt.event.ActionEvent evt) {
- clearAndResetSynchPanel();
- if (jTableSynch.getModel().getRowCount() > 0) {
- jTableSynch.getSelectionModel().removeIndexInterval(0,
- jTableSynch.getModel().getRowCount() - 1);
- }
- selectedSynchronization = new Synchronization();
- btnDeleteSynch.setEnabled(false);
- btnUpdateSynch.setEnabled(true);
- btnSynchNow.setEnabled(false);
- MessageManager
- .showMessage(
- this,
- "Enter the data for the new Synchronization and press Update to save",
- MessageManager.TITLE_MESSAGE);
- setLockStatusSynchPanel(true);
- btnSynchNow.setEnabled(false);
- btnDeleteSynch.setEnabled(false);
- }
-
- /**
- * User signals that the displayed synchronization should be updated
- *
- * @param evt
- */
- private void btnUpdateSynchActionPerformed(
- final java.awt.event.ActionEvent evt) {
- updateSynch();
- }
-
- private void updateSynch() {
- final IDROPConfigurationPanel thisPanel = this;
-
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
-
- resetSynchPanel();
- if (selectedSynchronization == null) {
- MessageManager.showError(thisPanel,
- "Please select a synchronization from the table",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- if (txtLocalPath.getText().trim().isEmpty()) {
- txtLocalPath.setBackground(Color.RED);
- MessageManager.showError(thisPanel,
- "Please select a local path",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- if (txtIrodsPath.getText().trim().isEmpty()) {
- txtIrodsPath.setBackground(Color.RED);
- MessageManager.showError(thisPanel,
- "Please select an iRODS path",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- if (txtSynchName.getText().trim().isEmpty()) {
- txtSynchName.setBackground(Color.RED);
- MessageManager
- .showError(
- thisPanel,
- "Please enter a unique name for this synchronization",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- boolean isNew = (selectedSynchronization.getId() == null);
- if (isNew) {
- log.info("adding new synch");
- }
-
- SynchManagerService synchConfigurationService = idropCore
- .getTransferManager().getTransferServiceFactory()
- .instanceSynchManagerService();
-
- // edits pass, do update
- log.info("saving synch data");
- Synchronization synchronization = selectedSynchronization;
- synchronization.setUpdatedAt(new Date());
- synchronization.setFrequencyType(getSynchFrequencyFromGUI());
-
- synchronization.setName(txtSynchName.getText().trim());
- synchronization.setSynchronizationMode(getSynchTypeFromGUI());
- synchronization.setLocalSynchDirectory(txtLocalPath.getText()
- .trim());
- synchronization.setIrodsSynchDirectory(txtIrodsPath.getText()
- .trim());
- IRODSAccount irodsAccount = idropCore.getIrodsAccount();
- synchronization.setIrodsHostName(irodsAccount.getHost());
-
- try {
- synchronization.setIrodsPassword(HibernateUtil
- .obfuscate(irodsAccount.getPassword()));
- } catch (JargonException ex) {
- log.error("exception obfuscating password", ex);
- MessageManager.showError(thisPanel, ex.getMessage(),
- MessageManager.TITLE_MESSAGE);
- throw new IdropRuntimeException(ex);
- }
-
- synchronization.setIrodsPort(irodsAccount.getPort());
- synchronization.setIrodsUserName(irodsAccount.getUserName());
- synchronization.setIrodsZone(irodsAccount.getZone());
- synchronization.setDefaultResourceName(irodsAccount
- .getDefaultStorageResource());
- synchronization.setCreatedAt(new Date());
- selectedSynchronization = synchronization;
-
- try {
- thisPanel.setCursor(Cursor
- .getPredefinedCursor(Cursor.WAIT_CURSOR));
- if (synchConfigurationService
- .isSynchRunning(selectedSynchronization)) {
- MessageManager
- .showMessage(
- thisPanel,
- "Cannot update the synchronization, a synch is currently running",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- idropCore.getIdropConfigurationService()
- .updateSynchronization(synchronization);
- MessageManager.showMessage(thisPanel,
- "Configuration updated",
- MessageManager.TITLE_MESSAGE);
- ListSelectionModel lsm = thisPanel.getSynchTable()
- .getSelectionModel();
- SynchConfigTableModel model = (SynchConfigTableModel) thisPanel
- .getSynchTable().getModel();
-
- if (isNew) {
-
- List<Synchronization> synchronizations = synchConfigurationService
- .listAllSynchronizations();
-
- model.setSynchronizations(synchronizations);
- model.fireTableDataChanged();
- } else {
- if (lsm.isSelectionEmpty()) {
- return;
- } else {
- // Find out which indexes are selected.
- int minIndex = lsm.getMinSelectionIndex();
- int maxIndex = lsm.getMaxSelectionIndex();
- for (int i = minIndex; i <= maxIndex; i++) {
- if (lsm.isSelectedIndex(i)) {
- int modelIdx = thisPanel.getSynchTable()
- .convertRowIndexToModel(i);
-
- model.getSynchronizations().set(modelIdx,
- synchronization);
- model.fireTableDataChanged();
- break;
- }
- }
- }
- }
-
- btnDeleteSynch.setEnabled(true);
- btnUpdateSynch.setEnabled(true);
- btnSynchNow.setEnabled(true);
-
- } 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());
- }
- }
- });
- }
-
- /**
- * Force a synchronization process on the selected synchronization
- *
- * @param evt
- */
- private void btnSynchNowActionPerformed(final java.awt.event.ActionEvent evt) {
- log.info("synch now button pressed");
- if (selectedSynchronization == null) {
- MessageManager.showWarning(this, "Please select a synhronization",
- MessageManager.TITLE_MESSAGE);
- return;
- }
-
- log.info("selected synchronization is:{}", selectedSynchronization);
- boolean synchIsUnchanged = checkIfSynchChanged();
-
- if (!synchIsUnchanged) {
- log.info("synch had been changed, update first");
- updateSynch();
- }
-
- int result = JOptionPane
- .showConfirmDialog(this, "Synchronize?",
- "Do you want to synchronize now?",
- JOptionPane.OK_CANCEL_OPTION);
- if (result == JOptionPane.OK_OPTION) {
- try {
- SynchManagerService synchConfigurationService = idropCore
- .getTransferManager().getTransferServiceFactory()
- .instanceSynchManagerService();
-
- if (synchConfigurationService
- .isSynchRunning(selectedSynchronization)) {
- MessageManager
- .showMessage(
- this,
- "Cannot schedule the synchronization, a synch is currently running",
- MessageManager.TITLE_MESSAGE);
- return;
- }
- idropCore.getTransferManager().enqueueASynch(
- selectedSynchronization,
- selectedSynchronization
- .buildIRODSAccountFromSynchronizationData());
- } catch (Exception ex) {
- log.error("error starting synch", ex);
- MessageManager.showError(this, ex.getMessage(),
- MessageManager.TITLE_MESSAGE);
- throw new IdropRuntimeException(ex);
- }
- }
- }
-
- private void checkVerifyChecksumOnTransferActionPerformed(
- final java.awt.event.ActionEvent evt) {
- //
- }
-
- private void btnLogoutActionPerformed(final java.awt.event.ActionEvent evt) {
- log.info("logging out to log in to a new grid");
-
- final IDROPConfigurationPanel thisPanel = this;
-
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
-
- IRODSAccount savedAccount = idropCore.getIrodsAccount();
- idropCore.setIrodsAccount(null);
- iDrop idrop = (iDrop) thisPanel.getParent();
- LoginDialog loginDialog = new LoginDialog(thisPanel, idropCore);
- loginDialog.setVisible(true);
-
- if (idropCore.getIrodsAccount() == null) {
- log.warn("no account, reverting");
- idropCore.setIrodsAccount(savedAccount);
- } else {
- idrop.reinitializeForChangedIRODSAccount();
- }
- refreshAccountData();
- }
- });
-
- }
-
- private void btnChangePasswordActionPerformed(
- final java.awt.event.ActionEvent evt) {
- ChangePasswordDialog changePasswordDialog = new ChangePasswordDialog(
- (iDrop) getParent(), this, true);
- changePasswordDialog.setLocationRelativeTo(this);
- changePasswordDialog.setVisible(true);
- }
-
- protected JTable getSynchTable() {
- return jTableSynch;
- }
-
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnApplyPipelineConfig;
- private javax.swing.JButton btnChangePassword;
- private javax.swing.JButton btnChooseIrodsSynch;
- private javax.swing.JButton btnChooseLocalSynch;
- private javax.swing.JButton btnDeleteSynch;
- private javax.swing.JButton btnLogout;
- private javax.swing.JButton btnNewSynch;
- private javax.swing.JButton btnOK;
- private javax.swing.JButton btnRefreshSynch;
- private javax.swing.JButton btnRestoreDefaults;
- private javax.swing.JButton btnSynchNow;
- private javax.swing.JButton btnUpdateSynch;
- private javax.swing.ButtonGroup buttonGroupSynchMode;
- private javax.swing.JCheckBox checkAllowParallelTransfers;
- private javax.swing.JCheckBox checkAllowRerouting;
- private javax.swing.JCheckBox checkConnectionRestart;
- private javax.swing.JCheckBox checkLogSuccessfulTransfer;
- private javax.swing.JCheckBox checkShowFileProgress;
- private javax.swing.JCheckBox checkShowGUI;
- private javax.swing.JCheckBox checkUseExecutorPool;
- private javax.swing.JCheckBox checkUseNIOForParallelTransfers;
- private javax.swing.JCheckBox checkVerifyChecksumOnTransfer;
- private javax.swing.JComboBox comboPrefsDefaultResource;
- private javax.swing.JLabel jLabel1;
- private javax.swing.JLabel jLabel5;
- private javax.swing.JComboBox jcomboSynchFrequency;
- private javax.swing.JLabel lblGetBufferSize;
- private javax.swing.JLabel lblHost;
- private javax.swing.JLabel lblHostLabel;
- private javax.swing.JLabel lblInternalCacheBufferSize;
- private javax.swing.JLabel lblInternalInputBufferSize;
- private javax.swing.JLabel lblInternalOutputBufferSize;
- private javax.swing.JLabel lblIputToOutputCopyBufferSize;
- private javax.swing.JLabel lblIrodsParallelSocketTimeout;
- private javax.swing.JLabel lblIrodsSocketTimeout;
- private javax.swing.JLabel lblLocalFileInputBufferSize;
- private javax.swing.JLabel lblLocalFileOutputBufferSize;
- private javax.swing.JLabel lblMaximumParallelTransferThreads;
- private javax.swing.JLabel lblPort;
- private javax.swing.JLabel lblPortLabel;
- private javax.swing.JLabel lblPutBufferSize;
- private javax.swing.JLabel lblResourceLabel;
- private javax.swing.JLabel lblSynchDate;
- private javax.swing.JLabel lblSynchDateLabel;
- private javax.swing.JLabel lblSynchName;
- private javax.swing.JLabel lblSynchStatus;
- private javax.swing.JLabel lblUserName;
- private javax.swing.JLabel lblUserNameLabel;
- private javax.swing.JLabel lblZone;
- private javax.swing.JLabel lblZoneLabel;
- private javax.swing.JPanel panelSynchToolbar;
- private javax.swing.JPanel plnPipelineConfiguration;
- private javax.swing.JPanel pnlBottom;
- private javax.swing.JPanel pnlBuffers;
- private javax.swing.JPanel pnlCenter;
- private javax.swing.JPanel pnlConfigGrids;
- private javax.swing.JPanel pnlConfigIdrop;
- private javax.swing.JPanel pnlConfigSynch;
- private javax.swing.JPanel pnlConfigSynchDetails;
- private javax.swing.JPanel pnlConfigSynchListing;
- private javax.swing.JPanel pnlConfigTransfers;
- private javax.swing.JPanel pnlCurrentGrid;
- private javax.swing.JPanel pnlCurrentGridToolbar;
- private javax.swing.JPanel pnlIrodsSynch;
- private javax.swing.JPanel pnlLocalSynch;
- private javax.swing.JPanel pnlParallelTransferOptions;
- private javax.swing.JPanel pnlSynchData;
- private javax.swing.JPanel pnlSynchFrequency;
- private javax.swing.JPanel pnlSynchIcon;
- private javax.swing.JPanel pnlSynchMode;
- private javax.swing.JPanel pnlSynchName;
- private javax.swing.JPanel pnlSynchRefresh;
- private javax.swing.JPanel pnlTop;
- private javax.swing.JPanel pnlTransferManagement;
- private javax.swing.JRadioButton radioBackup;
- private javax.swing.JRadioButton radioFeed;
- private javax.swing.JRadioButton radioSynch;
- private javax.swing.JScrollPane scrollSynchTable;
- private javax.swing.JSpinner spinnerIrodsMaxParallelThreads;
- private javax.swing.JSpinner spinnerIrodsParallelSocketTimeout;
- private javax.swing.JSpinner spinnerIrodsSocketTimeout;
- private javax.swing.JTabbedPane tabConfig;
- private javax.swing.JTextField txtGetBufferSize;
- private javax.swing.JTextField txtInputToOutputCopyBufferSize;
- private javax.swing.JTextField txtInternalCacheBufferSize;
- private javax.swing.JTextField txtInternalInputBufferSize;
- private javax.swing.JTextField txtInternalOutputBufferSize;
- private javax.swing.JTextField txtIrodsPath;
- private javax.swing.JTextField txtLocalFileInputBufferSize;
- private javax.swing.JTextField txtLocalFileOutputBufferSize;
- private javax.swing.JTextField txtLocalPath;
- private javax.swing.JTextField txtPutBufferSize;
- private javax.swing.JTextField txtSynchName;
-
- // End of variables declaration//GEN-END:variables
-
- private void initWithConfigData() {
- resetTransferPipelineEditColors();
- IdropConfig idropConfig = idropCore.getIdropConfig();
- checkShowGUI.setSelected(idropConfig.isShowGuiAtStartup());
- checkLogSuccessfulTransfer.setSelected(idropConfig
- .isLogSuccessfulTransfers());
- checkUseExecutorPool.setSelected(idropConfig.isParallelUsePool());
- checkVerifyChecksumOnTransfer.setSelected(idropConfig
- .isVerifyChecksum());
- checkShowFileProgress.setSelected(idropConfig
- .isIntraFileStatusCallbacks());
- checkAllowRerouting.setSelected(idropConfig
- .isAllowConnectionRerouting());
- checkUseExecutorPool.setSelected(idropConfig.isParallelUsePool());
- spinnerIrodsSocketTimeout.setValue(idropConfig
- .getIrodsConnectionTimeout());
- spinnerIrodsParallelSocketTimeout.setValue(idropConfig
- .getIrodsParallelConnectionTimeout());
- spinnerIrodsMaxParallelThreads.setValue(idropConfig
- .getIrodsParallelTransferMaxThreads());
- checkAllowParallelTransfers.setSelected(idropConfig
- .isUseParallelTransfers());
- checkConnectionRestart.setSelected(idropConfig.isConnectionRestart());
- checkUseNIOForParallelTransfers.setSelected(idropConfig
- .isUseNIOForParallelTransfers());
- txtInternalInputBufferSize.setText(String.valueOf(idropConfig
- .getInternalInputStreamBufferSize()));
- txtInternalOutputBufferSize.setText(String.valueOf(idropConfig
- .getInternalOutputStreamBufferSize()));
- txtLocalFileInputBufferSize.setText(String.valueOf(idropConfig
- .getLocalFileInputStreamBufferSize()));
- txtLocalFileOutputBufferSize.setText(String.valueOf(idropConfig
- .getLocalFileOutputStreamBufferSize()));
- txtGetBufferSize
- .setText(String.valueOf(idropConfig.getGetBufferSize()));
- txtPutBufferSize
- .setText(String.valueOf(idropConfig.getPutBufferSize()));
- txtInputToOutputCopyBufferSize.setText(String.valueOf(idropConfig
- .getInputToOutputCopyBufferByteSize()));
- txtInternalCacheBufferSize.setText(String.valueOf(idropConfig
- .getInternalCacheBufferSize()));
- refreshAccountData();
- }
-
- /**
- * Reset colors in synch panel when re-validating
- */
- private void resetSynchPanel() {
- txtLocalPath.setBackground(Color.WHITE);
- txtIrodsPath.setBackground(Color.WHITE);
- txtSynchName.setBackground(Color.WHITE);
- }
-
- /**
- * Clear synch panel values and colors
- */
- private void clearAndResetSynchPanel() {
- resetSynchPanel();
- txtLocalPath.setText("");
- txtIrodsPath.setText("");
- txtSynchName.setText("");
- radioBackup.setSelected(true);
- lblSynchDate.setText("");
- pnlSynchIcon.removeAll();
- pnlSynchIcon.validate();
- jcomboSynchFrequency.setSelectedIndex(0);
- }
-
- private void refreshAccountData() {
-
- if (idropCore.getIrodsAccount() == null) {
- lblHost.setText("");
- lblPort.setText("");
- lblZone.setText("");
- comboPrefsDefaultResource.setModel(new DefaultComboBoxModel());
- lblUserName.setText("");
- } else {
- lblHost.setText(idropCore.getIrodsAccount().getHost());
- lblPort.setText(String.valueOf(idropCore.getIrodsAccount()
- .getPort()));
- lblZone.setText(idropCore.getIrodsAccount().getZone());
- lblUserName.setText(idropCore.getIrodsAccount().getUserName());
- try {
- ResourceAO resourceAO = idropCore.getIRODSAccessObjectFactory()
- .getResourceAO(idropCore.getIrodsAccount());
- log.info("getting a list of all resources in the zone");
- List<String> resources = resourceAO.listResourceNames();
- comboPrefsDefaultResource.setModel(new DefaultComboBoxModel(
- resources.toArray()));
- comboPrefsDefaultResource.setSelectedItem(idropCore
- .getIrodsAccount().getDefaultStorageResource());
- } catch (JargonException ex) {
- log.error("error getting resource list", ex);
- throw new IdropRuntimeException("error getting resource list",
- ex);
- }
- }
- // check to see if default resource editing is allowed
- String allowEdit = idropCore.getIdropConfig().getPropertyForKey(
- IdropConfigurationService.IDROP_ENABLE_RESC_EDIT);
- if (allowEdit != null && allowEdit.equals("false")) {
- comboPrefsDefaultResource.setEnabled(false);
- }
- }
-
- protected void updateDetailsForSelectedSynch(final int i) {
- // make sure the most up-to-date information is displayed
- int modelIdx = getSynchTable().convertRowIndexToModel(i);
- SynchConfigTableModel model = (SynchConfigTableModel) getSynchTable()
- .getModel();
-
- selectedSynchronization = model.getSynchronizationAt(modelIdx);
-
- if (selectedSynchronization == null) {
- model.removeRow(modelIdx);
- return;
- }
-
- // initialize data
- txtLocalPath.setText(selectedSynchronization.getLocalSynchDirectory());
- txtIrodsPath.setText(selectedSynchronization.getIrodsSynchDirectory());
- txtSynchName.setText(selectedSynchronization.getName());
-
- if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_HOUR) {
- jcomboSynchFrequency.setSelectedIndex(0);
- } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_WEEK) {
- jcomboSynchFrequency.setSelectedIndex(1);
- } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_DAY) {
- jcomboSynchFrequency.setSelectedIndex(2);
- } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_TWO_MINUTES) {
- jcomboSynchFrequency.setSelectedIndex(3);
- } else {
- // default to hourly to avoid errors
- log.error("unknown frequency type for synch:{}",
- selectedSynchronization.getFrequencyType());
- jcomboSynchFrequency.setSelectedIndex(0);
- }
-
- if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.BI_DIRECTIONAL) {
- radioSynch.setSelected(true);
- } else if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_IRODS_TO_LOCAL) {
- radioFeed.setSelected(true);
- } else if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_LOCAL_TO_IRODS) {
- radioBackup.setSelected(true);
- } else {
- log.error("unknown synchronization mode for synch:{}",
- selectedSynchronization.getSynchronizationMode());
- throw new IdropRuntimeException("unknown synchronization mode");
- }
-
- btnDeleteSynch.setEnabled(true);
- btnUpdateSynch.setEnabled(true);
- btnSynchNow.setEnabled(true);
-
- setSynchIcon(selectedSynchronization);
- if (selectedSynchronization.getLastSynchronized() == null) {
- lblSynchDate.setText("None");
- } else {
- lblSynchDate.setText(dateFormat.format(selectedSynchronization
- .getLastSynchronized()));
- }
-
- }
-
- protected void setLockStatusSynchPanel(final boolean lockStatus) {
- txtSynchName.setEnabled(lockStatus);
- txtLocalPath.setEnabled(lockStatus);
- btnChooseLocalSynch.setEnabled(lockStatus);
- radioBackup.setEnabled(lockStatus);
- // radioFeed.setEnabled(lockStatus);
- // radioSynch.setEnabled(lockStatus);
- jcomboSynchFrequency.setEnabled(lockStatus);
- txtIrodsPath.setEnabled(lockStatus);
- btnChooseIrodsSynch.setEnabled(lockStatus);
- btnDeleteSynch.setEnabled(lockStatus);
- btnUpdateSynch.setEnabled(lockStatus);
- btnSynchNow.setEnabled(lockStatus);
- // btnSynchDetails.setEnabled(lockStatus);
- }
-
- private void setSynchIcon(final Synchronization synchronization) {
-
- JLabel labelToUse = null;
-
- SynchManagerService synchManagerService = idropCore
- .getTransferManager().getTransferServiceFactory()
- .instanceSynchManagerService();
- try {
- boolean isRunning = synchManagerService
- .isSynchRunning(synchronization);
- if (isRunning) {
- labelToUse = IconHelper.getRunningIcon();
- } else if (synchronization.getLastSynchronizationStatus() == null) {
- labelToUse = IconHelper.getOkIcon();
- } else if (synchronization.getLastSynchronizationStatus() == TransferStatus.ERROR) {
- labelToUse = IconHelper.getErrorIcon();
- } else {
- labelToUse = IconHelper.getOkIcon();
- }
- } catch (SynchException ex) {
- log.error("error checking if synch is already running:{}",
- synchronization, ex);
- throw new IdropRuntimeException(
- "exception checking if synch is already running", ex);
- }
-
- pnlSynchIcon.removeAll();
- lblSynchStatus = labelToUse;
- pnlSynchIcon.add(lblSynchStatus);
- pnlSynchIcon.validate();
-
- }
+ private final IDROPCore idropCore;
+ private static final org.slf4j.Logger log = LoggerFactory.getLogger(IDROPConfigurationPanel.class);
+ private JTable jTableSynch = null;
+ private Synchronization selectedSynchronization = null;
+ private DateFormat dateFormat = SimpleDateFormat.getDateTimeInstance();
+ private final iDrop idropGui;
+
+ /**
+ * Creates new form IDROPConfigurationPanel
+ */
+ public IDROPConfigurationPanel(java.awt.Frame parent, boolean modal, IDROPCore idropCore) {
+ super(parent, modal);
+ this.idropCore = idropCore;
+ this.idropGui = (iDrop) parent;
+ initComponents();
+ initPublicLinkComponents();
+ initWithConfigData();
+ }
+
+ private void initPublicLinkComponents(){
+ pnlConfigPublicLinks = new JPanel();
+ pnlConfigPublicLinks.setLayout(new FlowLayout());
+ txtPublicLinks = new JTextField("",30);
+
+ txtPublicLinks.addFocusListener(new FocusListener() {
+
+ @Override
+ public void focusGained(FocusEvent focusEvent) {
+ //noting to do
+ }
+
+ @Override
+ public void focusLost(FocusEvent focusEvent) {
+ JTextField tgt = (JTextField) focusEvent.getSource();
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IDROP_PUBLIC_LINK_SERVICE, tgt.getText());
+ } catch (IdropException e) {
+ throw new IdropRuntimeException(e);
+ }
+ }
+
+ });
+ pnlConfigPublicLinks.add(txtPublicLinks);
+ tabConfig.addTab("Public links", pnlConfigPublicLinks);
+ }
+
+ private boolean checkIfSynchChanged() throws IdropRuntimeException {
+ // compare data and update synch first if necessary
+
+ boolean areEqual = true;
+
+ if (!selectedSynchronization.getLocalSynchDirectory().equals(txtLocalPath.getText())) {
+ areEqual = false;
+ }
+
+ if (!selectedSynchronization.getName().equals(txtSynchName.getText())) {
+ areEqual = false;
+ }
+
+ if (!selectedSynchronization.getIrodsSynchDirectory().equals(txtIrodsPath.getText())) {
+ areEqual = false;
+ }
+
+ SynchronizationType currentSynchronizationType = getSynchTypeFromGUI();
+
+ if (currentSynchronizationType != selectedSynchronization.getSynchronizationMode()) {
+ areEqual = false;
+ }
+
+ FrequencyType currentFrequencyType = null;
+ currentFrequencyType = getSynchFrequencyFromGUI();
+
+ if (selectedSynchronization.getFrequencyType() != currentFrequencyType) {
+ areEqual = false;
+ }
+
+ return areEqual;
+ }
+
+ private FrequencyType getSynchFrequencyFromGUI() {
+ FrequencyType currentFrequencyType = null;
+ if (jcomboSynchFrequency.getSelectedIndex() == 0) {
+ currentFrequencyType = FrequencyType.EVERY_HOUR;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 1) {
+ currentFrequencyType = FrequencyType.EVERY_WEEK;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 2) {
+ currentFrequencyType = FrequencyType.EVERY_DAY;
+ } else if (jcomboSynchFrequency.getSelectedIndex() == 3) {
+ currentFrequencyType = FrequencyType.EVERY_TWO_MINUTES;
+ }
+ return currentFrequencyType;
+ }
+
+ private SynchronizationType getSynchTypeFromGUI() throws IdropRuntimeException {
+ SynchronizationType currentSynchronizationType;
+ if (radioBackup.isSelected()) {
+ currentSynchronizationType = SynchronizationType.ONE_WAY_LOCAL_TO_IRODS;
+ } else if (radioFeed.isSelected()) {
+ currentSynchronizationType = SynchronizationType.ONE_WAY_IRODS_TO_LOCAL;
+ } else if (radioSynch.isSelected()) {
+ currentSynchronizationType = SynchronizationType.BI_DIRECTIONAL;
+ } else {
+ log.error("unknown synchronization type in GUI");
+ throw new IdropRuntimeException("unknown synchroization type in GUI");
+ }
+ return currentSynchronizationType;
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form. WARNING: Do NOT
+ * modify this code. The content of this method is always regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ buttonGroupSynchMode = new javax.swing.ButtonGroup();
+ pnlTop = new javax.swing.JPanel();
+ pnlCenter = new javax.swing.JPanel();
+ tabConfig = new javax.swing.JTabbedPane();
+ pnlConfigIdrop = new javax.swing.JPanel();
+ checkShowGUI = new javax.swing.JCheckBox();
+ checkShowFileProgress = new javax.swing.JCheckBox();
+ pnlConfigGrids = new javax.swing.JPanel();
+ pnlCurrentGrid = new javax.swing.JPanel();
+ lblHostLabel = new javax.swing.JLabel();
+ lblHost = new javax.swing.JLabel();
+ lblPortLabel = new javax.swing.JLabel();
+ lblPort = new javax.swing.JLabel();
+ lblZoneLabel = new javax.swing.JLabel();
+ lblZone = new javax.swing.JLabel();
+ lblResourceLabel = new javax.swing.JLabel();
+ lblUserNameLabel = new javax.swing.JLabel();
+ lblUserName = new javax.swing.JLabel();
+ pnlCurrentGridToolbar = new javax.swing.JPanel();
+ btnLogout = new javax.swing.JButton();
+ btnChangePassword = new javax.swing.JButton();
+ comboPrefsDefaultResource = new javax.swing.JComboBox();
+ pnlConfigTransfers = new javax.swing.JPanel();
+ pnlTransferManagement = new javax.swing.JPanel();
+ checkLogSuccessfulTransfer = new javax.swing.JCheckBox();
+ checkVerifyChecksumOnTransfer = new javax.swing.JCheckBox();
+ checkAllowRerouting = new javax.swing.JCheckBox();
+ checkConnectionRestart = new javax.swing.JCheckBox();
+ plnPipelineConfiguration = new javax.swing.JPanel();
+ lblIrodsSocketTimeout = new javax.swing.JLabel();
+ spinnerIrodsSocketTimeout = new javax.swing.JSpinner();
+ pnlParallelTransferOptions = new javax.swing.JPanel();
+ checkAllowParallelTransfers = new javax.swing.JCheckBox();
+ checkUseNIOForParallelTransfers = new javax.swing.JCheckBox();
+ checkUseExecutorPool = new javax.swing.JCheckBox();
+ lblIrodsParallelSocketTimeout = new javax.swing.JLabel();
+ spinnerIrodsParallelSocketTimeout = new javax.swing.JSpinner();
+ lblMaximumParallelTransferThreads = new javax.swing.JLabel();
+ spinnerIrodsMaxParallelThreads = new javax.swing.JSpinner();
+ pnlBuffers = new javax.swing.JPanel();
+ lblInternalInputBufferSize = new javax.swing.JLabel();
+ txtInternalInputBufferSize = new javax.swing.JTextField();
+ lblInternalOutputBufferSize = new javax.swing.JLabel();
+ txtInternalOutputBufferSize = new javax.swing.JTextField();
+ lblLocalFileInputBufferSize = new javax.swing.JLabel();
+ txtLocalFileInputBufferSize = new javax.swing.JTextField();
+ lblLocalFileOutputBufferSize = new javax.swing.JLabel();
+ txtLocalFileOutputBufferSize = new javax.swing.JTextField();
+ lblPutBufferSize = new javax.swing.JLabel();
+ txtPutBufferSize = new javax.swing.JTextField();
+ lblGetBufferSize = new javax.swing.JLabel();
+ txtGetBufferSize = new javax.swing.JTextField();
+ lblIputToOutputCopyBufferSize = new javax.swing.JLabel();
+ txtInputToOutputCopyBufferSize = new javax.swing.JTextField();
+ lblInternalCacheBufferSize = new javax.swing.JLabel();
+ txtInternalCacheBufferSize = new javax.swing.JTextField();
+ btnRestoreDefaults = new javax.swing.JButton();
+ btnApplyPipelineConfig = new javax.swing.JButton();
+ pnlConfigSynch = new javax.swing.JPanel();
+ pnlConfigSynchListing = new javax.swing.JPanel();
+ pnlSynchRefresh = new javax.swing.JPanel();
+ btnRefreshSynch = new javax.swing.JButton();
+ scrollSynchTable = new javax.swing.JScrollPane();
+ pnlConfigSynchDetails = new javax.swing.JPanel();
+ pnlSynchData = new javax.swing.JPanel();
+ pnlSynchName = new javax.swing.JPanel();
+ lblSynchName = new javax.swing.JLabel();
+ txtSynchName = new javax.swing.JTextField();
+ lblSynchDateLabel = new javax.swing.JLabel();
+ lblSynchDate = new javax.swing.JLabel();
+ pnlSynchIcon = new javax.swing.JPanel();
+ lblSynchStatus = new javax.swing.JLabel();
+ pnlLocalSynch = new javax.swing.JPanel();
+ txtLocalPath = new javax.swing.JTextField();
+ btnChooseLocalSynch = new javax.swing.JButton();
+ pnlSynchMode = new javax.swing.JPanel();
+ jLabel1 = new javax.swing.JLabel();
+ radioBackup = new javax.swing.JRadioButton();
+ radioFeed = new javax.swing.JRadioButton();
+ radioSynch = new javax.swing.JRadioButton();
+ pnlSynchFrequency = new javax.swing.JPanel();
+ jLabel5 = new javax.swing.JLabel();
+ jcomboSynchFrequency = new javax.swing.JComboBox();
+ pnlIrodsSynch = new javax.swing.JPanel();
+ txtIrodsPath = new javax.swing.JTextField();
+ btnChooseIrodsSynch = new javax.swing.JButton();
+ panelSynchToolbar = new javax.swing.JPanel();
+ btnDeleteSynch = new javax.swing.JButton();
+ btnNewSynch = new javax.swing.JButton();
+ btnUpdateSynch = new javax.swing.JButton();
+ btnSynchNow = new javax.swing.JButton();
+ pnlBottom = new javax.swing.JPanel();
+ btnOK = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.title")); // NOI18N
+
+ org.jdesktop.layout.GroupLayout pnlTopLayout = new org.jdesktop.layout.GroupLayout(pnlTop);
+ pnlTop.setLayout(pnlTopLayout);
+ pnlTopLayout.setHorizontalGroup(
+ pnlTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 1067, Short.MAX_VALUE)
+ );
+ pnlTopLayout.setVerticalGroup(
+ pnlTopLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 0, Short.MAX_VALUE)
+ );
+
+ getContentPane().add(pnlTop, java.awt.BorderLayout.NORTH);
+
+ pnlConfigIdrop.setLayout(new java.awt.GridBagLayout());
+
+ checkShowGUI.setMnemonic('s');
+ checkShowGUI.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkShowGUI.text")); // NOI18N
+ checkShowGUI.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkShowGUI.toolTipText")); // NOI18N
+ checkShowGUI.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkShowGUIItemStateChanged(evt);
+ }
+ });
+ checkShowGUI.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkShowGUIActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlConfigIdrop.add(checkShowGUI, gridBagConstraints);
+
+ checkShowFileProgress.setMnemonic('w');
+ checkShowFileProgress.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkShowFileProgress.text")); // NOI18N
+ checkShowFileProgress.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkShowFileProgress.toolTipText")); // NOI18N
+ checkShowFileProgress.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkShowFileProgressItemStateChanged(evt);
+ }
+ });
+ checkShowFileProgress.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkShowFileProgressActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlConfigIdrop.add(checkShowFileProgress, gridBagConstraints);
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle"), pnlConfigIdrop); // NOI18N
+
+ pnlConfigGrids.setLayout(new java.awt.BorderLayout());
+
+ pnlCurrentGrid.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlCurrentGrid.border.title"))); // NOI18N
+ pnlCurrentGrid.setLayout(new java.awt.GridBagLayout());
+
+ lblHostLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblHostLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblHostLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblHostLabel, gridBagConstraints);
+
+ lblHost.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblHost.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblHost, gridBagConstraints);
+ lblHost.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblHost.AccessibleContext.accessibleDescription")); // NOI18N
+
+ lblPortLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblPortLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPortLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblPortLabel, gridBagConstraints);
+
+ lblPort.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPort.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblPort, gridBagConstraints);
+ lblPort.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPort.AccessibleContext.accessibleDescription")); // NOI18N
+
+ lblZoneLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblZoneLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblZoneLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblZoneLabel, gridBagConstraints);
+
+ lblZone.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblZone.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblZone, gridBagConstraints);
+ lblZone.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblZone.AccessibleContext.accessibleDescription")); // NOI18N
+
+ lblResourceLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblResourceLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblResourceLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblResourceLabel, gridBagConstraints);
+
+ lblUserNameLabel.setFont(new java.awt.Font("Lucida Grande", 1, 13)); // NOI18N
+ lblUserNameLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblUserNameLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlCurrentGrid.add(lblUserNameLabel, gridBagConstraints);
+
+ lblUserName.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblUserName.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(lblUserName, gridBagConstraints);
+ lblUserName.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblUserName.AccessibleContext.accessibleName")); // NOI18N
+
+ btnLogout.setMnemonic('l');
+ btnLogout.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnLogout.text")); // NOI18N
+ btnLogout.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnLogout.toolTipText")); // NOI18N
+ btnLogout.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnLogoutActionPerformed(evt);
+ }
+ });
+ pnlCurrentGridToolbar.add(btnLogout);
+
+ btnChangePassword.setMnemonic('c');
+ btnChangePassword.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChangePassword.text")); // NOI18N
+ btnChangePassword.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChangePassword.toolTipText")); // NOI18N
+ btnChangePassword.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnChangePasswordActionPerformed(evt);
+ }
+ });
+ pnlCurrentGridToolbar.add(btnChangePassword);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.insets = new java.awt.Insets(20, 0, 0, 0);
+ pnlCurrentGrid.add(pnlCurrentGridToolbar, gridBagConstraints);
+
+ comboPrefsDefaultResource.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
+ comboPrefsDefaultResource.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ comboPrefsDefaultResourceActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlCurrentGrid.add(comboPrefsDefaultResource, gridBagConstraints);
+
+ pnlConfigGrids.add(pnlCurrentGrid, java.awt.BorderLayout.CENTER);
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle"), pnlConfigGrids); // NOI18N
+
+ pnlConfigTransfers.setLayout(new java.awt.GridBagLayout());
+
+ pnlTransferManagement.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlTransferManagement.border.title"))); // NOI18N
+ pnlTransferManagement.setLayout(new javax.swing.BoxLayout(pnlTransferManagement, javax.swing.BoxLayout.PAGE_AXIS));
+
+ checkLogSuccessfulTransfer.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkLogSuccessfulTransfer.text")); // NOI18N
+ checkLogSuccessfulTransfer.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkLogSuccessfulTransfer.toolTipText")); // NOI18N
+ checkLogSuccessfulTransfer.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkLogSuccessfulTransferItemStateChanged(evt);
+ }
+ });
+ checkLogSuccessfulTransfer.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkLogSuccessfulTransferActionPerformed(evt);
+ }
+ });
+ pnlTransferManagement.add(checkLogSuccessfulTransfer);
+
+ checkVerifyChecksumOnTransfer.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkVerifyChecksumOnTransfer.text")); // NOI18N
+ checkVerifyChecksumOnTransfer.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkVerifyChecksumOnTransferItemStateChanged(evt);
+ }
+ });
+ checkVerifyChecksumOnTransfer.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkVerifyChecksumOnTransferActionPerformed(evt);
+ }
+ });
+ pnlTransferManagement.add(checkVerifyChecksumOnTransfer);
+
+ checkAllowRerouting.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkAllowRerouting.text")); // NOI18N
+ checkAllowRerouting.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkAllowRerouting.toolTipText")); // NOI18N
+ checkAllowRerouting.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkAllowReroutingItemStateChanged(evt);
+ }
+ });
+ pnlTransferManagement.add(checkAllowRerouting);
+
+ checkConnectionRestart.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkConnectionRestart.text")); // NOI18N
+ checkConnectionRestart.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkConnectionRestart.toolTipText")); // NOI18N
+ checkConnectionRestart.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkConnectionRestartItemStateChanged(evt);
+ }
+ });
+ checkConnectionRestart.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkConnectionRestartActionPerformed(evt);
+ }
+ });
+ pnlTransferManagement.add(checkConnectionRestart);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.gridheight = java.awt.GridBagConstraints.RELATIVE;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ pnlConfigTransfers.add(pnlTransferManagement, gridBagConstraints);
+
+ plnPipelineConfiguration.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.plnPipelineConfiguration.border.title"))); // NOI18N
+ plnPipelineConfiguration.setLayout(new java.awt.GridBagLayout());
+
+ lblIrodsSocketTimeout.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblIrodsSocketTimeout.text")); // NOI18N
+ lblIrodsSocketTimeout.setPreferredSize(null);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ plnPipelineConfiguration.add(lblIrodsSocketTimeout, gridBagConstraints);
+
+ spinnerIrodsSocketTimeout.setModel(new javax.swing.SpinnerNumberModel(0, 0, 600, 10));
+ spinnerIrodsSocketTimeout.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.spinnerIrodsSocketTimeout.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ plnPipelineConfiguration.add(spinnerIrodsSocketTimeout, gridBagConstraints);
+
+ pnlParallelTransferOptions.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlParallelTransferOptions.border.title"))); // NOI18N
+ pnlParallelTransferOptions.setLayout(new java.awt.GridBagLayout());
+
+ checkAllowParallelTransfers.setMnemonic('p');
+ checkAllowParallelTransfers.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkAllowParallelTransfers.text")); // NOI18N
+ checkAllowParallelTransfers.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkAllowParallelTransfers.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.gridwidth = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlParallelTransferOptions.add(checkAllowParallelTransfers, gridBagConstraints);
+
+ checkUseNIOForParallelTransfers.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkUseNIOForParallelTransfers.text")); // NOI18N
+ checkUseNIOForParallelTransfers.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkUseNIOForParallelTransfers.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridwidth = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlParallelTransferOptions.add(checkUseNIOForParallelTransfers, gridBagConstraints);
+
+ checkUseExecutorPool.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.checkUseExecutorPool.text")); // NOI18N
+ checkUseExecutorPool.addItemListener(new java.awt.event.ItemListener() {
+ public void itemStateChanged(java.awt.event.ItemEvent evt) {
+ checkUseExecutorPoolItemStateChanged(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlParallelTransferOptions.add(checkUseExecutorPool, gridBagConstraints);
+
+ lblIrodsParallelSocketTimeout.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblIrodsParallelSocketTimeout.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ gridBagConstraints.insets = new java.awt.Insets(28, 0, 0, 0);
+ pnlParallelTransferOptions.add(lblIrodsParallelSocketTimeout, gridBagConstraints);
+
+ spinnerIrodsParallelSocketTimeout.setModel(new javax.swing.SpinnerNumberModel(0, 0, 600, 10));
+ spinnerIrodsParallelSocketTimeout.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.spinnerIrodsParallelSocketTimeout.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.ipadx = 159;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(22, 0, 0, 0);
+ pnlParallelTransferOptions.add(spinnerIrodsParallelSocketTimeout, gridBagConstraints);
+
+ lblMaximumParallelTransferThreads.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblMaximumParallelTransferThreads.text")); // NOI18N
+ lblMaximumParallelTransferThreads.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblMaximumParallelTransferThreads.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(6, 180, 0, 0);
+ pnlParallelTransferOptions.add(lblMaximumParallelTransferThreads, gridBagConstraints);
+
+ spinnerIrodsMaxParallelThreads.setModel(new javax.swing.SpinnerNumberModel(4, 0, 16, 1));
+ spinnerIrodsMaxParallelThreads.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.spinnerIrodsMaxParallelThreads.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.gridheight = 2;
+ gridBagConstraints.ipadx = 171;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 0, 22, 0);
+ pnlParallelTransferOptions.add(spinnerIrodsMaxParallelThreads, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ plnPipelineConfiguration.add(pnlParallelTransferOptions, gridBagConstraints);
+
+ pnlBuffers.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlBuffers.border.title"))); // NOI18N
+ pnlBuffers.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlBuffers.toolTipText")); // NOI18N
+ pnlBuffers.setLayout(new java.awt.GridBagLayout());
+
+ lblInternalInputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblInternalInputBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlBuffers.add(lblInternalInputBufferSize, gridBagConstraints);
+
+ txtInternalInputBufferSize.setColumns(20);
+ txtInternalInputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalInputBufferSize.text")); // NOI18N
+ txtInternalInputBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalInputBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlBuffers.add(txtInternalInputBufferSize, gridBagConstraints);
+
+ lblInternalOutputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblInternalOutputBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlBuffers.add(lblInternalOutputBufferSize, gridBagConstraints);
+
+ txtInternalOutputBufferSize.setColumns(20);
+ txtInternalOutputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalOutputBufferSize.text")); // NOI18N
+ txtInternalOutputBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalOutputBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlBuffers.add(txtInternalOutputBufferSize, gridBagConstraints);
+
+ lblLocalFileInputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblLocalFileInputBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblLocalFileInputBufferSize, gridBagConstraints);
+
+ txtLocalFileInputBufferSize.setColumns(20);
+ txtLocalFileInputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalFileInputBufferSize.text")); // NOI18N
+ txtLocalFileInputBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalFileInputBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtLocalFileInputBufferSize, gridBagConstraints);
+
+ lblLocalFileOutputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblLocalFileOutputBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblLocalFileOutputBufferSize, gridBagConstraints);
+
+ txtLocalFileOutputBufferSize.setColumns(20);
+ txtLocalFileOutputBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalFileOutputBufferSize.text")); // NOI18N
+ txtLocalFileOutputBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalFileOutputBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtLocalFileOutputBufferSize, gridBagConstraints);
+
+ lblPutBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblPutBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblPutBufferSize, gridBagConstraints);
+
+ txtPutBufferSize.setColumns(20);
+ txtPutBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtPutBufferSize.text")); // NOI18N
+ txtPutBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtPutBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtPutBufferSize, gridBagConstraints);
+
+ lblGetBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblGetBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblGetBufferSize, gridBagConstraints);
+
+ txtGetBufferSize.setColumns(20);
+ txtGetBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtGetBufferSize.text")); // NOI18N
+ txtGetBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtGetBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtGetBufferSize, gridBagConstraints);
+
+ lblIputToOutputCopyBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblIputToOutputCopyBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblIputToOutputCopyBufferSize, gridBagConstraints);
+
+ txtInputToOutputCopyBufferSize.setColumns(20);
+ txtInputToOutputCopyBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInputToOutputCopyBufferSize.text")); // NOI18N
+ txtInputToOutputCopyBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInputToOutputCopyBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtInputToOutputCopyBufferSize, gridBagConstraints);
+
+ lblInternalCacheBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblInternalCacheBufferSize.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlBuffers.add(lblInternalCacheBufferSize, gridBagConstraints);
+
+ txtInternalCacheBufferSize.setColumns(20);
+ txtInternalCacheBufferSize.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalCacheBufferSize.text")); // NOI18N
+ txtInternalCacheBufferSize.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtInternalCacheBufferSize.toolTipText")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlBuffers.add(txtInternalCacheBufferSize, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ plnPipelineConfiguration.add(pnlBuffers, gridBagConstraints);
+
+ btnRestoreDefaults.setMnemonic('a');
+ btnRestoreDefaults.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnRestoreDefaults.text")); // NOI18N
+ btnRestoreDefaults.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnRestoreDefaults.toolTipText")); // NOI18N
+ btnRestoreDefaults.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnRestoreDefaultsActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 3;
+ plnPipelineConfiguration.add(btnRestoreDefaults, gridBagConstraints);
+
+ btnApplyPipelineConfig.setMnemonic('a');
+ btnApplyPipelineConfig.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnApplyPipelineConfig.text")); // NOI18N
+ btnApplyPipelineConfig.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnApplyPipelineConfig.toolTipText")); // NOI18N
+ btnApplyPipelineConfig.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnApplyPipelineConfigActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 3;
+ gridBagConstraints.gridy = 3;
+ plnPipelineConfiguration.add(btnApplyPipelineConfig, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ pnlConfigTransfers.add(plnPipelineConfiguration, gridBagConstraints);
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigTransfers.TabConstraints.tabTitle"), pnlConfigTransfers); // NOI18N
+
+ pnlConfigSynch.addComponentListener(new java.awt.event.ComponentAdapter() {
+ public void componentShown(java.awt.event.ComponentEvent evt) {
+ pnlConfigSynchComponentShown(evt);
+ }
+ });
+ pnlConfigSynch.setLayout(new java.awt.BorderLayout());
+
+ pnlConfigSynchListing.setMinimumSize(new java.awt.Dimension(23, 100));
+ pnlConfigSynchListing.setLayout(new java.awt.BorderLayout());
+
+ btnRefreshSynch.setMnemonic('r');
+ btnRefreshSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnRefreshSynch.text")); // NOI18N
+ btnRefreshSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnRefreshSynch.toolTipText")); // NOI18N
+ btnRefreshSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnRefreshSynchActionPerformed(evt);
+ }
+ });
+ pnlSynchRefresh.add(btnRefreshSynch);
+
+ pnlConfigSynchListing.add(pnlSynchRefresh, java.awt.BorderLayout.NORTH);
+
+ scrollSynchTable.setMinimumSize(new java.awt.Dimension(23, 100));
+ scrollSynchTable.setPreferredSize(new java.awt.Dimension(100, 100));
+ pnlConfigSynchListing.add(scrollSynchTable, java.awt.BorderLayout.CENTER);
+
+ pnlConfigSynch.add(pnlConfigSynchListing, java.awt.BorderLayout.CENTER);
+
+ pnlConfigSynchDetails.setLayout(new java.awt.BorderLayout());
+
+ pnlSynchData.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
+ pnlSynchData.setLayout(new java.awt.GridBagLayout());
+
+ pnlSynchName.setLayout(new java.awt.GridBagLayout());
+
+ lblSynchName.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblSynchName.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlSynchName.add(lblSynchName, gridBagConstraints);
+
+ txtSynchName.setColumns(40);
+ txtSynchName.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtSynchName.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlSynchName.add(txtSynchName, gridBagConstraints);
+
+ lblSynchDateLabel.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblSynchDateLabel.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlSynchName.add(lblSynchDateLabel, gridBagConstraints);
+
+ lblSynchDate.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblSynchDate.text")); // NOI18N
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlSynchName.add(lblSynchDate, gridBagConstraints);
+
+ lblSynchStatus.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.lblSynchStatus.text")); // NOI18N
+ lblSynchStatus.setMaximumSize(null);
+ lblSynchStatus.setMinimumSize(new java.awt.Dimension(10, 10));
+ lblSynchStatus.setPreferredSize(new java.awt.Dimension(10, 10));
+ pnlSynchIcon.add(lblSynchStatus);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.gridwidth = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ pnlSynchName.add(pnlSynchIcon, gridBagConstraints);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(20, 20, 30, 20);
+ pnlSynchData.add(pnlSynchName, gridBagConstraints);
+
+ txtLocalPath.setColumns(80);
+ txtLocalPath.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalPath.text")); // NOI18N
+ txtLocalPath.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtLocalPath.toolTipText")); // NOI18N
+ txtLocalPath.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ txtLocalPathActionPerformed(evt);
+ }
+ });
+ pnlLocalSynch.add(txtLocalPath);
+
+ btnChooseLocalSynch.setMnemonic('c');
+ btnChooseLocalSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChooseLocalSynch.text")); // NOI18N
+ btnChooseLocalSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChooseLocalSynch.toolTipText")); // NOI18N
+ btnChooseLocalSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnChooseLocalSynchActionPerformed(evt);
+ }
+ });
+ pnlLocalSynch.add(btnChooseLocalSynch);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.gridwidth = 9;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
+ pnlSynchData.add(pnlLocalSynch, gridBagConstraints);
+
+ pnlSynchMode.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
+ pnlSynchMode.setLayout(new java.awt.GridLayout(0, 1));
+
+ jLabel1.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.jLabel1.text")); // NOI18N
+ pnlSynchMode.add(jLabel1);
+
+ buttonGroupSynchMode.add(radioBackup);
+ radioBackup.setSelected(true);
+ radioBackup.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.radioBackup.text")); // NOI18N
+ pnlSynchMode.add(radioBackup);
+
+ buttonGroupSynchMode.add(radioFeed);
+ radioFeed.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.radioFeed.text")); // NOI18N
+ radioFeed.setEnabled(false);
+ pnlSynchMode.add(radioFeed);
+
+ buttonGroupSynchMode.add(radioSynch);
+ radioSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.radioSynch.text")); // NOI18N
+ radioSynch.setEnabled(false);
+ pnlSynchMode.add(radioSynch);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.gridwidth = 9;
+ gridBagConstraints.gridheight = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
+ pnlSynchData.add(pnlSynchMode, gridBagConstraints);
+
+ pnlSynchFrequency.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
+ pnlSynchFrequency.setLayout(new java.awt.GridLayout(0, 1));
+
+ jLabel5.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.jLabel5.text")); // NOI18N
+ pnlSynchFrequency.add(jLabel5);
+
+ jcomboSynchFrequency.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Hourly", "Weekly", "Daily", "Every 2 Minutes (testing)", "", "" }));
+ jcomboSynchFrequency.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.jcomboSynchFrequency.toolTipText")); // NOI18N
+ pnlSynchFrequency.add(jcomboSynchFrequency);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.gridwidth = 9;
+ gridBagConstraints.gridheight = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
+ pnlSynchData.add(pnlSynchFrequency, gridBagConstraints);
+
+ txtIrodsPath.setColumns(80);
+ txtIrodsPath.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtIrodsPath.text")); // NOI18N
+ txtIrodsPath.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.txtIrodsPath.toolTipText")); // NOI18N
+ txtIrodsPath.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ txtIrodsPathActionPerformed(evt);
+ }
+ });
+ pnlIrodsSynch.add(txtIrodsPath);
+
+ btnChooseIrodsSynch.setMnemonic('i');
+ btnChooseIrodsSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChooseIrodsSynch.text")); // NOI18N
+ btnChooseIrodsSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnChooseIrodsSynch.toolTipText")); // NOI18N
+ btnChooseIrodsSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnChooseIrodsSynchActionPerformed(evt);
+ }
+ });
+ pnlIrodsSynch.add(btnChooseIrodsSynch);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.gridwidth = 9;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ gridBagConstraints.insets = new java.awt.Insets(0, 10, 0, 10);
+ pnlSynchData.add(pnlIrodsSynch, gridBagConstraints);
+
+ pnlConfigSynchDetails.add(pnlSynchData, java.awt.BorderLayout.CENTER);
+
+ btnDeleteSynch.setMnemonic('d');
+ btnDeleteSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnDeleteSynch.text")); // NOI18N
+ btnDeleteSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnDeleteSynch.toolTipText")); // NOI18N
+ btnDeleteSynch.setEnabled(false);
+ btnDeleteSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnDeleteSynchActionPerformed(evt);
+ }
+ });
+ panelSynchToolbar.add(btnDeleteSynch);
+
+ btnNewSynch.setMnemonic('n');
+ btnNewSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnNewSynch.text")); // NOI18N
+ btnNewSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnNewSynch.toolTipText")); // NOI18N
+ btnNewSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnNewSynchActionPerformed(evt);
+ }
+ });
+ panelSynchToolbar.add(btnNewSynch);
+
+ btnUpdateSynch.setMnemonic('u');
+ btnUpdateSynch.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnUpdateSynch.text")); // NOI18N
+ btnUpdateSynch.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnUpdateSynch.toolTipText")); // NOI18N
+ btnUpdateSynch.setEnabled(false);
+ btnUpdateSynch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnUpdateSynchActionPerformed(evt);
+ }
+ });
+ panelSynchToolbar.add(btnUpdateSynch);
+
+ btnSynchNow.setMnemonic('s');
+ btnSynchNow.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnSynchNow.text")); // NOI18N
+ btnSynchNow.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnSynchNow.toolTipText")); // NOI18N
+ btnSynchNow.setEnabled(false);
+ btnSynchNow.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnSynchNowActionPerformed(evt);
+ }
+ });
+ panelSynchToolbar.add(btnSynchNow);
+
+ pnlConfigSynchDetails.add(panelSynchToolbar, java.awt.BorderLayout.SOUTH);
+
+ pnlConfigSynch.add(pnlConfigSynchDetails, java.awt.BorderLayout.SOUTH);
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigSynch.TabConstraints.tabTitle"), pnlConfigSynch); // NOI18N
+
+ pnlCenter.add(tabConfig);
+
+ getContentPane().add(pnlCenter, java.awt.BorderLayout.CENTER);
+
+ pnlBottom.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT));
+
+ btnOK.setMnemonic('O');
+ btnOK.setText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnOK.text")); // NOI18N
+ btnOK.setToolTipText(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.btnOK.toolTipText")); // NOI18N
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlBottom.add(btnOK);
+
+ getContentPane().add(pnlBottom, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ /**
+ * Refresh the displayed synch
+ *
+ * @param evt
+ */
+ private void btnRefreshSynchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRefreshSynchActionPerformed
+ refreshSynchConfigPanel();
+ }//GEN-LAST:event_btnRefreshSynchActionPerformed
+
+ private void checkShowFileProgressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkShowFileProgressActionPerformed
+ //
+ }//GEN-LAST:event_checkShowFileProgressActionPerformed
+
+ private void checkShowGUIItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkShowGUIItemStateChanged
+
+ boolean isSelected = false;
+ if (evt.getStateChange() == ItemEvent.SELECTED) {
+ isSelected = true;
+ }
+ log.info("updating show gui at startup to:{}", isSelected);
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.SHOW_GUI, Boolean.toString(isSelected));
+ } catch (IdropException ex) {
+ log.error("error setting show gui property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkShowGUIItemStateChanged
+
+ private void checkShowFileProgressItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkShowFileProgressItemStateChanged
+ boolean isSelected = false;
+ if (evt.getStateChange() == ItemEvent.SELECTED) {
+ isSelected = true;
+ }
+ log.info("updating show intra-file progress to:{}", isSelected);
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.INTRA_FILE_STATUS_CALLBACKS, Boolean.toString(isSelected));
+ idropCore.getIdropConfigurationService().updateJargonPropertiesBasedOnIDROPConfig();
+ } catch (Exception ex) {
+ log.error("error setting property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkShowFileProgressItemStateChanged
+
+ private void checkVerifyChecksumOnTransferItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkVerifyChecksumOnTransferItemStateChanged
+ updateConfigForGivenPropertyBasedOnCheckboxStateChange(evt, IdropConfigurationService.VERIFY_CHECKSUM_ON_TRANSFER);
+ }
+
+ private void updateConfigForGivenPropertyBasedOnCheckboxStateChange(ItemEvent evt, String propertyName) throws IdropRuntimeException {
+ boolean isSelected = false;
+ if (evt.getStateChange() == ItemEvent.SELECTED) {
+ isSelected = true;
+ }
+ log.info("updating verify checksum to:{}", isSelected);
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(propertyName, Boolean.toString(isSelected));
+ idropCore.getIdropConfigurationService().updateJargonPropertiesBasedOnIDROPConfig();
+ } catch (Exception ex) {
+ log.error("error setting property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkVerifyChecksumOnTransferItemStateChanged
+
+ private void checkLogSuccessfulTransferItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkLogSuccessfulTransferItemStateChanged
+
+ updateConfigForGivenPropertyBasedOnCheckboxStateChange(evt, IdropConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
+ }//GEN-LAST:event_checkLogSuccessfulTransferItemStateChanged
+
+ private void checkUseExecutorPoolItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkUseExecutorPoolItemStateChanged
+ updateConfigForGivenPropertyBasedOnCheckboxStateChange(evt, IdropConfigurationService.IRODS_PARALLEL_USE_POOL);
+ }//GEN-LAST:event_checkUseExecutorPoolItemStateChanged
+
+ private void checkAllowReroutingItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkAllowReroutingItemStateChanged
+ boolean isSelected = false;
+ if (evt.getStateChange() == ItemEvent.SELECTED) {
+ isSelected = true;
+ }
+ log.info("updating allow rerouting to:{}", isSelected);
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ALLOW_CONNECTION_REROUTING, Boolean.toString(isSelected));
+ idropCore.getIdropConfigurationService().updateJargonPropertiesBasedOnIDROPConfig();
+ } catch (Exception ex) {
+ log.error("error setting property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkAllowReroutingItemStateChanged
+
+ private void resetTransferPipelineEditColors() {
+ txtInternalInputBufferSize.setBackground(Color.white);
+ txtInternalOutputBufferSize.setBackground(Color.white);
+ txtLocalFileInputBufferSize.setBackground(Color.white);
+ txtLocalFileOutputBufferSize.setBackground(Color.white);
+ txtGetBufferSize.setBackground(Color.white);
+ txtPutBufferSize.setBackground(Color.white);
+ txtInputToOutputCopyBufferSize.setBackground(Color.white);
+ txtInternalCacheBufferSize.setBackground(Color.white);
+ }
+
+ /**
+ * Update the pipeline configuration information properties based on the screen data
+ *
+ * @param evt
+ */
+ private void btnApplyPipelineConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnApplyPipelineConfigActionPerformed
+ try {
+
+ resetTransferPipelineEditColors();
+ // edit and set
+
+ // internal input buffer size
+ String actual = txtInternalInputBufferSize.getText();
+ int actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtInternalInputBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid internal input buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // internal output buffer size
+ actual = txtInternalOutputBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtInternalOutputBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid internal output buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // local file input buffer size
+ actual = txtLocalFileInputBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtLocalFileInputBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid local file input buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // local file output buffer size
+ actual = txtLocalFileOutputBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtLocalFileOutputBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid local file output buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // get buffer size
+ actual = txtGetBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_GET_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtGetBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid get buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // put buffer size
+ actual = txtPutBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_PUT_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtPutBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid put buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // input to output copy buffer size
+ actual = txtInputToOutputCopyBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtInputToOutputCopyBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid input to output copy buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ // internal cache buffer size
+ actual = txtInternalCacheBufferSize.getText();
+ actualAsInt = 0;
+ if (actual.isEmpty()) {
+ actualAsInt = 0;
+ } else {
+ try {
+ actualAsInt = Integer.parseInt(actual);
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE, actual);
+ } catch (NumberFormatException nfe) {
+ txtInternalCacheBufferSize.setBackground(Color.red);
+ MessageManager.showWarning(this, "Invalid internal cache buffer size", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ }
+
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_PARALLEL_USE_PARALLEL, Boolean.toString(checkAllowParallelTransfers.isSelected()));
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_PARALLEL_USE_NIO, Boolean.toString(checkUseNIOForParallelTransfers.isSelected()));
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS, spinnerIrodsMaxParallelThreads.getValue().toString());
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT, spinnerIrodsParallelSocketTimeout.getValue().toString());
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_CONNECTION_TIMEOUT, spinnerIrodsSocketTimeout.getValue().toString());
+
+ idropCore.getIdropConfigurationService().updateJargonPropertiesBasedOnIDROPConfig();
+ } catch (Exception ex) {
+ log.error("error setting property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_btnApplyPipelineConfigActionPerformed
+
+ private void btnRestoreDefaultsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRestoreDefaultsActionPerformed
+ log.info("restoring pipeline config to jargon properties settings");
+ try {
+ JargonProperties defaultJargonProperties = new DefaultPropertiesJargonConfig();
+ IdropConfigurationService configService = idropCore.getIdropConfigurationService();
+ configService.restoreIDROPConfigFromJargonProperties(defaultJargonProperties);
+ initWithConfigData();
+ MessageManager.showMessage(this, "Values restored to defaults, hit apply to update", MessageManager.TITLE_MESSAGE);
+ } catch (JargonException ex) {
+ log.error("unable to restore jargon properties", ex);
+ throw new IdropRuntimeException("unable to restore jargon properties", ex);
+ }
+
+ }//GEN-LAST:event_btnRestoreDefaultsActionPerformed
+
+ private void comboPrefsDefaultResourceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboPrefsDefaultResourceActionPerformed
+ String newResource = (String)comboPrefsDefaultResource.getSelectedItem();
+ idropCore.getIrodsAccount().setDefaultStorageResource(newResource);
+ idropGui.reinitializeForChangedIRODSAccount();
+ }//GEN-LAST:event_comboPrefsDefaultResourceActionPerformed
+
+ private void checkConnectionRestartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkConnectionRestartActionPerformed
+
+
+
+
+
+ }//GEN-LAST:event_checkConnectionRestartActionPerformed
+
+ private void checkConnectionRestartItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkConnectionRestartItemStateChanged
+ boolean isSelected = false;
+ if (evt.getStateChange() == ItemEvent.SELECTED) {
+ isSelected = true;
+ }
+ log.info("updating connection restart to:{}", isSelected);
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.IRODS_CONNECTION_RESTART, Boolean.toString(isSelected));
+ idropCore.getIdropConfigurationService().updateJargonPropertiesBasedOnIDROPConfig();
+ } catch (Exception ex) {
+ log.error("error setting property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkConnectionRestartItemStateChanged
+
+ private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {
+ this.dispose();
+ }
+
+ private void checkShowGUIActionPerformed(java.awt.event.ActionEvent evt) {
+ //
+ }
+
+ private void checkLogSuccessfulTransferActionPerformed(java.awt.event.ActionEvent evt) {
+ //
+ }
+
+ private void pnlConfigSynchComponentShown(java.awt.event.ComponentEvent evt) {
+
+ refreshSynchConfigPanel();
+
+ }
+
+ private void refreshSynchConfigPanel() {
+ log.info("lazily loading synch data");
+
+ final IDROPConfigurationPanel thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+
+ try {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ List<Synchronization> synchronizations = synchConfigurationService.listAllSynchronizations();
+ SynchConfigTableModel synchConfigTableModel = null;
+ if (jTableSynch == null) {
+ synchConfigTableModel = new SynchConfigTableModel(idropCore, synchronizations);
+ jTableSynch = new JTable(synchConfigTableModel);
+ jTableSynch.getSelectionModel().addListSelectionListener(new SynchListSelectionHandler(thisPanel));
+ scrollSynchTable.setViewportView(jTableSynch);
+ scrollSynchTable.validate();
+ pnlConfigSynchListing.validate();
+ } else {
+ synchConfigTableModel = (SynchConfigTableModel) jTableSynch.getModel();
+ synchConfigTableModel.setSynchronizations(synchronizations);
+ synchConfigTableModel.fireTableDataChanged();
+ }
+
+ if (synchConfigTableModel.getRowCount() > 0) {
+ jTableSynch.setRowSelectionInterval(0, 0);
+ } else {
+ lockSynchPanelForNewOnly();
+ }
+ } catch (SynchException ex) {
+ log.error("error setting up synchs table", ex);
+ throw new IdropRuntimeException(ex);
+ } finally {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+
+ private void lockSynchPanelForNewOnly() {
+ clearAndResetSynchPanel();
+ setLockStatusSynchPanel(false);
+ }
+ });
+ }
+
+ private void txtLocalPathActionPerformed(java.awt.event.ActionEvent evt) {
+ // TODO add your handling code here:
+ }
+
+ private void btnChooseLocalSynchActionPerformed(java.awt.event.ActionEvent evt) {
+ // TODO add your handling code here:
+ JFileChooser localFileChooser = new JFileChooser();
+ localFileChooser.setMultiSelectionEnabled(false);
+ localFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ int returnVal = localFileChooser.showOpenDialog(this);
+ txtLocalPath.setText(localFileChooser.getSelectedFile().getAbsolutePath());
+ }
+
+ private void txtIrodsPathActionPerformed(java.awt.event.ActionEvent evt) {
+ // TODO add your handling code here:
+ }
+
+ private void btnChooseIrodsSynchActionPerformed(java.awt.event.ActionEvent evt) {
+ try {
+ IRODSFinderDialog irodsFileSystemChooserView = new IRODSFinderDialog(null, true, idropCore);
+ final Toolkit toolkit = Toolkit.getDefaultToolkit();
+ final Dimension screenSize = toolkit.getScreenSize();
+ final int x = (screenSize.width - irodsFileSystemChooserView.getWidth()) / 2;
+ final int y = (screenSize.height - irodsFileSystemChooserView.getHeight()) / 2;
+ irodsFileSystemChooserView.setLocation(x, y);
+ irodsFileSystemChooserView.setVisible(true);
+ String absPath = irodsFileSystemChooserView.getSelectedAbsolutePath();
+ irodsFileSystemChooserView.dispose();
+ if (absPath != null) {
+ txtIrodsPath.setText(irodsFileSystemChooserView.getSelectedAbsolutePath());
+ }
+
+ // int returnVal = irodsFileChooser.showSaveDialog(this);
+ } catch (Exception e) {
+ log.error("exception choosings iRODS file");
+ throw new IdropRuntimeException("exception choosing irods fie", e);
+ } finally {
+ idropCore.getIrodsFileSystem().closeAndEatExceptions();
+ }
+ }
+
+ /**
+ * Delete the selected synchronization
+ *
+ * @param evt
+ */
+ private void btnDeleteSynchActionPerformed(java.awt.event.ActionEvent evt) {
+
+ 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));
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+ log.info("deleting synchronization:{}", synchronization);
+
+ if (synchConfigurationService.isSynchRunning(synchronization)) {
+ MessageManager.showMessage(thisPanel, "Cannot delete the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ ListSelectionModel lsm = (ListSelectionModel) thisPanel.getSynchTable().getSelectionModel();
+ SynchConfigTableModel model = (SynchConfigTableModel) thisPanel.getSynchTable().getModel();
+
+ 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);
+ refreshSynchConfigPanel();
+ } catch (Exception ex) {
+ MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ } finally {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ idropCore.closeIRODSConnection(
+ idropCore.getIrodsAccount());
+ }
+ }
+ });
+ }
+
+ /**
+ * Called to clear and prepare for adding a new synchronization
+ *
+ * @param evt
+ */
+ private void btnNewSynchActionPerformed(java.awt.event.ActionEvent evt) {
+ clearAndResetSynchPanel();
+ if (jTableSynch.getModel().getRowCount() > 0) {
+ jTableSynch.getSelectionModel().removeIndexInterval(0, jTableSynch.getModel().getRowCount() - 1);
+ }
+ selectedSynchronization = new Synchronization();
+ btnDeleteSynch.setEnabled(false);
+ btnUpdateSynch.setEnabled(true);
+ btnSynchNow.setEnabled(false);
+ MessageManager.showMessage(this, "Enter the data for the new Synchronization and press Update to save", MessageManager.TITLE_MESSAGE);
+ setLockStatusSynchPanel(true);
+ btnSynchNow.setEnabled(false);
+ btnDeleteSynch.setEnabled(false);
+ }
+
+ /**
+ * User signals that the displayed synchronization should be updated
+ *
+ * @param evt
+ */
+ private void btnUpdateSynchActionPerformed(java.awt.event.ActionEvent evt) {
+ updateSynch();
+ }
+
+ private void updateSynch() {
+ final IDROPConfigurationPanel thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ resetSynchPanel();
+ if (selectedSynchronization == null) {
+ MessageManager.showError(thisPanel, "Please select a synchronization from the table", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ if (txtLocalPath.getText().trim().isEmpty()) {
+ txtLocalPath.setBackground(Color.RED);
+ MessageManager.showError(thisPanel, "Please select a local path", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ if (txtIrodsPath.getText().trim().isEmpty()) {
+ txtIrodsPath.setBackground(Color.RED);
+ MessageManager.showError(thisPanel, "Please select an iRODS path", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ if (txtSynchName.getText().trim().isEmpty()) {
+ txtSynchName.setBackground(Color.RED);
+ MessageManager.showError(thisPanel, "Please enter a unique name for this synchronization", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ boolean isNew = (selectedSynchronization.getId() == null);
+ if (isNew) {
+ log.info("adding new synch");
+ }
+
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+
+ // edits pass, do update
+ log.info("saving synch data");
+ Synchronization synchronization = selectedSynchronization;
+ synchronization.setUpdatedAt(new Date());
+ synchronization.setFrequencyType(getSynchFrequencyFromGUI());
+
+ synchronization.setName(txtSynchName.getText().trim());
+ synchronization.setSynchronizationMode(getSynchTypeFromGUI());
+ synchronization.setLocalSynchDirectory(txtLocalPath.getText().trim());
+ synchronization.setIrodsSynchDirectory(txtIrodsPath.getText().trim());
+ IRODSAccount irodsAccount = idropCore.getIrodsAccount();
+ synchronization.setIrodsHostName(irodsAccount.getHost());
+
+ try {
+ synchronization.setIrodsPassword(HibernateUtil.obfuscate(irodsAccount.getPassword()));
+ } catch (JargonException ex) {
+ log.error("exception obfuscating password", ex);
+ MessageManager.showError(thisPanel, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ throw new IdropRuntimeException(ex);
+ }
+
+ synchronization.setIrodsPort(irodsAccount.getPort());
+ synchronization.setIrodsUserName(irodsAccount.getUserName());
+ synchronization.setIrodsZone(irodsAccount.getZone());
+ synchronization.setDefaultResourceName(irodsAccount.getDefaultStorageResource());
+ synchronization.setCreatedAt(new Date());
+ selectedSynchronization = synchronization;
+
+ try {
+ thisPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ if (synchConfigurationService.isSynchRunning(selectedSynchronization)) {
+ MessageManager.showMessage(thisPanel, "Cannot update the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ idropCore.getIdropConfigurationService().updateSynchronization(synchronization);
+ MessageManager.showMessage(thisPanel, "Configuration updated", MessageManager.TITLE_MESSAGE);
+ ListSelectionModel lsm = (ListSelectionModel) thisPanel.getSynchTable().getSelectionModel();
+ SynchConfigTableModel model = (SynchConfigTableModel) thisPanel.getSynchTable().getModel();
+
+ if (isNew) {
+
+ List<Synchronization> synchronizations = synchConfigurationService.listAllSynchronizations();
+
+ model.setSynchronizations(synchronizations);
+ model.fireTableDataChanged();
+ } else {
+ if (lsm.isSelectionEmpty()) {
+ return;
+ } else {
+ // Find out which indexes are selected.
+ int minIndex = lsm.getMinSelectionIndex();
+ int maxIndex = lsm.getMaxSelectionIndex();
+ for (int i = minIndex; i <= maxIndex; i++) {
+ if (lsm.isSelectedIndex(i)) {
+ int modelIdx = thisPanel.getSynchTable().convertRowIndexToModel(i);
+
+ model.getSynchronizations().set(modelIdx, synchronization);
+ model.fireTableDataChanged();
+ break;
+ }
+ }
+ }
+ }
+
+ btnDeleteSynch.setEnabled(true);
+ btnUpdateSynch.setEnabled(true);
+ btnSynchNow.setEnabled(true);
+
+ } 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());
+ }
+ }
+ });
+ }
+
+ /**
+ * Force a synchronization process on the selected synchronization
+ *
+ * @param evt
+ */
+ private void btnSynchNowActionPerformed(java.awt.event.ActionEvent evt) {
+ log.info("synch now button pressed");
+ if (selectedSynchronization == null) {
+ MessageManager.showWarning(this, "Please select a synhronization", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+
+ log.info("selected synchronization is:{}", selectedSynchronization);
+ boolean synchIsUnchanged = checkIfSynchChanged();
+
+ if (!synchIsUnchanged) {
+ log.info("synch had been changed, update first");
+ updateSynch();
+ }
+
+ int result = JOptionPane.showConfirmDialog(this,
+ "Synchronize?",
+ "Do you want to synchronize now?",
+ JOptionPane.OK_CANCEL_OPTION);
+ if (result == JOptionPane.OK_OPTION) {
+ try {
+ SynchManagerService synchConfigurationService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+
+ if (synchConfigurationService.isSynchRunning(selectedSynchronization)) {
+ MessageManager.showMessage(this, "Cannot schedule the synchronization, a synch is currently running", MessageManager.TITLE_MESSAGE);
+ return;
+ }
+ idropCore.getTransferManager().enqueueASynch(selectedSynchronization, selectedSynchronization.buildIRODSAccountFromSynchronizationData());
+ } catch (Exception ex) {
+ log.error("error starting synch", ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ throw new IdropRuntimeException(ex);
+ }
+ }
+ }
+
+ private void checkVerifyChecksumOnTransferActionPerformed(java.awt.event.ActionEvent evt) {
+ //
+ }
+
+ private void btnLogoutActionPerformed(java.awt.event.ActionEvent evt) {
+ log.info("logging out to log in to a new grid");
+
+ final IDROPConfigurationPanel thisPanel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ IRODSAccount savedAccount = idropCore.getIrodsAccount();
+ idropCore.setIrodsAccount(null);
+ iDrop idrop = (iDrop) thisPanel.getParent();
+ LoginDialog loginDialog = new LoginDialog(thisPanel, idropCore);
+ loginDialog.setVisible(true);
+
+ if (idropCore.getIrodsAccount() == null) {
+ log.warn("no account, reverting");
+ idropCore.setIrodsAccount(savedAccount);
+ } else {
+ idrop.reinitializeForChangedIRODSAccount();
+ }
+ refreshAccountData();
+ }
+ });
+
+ }
+
+ private void btnChangePasswordActionPerformed(java.awt.event.ActionEvent evt) {
+ ChangePasswordDialog changePasswordDialog = new ChangePasswordDialog((iDrop) this.getParent(), this, true);
+ changePasswordDialog.setLocationRelativeTo(this);
+ changePasswordDialog.setVisible(true);
+ }
+
+ protected JTable getSynchTable() {
+ return jTableSynch;
+ }
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnApplyPipelineConfig;
+ private javax.swing.JButton btnChangePassword;
+ private javax.swing.JButton btnChooseIrodsSynch;
+ private javax.swing.JButton btnChooseLocalSynch;
+ private javax.swing.JButton btnDeleteSynch;
+ private javax.swing.JButton btnLogout;
+ private javax.swing.JButton btnNewSynch;
+ private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnRefreshSynch;
+ private javax.swing.JButton btnRestoreDefaults;
+ private javax.swing.JButton btnSynchNow;
+ private javax.swing.JButton btnUpdateSynch;
+ private javax.swing.ButtonGroup buttonGroupSynchMode;
+ private javax.swing.JCheckBox checkAllowParallelTransfers;
+ private javax.swing.JCheckBox checkAllowRerouting;
+ private javax.swing.JCheckBox checkConnectionRestart;
+ private javax.swing.JCheckBox checkLogSuccessfulTransfer;
+ private javax.swing.JCheckBox checkShowFileProgress;
+ private javax.swing.JCheckBox checkShowGUI;
+ private javax.swing.JCheckBox checkUseExecutorPool;
+ private javax.swing.JCheckBox checkUseNIOForParallelTransfers;
+ private javax.swing.JCheckBox checkVerifyChecksumOnTransfer;
+ private javax.swing.JComboBox comboPrefsDefaultResource;
+ private javax.swing.JLabel jLabel1;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JComboBox jcomboSynchFrequency;
+ private javax.swing.JLabel lblGetBufferSize;
+ private javax.swing.JLabel lblHost;
+ private javax.swing.JLabel lblHostLabel;
+ private javax.swing.JLabel lblInternalCacheBufferSize;
+ private javax.swing.JLabel lblInternalInputBufferSize;
+ private javax.swing.JLabel lblInternalOutputBufferSize;
+ private javax.swing.JLabel lblIputToOutputCopyBufferSize;
+ private javax.swing.JLabel lblIrodsParallelSocketTimeout;
+ private javax.swing.JLabel lblIrodsSocketTimeout;
+ private javax.swing.JLabel lblLocalFileInputBufferSize;
+ private javax.swing.JLabel lblLocalFileOutputBufferSize;
+ private javax.swing.JLabel lblMaximumParallelTransferThreads;
+ private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblPortLabel;
+ private javax.swing.JLabel lblPutBufferSize;
+ private javax.swing.JLabel lblResourceLabel;
+ private javax.swing.JLabel lblSynchDate;
+ private javax.swing.JLabel lblSynchDateLabel;
+ private javax.swing.JLabel lblSynchName;
+ private javax.swing.JLabel lblSynchStatus;
+ private javax.swing.JLabel lblUserName;
+ private javax.swing.JLabel lblUserNameLabel;
+ private javax.swing.JLabel lblZone;
+ private javax.swing.JLabel lblZoneLabel;
+ private javax.swing.JPanel panelSynchToolbar;
+ private javax.swing.JPanel plnPipelineConfiguration;
+ private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlBuffers;
+ private javax.swing.JPanel pnlCenter;
+ private javax.swing.JPanel pnlConfigGrids;
+ private javax.swing.JPanel pnlConfigIdrop;
+ private javax.swing.JPanel pnlConfigSynch;
+ private javax.swing.JPanel pnlConfigSynchDetails;
+ private javax.swing.JPanel pnlConfigSynchListing;
+ private javax.swing.JPanel pnlConfigTransfers;
+ private javax.swing.JPanel pnlCurrentGrid;
+ private javax.swing.JPanel pnlCurrentGridToolbar;
+ private javax.swing.JPanel pnlIrodsSynch;
+ private javax.swing.JPanel pnlLocalSynch;
+ private javax.swing.JPanel pnlParallelTransferOptions;
+ private javax.swing.JPanel pnlSynchData;
+ private javax.swing.JPanel pnlSynchFrequency;
+ private javax.swing.JPanel pnlSynchIcon;
+ private javax.swing.JPanel pnlSynchMode;
+ private javax.swing.JPanel pnlSynchName;
+ private javax.swing.JPanel pnlSynchRefresh;
+ private javax.swing.JPanel pnlTop;
+ private javax.swing.JPanel pnlTransferManagement;
+ private javax.swing.JRadioButton radioBackup;
+ private javax.swing.JRadioButton radioFeed;
+ private javax.swing.JRadioButton radioSynch;
+ private javax.swing.JScrollPane scrollSynchTable;
+ private javax.swing.JSpinner spinnerIrodsMaxParallelThreads;
+ private javax.swing.JSpinner spinnerIrodsParallelSocketTimeout;
+ private javax.swing.JSpinner spinnerIrodsSocketTimeout;
+ private javax.swing.JTabbedPane tabConfig;
+ private javax.swing.JTextField txtGetBufferSize;
+ private javax.swing.JTextField txtInputToOutputCopyBufferSize;
+ private javax.swing.JTextField txtInternalCacheBufferSize;
+ private javax.swing.JTextField txtInternalInputBufferSize;
+ private javax.swing.JTextField txtInternalOutputBufferSize;
+ private javax.swing.JTextField txtIrodsPath;
+ private javax.swing.JTextField txtLocalFileInputBufferSize;
+ private javax.swing.JTextField txtLocalFileOutputBufferSize;
+ private javax.swing.JTextField txtLocalPath;
+ private javax.swing.JTextField txtPutBufferSize;
+ private javax.swing.JTextField txtSynchName;
+ // End of variables declaration//GEN-END:variables
+
+ // variable declarations for non-generated components
+ private javax.swing.JPanel pnlConfigPublicLinks;
+ private javax.swing.JTextField txtPublicLinks;
+ // end
+
+ private void initWithConfigData() {
+ resetTransferPipelineEditColors();
+ IdropConfig idropConfig = idropCore.getIdropConfig();
+ checkShowGUI.setSelected(idropConfig.isShowGuiAtStartup());
+ checkLogSuccessfulTransfer.setSelected(idropConfig.isLogSuccessfulTransfers());
+ checkUseExecutorPool.setSelected(idropConfig.isParallelUsePool());
+ checkVerifyChecksumOnTransfer.setSelected(idropConfig.isVerifyChecksum());
+ checkShowFileProgress.setSelected(idropConfig.isIntraFileStatusCallbacks());
+ checkAllowRerouting.setSelected(idropConfig.isAllowConnectionRerouting());
+ checkUseExecutorPool.setSelected(idropConfig.isParallelUsePool());
+ spinnerIrodsSocketTimeout.setValue(idropConfig.getIrodsConnectionTimeout());
+ spinnerIrodsParallelSocketTimeout.setValue(idropConfig.getIrodsParallelConnectionTimeout());
+ spinnerIrodsMaxParallelThreads.setValue(idropConfig.getIrodsParallelTransferMaxThreads());
+ checkAllowParallelTransfers.setSelected(idropConfig.isUseParallelTransfers());
+ checkConnectionRestart.setSelected(idropConfig.isConnectionRestart());
+ checkUseNIOForParallelTransfers.setSelected(idropConfig.isUseNIOForParallelTransfers());
+ txtInternalInputBufferSize.setText(String.valueOf(idropConfig.getInternalInputStreamBufferSize()));
+ txtInternalOutputBufferSize.setText(String.valueOf(idropConfig.getInternalOutputStreamBufferSize()));
+ txtLocalFileInputBufferSize.setText(String.valueOf(idropConfig.getLocalFileInputStreamBufferSize()));
+ txtLocalFileOutputBufferSize.setText(String.valueOf(idropConfig.getLocalFileOutputStreamBufferSize()));
+ txtGetBufferSize.setText(String.valueOf(idropConfig.getGetBufferSize()));
+ txtPutBufferSize.setText(String.valueOf(idropConfig.getPutBufferSize()));
+ txtInputToOutputCopyBufferSize.setText(String.valueOf(idropConfig.getInputToOutputCopyBufferByteSize()));
+ txtInternalCacheBufferSize.setText(String.valueOf(idropConfig.getInternalCacheBufferSize()));
+ txtPublicLinks.setText(idropConfig.getPublicLinkServiceUrl());
+ refreshAccountData();
+ }
+
+ /**
+ * Reset colors in synch panel when re-validating
+ */
+ private void resetSynchPanel() {
+ txtLocalPath.setBackground(Color.WHITE);
+ txtIrodsPath.setBackground(Color.WHITE);
+ txtSynchName.setBackground(Color.WHITE);
+ }
+
+ /**
+ * Clear synch panel values and colors
+ */
+ private void clearAndResetSynchPanel() {
+ resetSynchPanel();
+ txtLocalPath.setText("");
+ txtIrodsPath.setText("");
+ txtSynchName.setText("");
+ radioBackup.setSelected(true);
+ lblSynchDate.setText("");
+ pnlSynchIcon.removeAll();
+ pnlSynchIcon.validate();
+ jcomboSynchFrequency.setSelectedIndex(0);
+ }
+
+ private void refreshAccountData() {
+
+ if (idropCore.getIrodsAccount() == null) {
+ lblHost.setText("");
+ lblPort.setText("");
+ lblZone.setText("");
+ comboPrefsDefaultResource.setModel(new DefaultComboBoxModel());
+ lblUserName.setText("");
+ } else {
+ lblHost.setText(idropCore.getIrodsAccount().getHost());
+ lblPort.setText(String.valueOf(idropCore.getIrodsAccount().getPort()));
+ lblZone.setText(idropCore.getIrodsAccount().getZone());
+ lblUserName.setText(idropCore.getIrodsAccount().getUserName());
+ try {
+ ResourceAO resourceAO = idropCore.getIRODSAccessObjectFactory().getResourceAO(idropCore.getIrodsAccount());
+ log.info("getting a list of all resources in the zone");
+ List<String> resources = resourceAO.listResourceNames();
+ comboPrefsDefaultResource.setModel(new DefaultComboBoxModel(resources.toArray()));
+ comboPrefsDefaultResource.setSelectedItem(idropCore.getIrodsAccount().getDefaultStorageResource());
+ } catch (JargonException ex) {
+ log.error("error getting resource list", ex);
+ throw new IdropRuntimeException("error getting resource list", ex);
+ }
+ }
+ // check to see if default resource editing is allowed
+ String allowEdit = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.IDROP_ENABLE_RESC_EDIT);
+ if (allowEdit != null && allowEdit.equals("false")) {
+ comboPrefsDefaultResource.setEnabled(false);
+ }
+ }
+
+ protected void updateDetailsForSelectedSynch(int i) {
+ // make sure the most up-to-date information is displayed
+ int modelIdx = getSynchTable().convertRowIndexToModel(i);
+ SynchConfigTableModel model = (SynchConfigTableModel) getSynchTable().getModel();
+
+ selectedSynchronization = model.getSynchronizationAt(modelIdx);
+
+ if (selectedSynchronization == null) {
+ model.removeRow(modelIdx);
+ return;
+ }
+
+ // initialize data
+ txtLocalPath.setText(selectedSynchronization.getLocalSynchDirectory());
+ txtIrodsPath.setText(selectedSynchronization.getIrodsSynchDirectory());
+ txtSynchName.setText(selectedSynchronization.getName());
+
+ if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_HOUR) {
+ jcomboSynchFrequency.setSelectedIndex(0);
+ } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_WEEK) {
+ jcomboSynchFrequency.setSelectedIndex(1);
+ } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_DAY) {
+ jcomboSynchFrequency.setSelectedIndex(2);
+ } else if (selectedSynchronization.getFrequencyType() == FrequencyType.EVERY_TWO_MINUTES) {
+ jcomboSynchFrequency.setSelectedIndex(3);
+ } else {
+ // default to hourly to avoid errors
+ log.error("unknown frequency type for synch:{}", selectedSynchronization.getFrequencyType());
+ jcomboSynchFrequency.setSelectedIndex(0);
+ }
+
+ if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.BI_DIRECTIONAL) {
+ radioSynch.setSelected(true);
+ } else if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_IRODS_TO_LOCAL) {
+ radioFeed.setSelected(true);
+ } else if (selectedSynchronization.getSynchronizationMode() == SynchronizationType.ONE_WAY_LOCAL_TO_IRODS) {
+ radioBackup.setSelected(true);
+ } else {
+ log.error("unknown synchronization mode for synch:{}", selectedSynchronization.getSynchronizationMode());
+ throw new IdropRuntimeException("unknown synchronization mode");
+ }
+
+ btnDeleteSynch.setEnabled(true);
+ btnUpdateSynch.setEnabled(true);
+ btnSynchNow.setEnabled(true);
+
+ setSynchIcon(selectedSynchronization);
+ if (selectedSynchronization.getLastSynchronized() == null) {
+ lblSynchDate.setText("None");
+ } else {
+ lblSynchDate.setText(dateFormat.format(selectedSynchronization.getLastSynchronized()));
+ }
+
+ }
+
+ protected void setLockStatusSynchPanel(boolean lockStatus) {
+ txtSynchName.setEnabled(lockStatus);
+ txtLocalPath.setEnabled(lockStatus);
+ btnChooseLocalSynch.setEnabled(lockStatus);
+ radioBackup.setEnabled(lockStatus);
+ //radioFeed.setEnabled(lockStatus);
+ //radioSynch.setEnabled(lockStatus);
+ jcomboSynchFrequency.setEnabled(lockStatus);
+ txtIrodsPath.setEnabled(lockStatus);
+ btnChooseIrodsSynch.setEnabled(lockStatus);
+ btnDeleteSynch.setEnabled(lockStatus);
+ btnUpdateSynch.setEnabled(lockStatus);
+ btnSynchNow.setEnabled(lockStatus);
+ //btnSynchDetails.setEnabled(lockStatus);
+ }
+
+ private void setSynchIcon(Synchronization synchronization) {
+
+ JLabel labelToUse = null;
+
+ SynchManagerService synchManagerService = idropCore.getTransferManager().getTransferServiceFactory().instanceSynchManagerService();
+ try {
+ boolean isRunning = synchManagerService.isSynchRunning(synchronization);
+ if (isRunning) {
+ labelToUse = IconHelper.getRunningIcon();
+ } else if (synchronization.getLastSynchronizationStatus() == null) {
+ labelToUse = IconHelper.getOkIcon();
+ } else if (synchronization.getLastSynchronizationStatus() == TransferStatus.ERROR) {
+ labelToUse = IconHelper.getErrorIcon();
+ } else {
+ labelToUse = IconHelper.getOkIcon();
+ }
+ } catch (SynchException ex) {
+ log.error("error checking if synch is already running:{}", synchronization, ex);
+ throw new IdropRuntimeException("exception checking if synch is already running", ex);
+ }
+
+ pnlSynchIcon.removeAll();
+ lblSynchStatus = labelToUse;
+ pnlSynchIcon.add(lblSynchStatus);
+ pnlSynchIcon.validate();
+
+ }
}
class SynchListSelectionHandler implements ListSelectionListener {
- private final IDROPConfigurationPanel idropConfigurationPanel;
+ private final IDROPConfigurationPanel idropConfigurationPanel;
- SynchListSelectionHandler(final IDROPConfigurationPanel configurationPanel) {
- idropConfigurationPanel = configurationPanel;
- }
+ SynchListSelectionHandler(IDROPConfigurationPanel configurationPanel) {
+ this.idropConfigurationPanel = configurationPanel;
+ }
- @Override
- public void valueChanged(final ListSelectionEvent e) {
+ @Override
+ public void valueChanged(ListSelectionEvent e) {
- if (e.getValueIsAdjusting() == true) {
- return;
- }
+ if (e.getValueIsAdjusting() == true) {
+ return;
+ }
- ListSelectionModel lsm = (ListSelectionModel) e.getSource();
+ ListSelectionModel lsm = (ListSelectionModel) e.getSource();
- if (lsm.isSelectionEmpty()) {
- return;
- } else {
- // Find out which indexes are selected.
- int minIndex = lsm.getMinSelectionIndex();
- int maxIndex = lsm.getMaxSelectionIndex();
- for (int i = minIndex; i <= maxIndex; i++) {
- if (lsm.isSelectedIndex(i)) {
- idropConfigurationPanel.updateDetailsForSelectedSynch(i);
- }
- }
- }
+ if (lsm.isSelectionEmpty()) {
+ return;
+ } else {
+ // Find out which indexes are selected.
+ int minIndex = lsm.getMinSelectionIndex();
+ int maxIndex = lsm.getMaxSelectionIndex();
+ for (int i = minIndex; i <= maxIndex; i++) {
+ if (lsm.isSelectedIndex(i)) {
+ idropConfigurationPanel.updateDetailsForSelectedSynch(i);
+ }
+ }
+ }
- }
+ }
} \ No newline at end of file
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPDesktop.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPDesktop.java
index dac2fce..aa80d05 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPDesktop.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPDesktop.java
@@ -175,7 +175,7 @@ public class IDROPDesktop {
loginDialog.setLocation(x, y);
idropSplashWindow.toBack();
loginDialog.toFront();
- loginDialog.setVisible(true);
+ loginDialog.setVisible(!loginDialog.isLoginTrialSuccesful());
if (idropCore.getIrodsAccount() == null) {
log.warn("no login account, exiting");
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
index 95c47e0..c510978 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPSplashWindow.java
@@ -25,7 +25,7 @@ public class IDROPSplashWindow extends JWindow {
.getLogger(IDROPSplashWindow.class);
private ImageIcon splashImage = new ImageIcon(IDROPSplashWindow.class
.getClassLoader().getResource(
- "org/irods/jargon/idrop/desktop/images/iDrop.png"));
+ "org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.png"));
private JLabel jlblImage = new JLabel();
private JProgressBar jProgressBar1 = new JProgressBar();
private iDrop iDrop;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
index aa8775b..43f33c2 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.form
@@ -178,7 +178,7 @@
<Container class="javax.swing.JPanel" name="jPanel1">
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="1" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="1" gridY="10" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
@@ -201,6 +201,14 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkGuestLoginActionPerformed"/>
</Events>
</Component>
+ <Component class="javax.swing.JCheckBox" name="chkProxyLogin">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Use GSI"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkProxyLoginActionPerformed"/>
+ </Events>
+ </Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="lblLoginMode">
@@ -210,7 +218,7 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="0" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -226,7 +234,67 @@
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
- <GridBagConstraints gridX="1" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ <GridBagConstraints gridX="1" gridY="9" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblProxy">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Proxy location:"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="txtProxy">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="7" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JLabel" name="lblCerts">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Certificates location:"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="22" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="txtCerts">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="1" gridY="8" gridWidth="1" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="21" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnProxy">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose..."/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnProxyActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="7" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnCerts">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Choose..."/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnCertsActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="2" gridY="8" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
</Constraint>
</Constraints>
</Component>
@@ -244,6 +312,15 @@
<Property name="horizontalGap" type="int" value="2"/>
</Layout>
<SubComponents>
+ <Component class="javax.swing.JCheckBox" name="chkRememberPass">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Login Automatically"/>
+ <Property name="actionCommand" type="java.lang.String" value="Login Auto"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkRememberPassActionPerformed"/>
+ </Events>
+ </Component>
<Component class="javax.swing.JButton" name="btnOK">
<Properties>
<Property name="mnemonic" type="int" value="76"/>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
index fbdc6d2..b60cc97 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java
@@ -9,7 +9,14 @@ import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JComponent;
import javax.swing.JDialog;
+import javax.swing.JFileChooser;
import javax.swing.KeyStroke;
+import org.globus.gsi.GlobusCredential;
+import org.globus.gsi.GlobusCredentialException;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.irods.jargon.core.connection.GSIIRODSAccount;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.connection.auth.AuthResponse;
@@ -19,6 +26,7 @@ import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationServ
import org.irods.jargon.idrop.desktop.systraygui.utils.IdropPropertiesHelper;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
+import org.openide.util.Exceptions;
import org.slf4j.LoggerFactory;
/**
@@ -32,6 +40,12 @@ public class LoginDialog extends JDialog {
public static org.slf4j.Logger log = LoggerFactory
.getLogger(LoginDialog.class);
+ private boolean loginTrialSuccesful = false;
+
+ public boolean isLoginTrialSuccesful() {
+ return loginTrialSuccesful;
+ }
+
public LoginDialog(final JDialog parentDialog, final IDROPCore idropCore) {
super(parentDialog, true);
if (idropCore == null) {
@@ -39,7 +53,7 @@ public class LoginDialog extends JDialog {
}
this.idropCore = idropCore;
initComponents();
-
+
if (idropCore.getIdropConfig().isLoginPreset()) {
loginUsingPreset();
} else {
@@ -71,6 +85,18 @@ public class LoginDialog extends JDialog {
} else {
comboLoginMode.setSelectedItem(mode);
}
+
+ String proxy = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PROXY_LOCATION);
+
+ if(proxy!=null){
+ txtProxy.setText(proxy);
+ }
+
+ String certificates = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_CERTIFICATES_LOCATION);
+
+ if(certificates!=null){
+ txtCerts.setText(certificates);
+ }
txtPort.setText(port);
String zone = idropCore.getIdropConfig().getPropertyForKey(
@@ -82,7 +108,24 @@ public class LoginDialog extends JDialog {
String username = idropCore.getIdropConfig().getPropertyForKey(
IdropConfigurationService.ACCOUNT_CACHE_USER_NAME);
txtUserName.setText(username);
- hideAdvancedViewFields();
+
+
+ String save = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_SAVE_PASS);
+ boolean saveP = "true".equals(save);
+ if(saveP){
+ String savedPassword = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_PASSWORD);
+ password.setText(savedPassword);
+ chkRememberPass.setSelected(true);
+
+ String gsi = idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_AUTO_GSI);
+ boolean autoGsi = "true".equals(gsi);
+ chkProxyLogin.setSelected(autoGsi);
+
+ loginTrialSuccesful = !processLogin();
+ }
+
+ hideAdvancedViewFields();
+ hideProxyLoginFields();
}
private void loginUsingPreset() {
@@ -108,7 +151,7 @@ public class LoginDialog extends JDialog {
*/
private boolean processLogin() throws NumberFormatException {
// validate various inputs based on whether a full login, or a uid only
- // login is indicated
+ // login is indicated
if (!idropCore.getIdropConfig().isLoginPreset()) {
txtHost.setBackground(Color.white);
txtPort.setBackground(Color.white);
@@ -175,12 +218,18 @@ public class LoginDialog extends JDialog {
irodsAccount = IRODSAccount.instanceForAnonymous(
presetHost, presetPort, "", presetZone,
presetResource);
- } else {
+ } else if(chkProxyLogin.isSelected()){
+ GlobusCredential globusCred = new GlobusCredential(txtProxy.getText());
+ GSSCredential gssCred = new GlobusGSSCredentialImpl(globusCred,GSSCredential.INITIATE_AND_ACCEPT);
+ GSIIRODSAccount acc = GSIIRODSAccount.instance(presetHost, presetPort, gssCred, presetResource);
+ acc.setCertificateAuthority(txtCerts.getText());
+ irodsAccount = acc;
+ } else {
irodsAccount = IRODSAccount.instance(presetHost,
presetPort, txtUserName.getText(), new String(
password.getPassword()), sb.toString(),
presetZone, presetResource);
- }
+ }
} else {
sb.append('/');
sb.append(txtZone.getText());
@@ -192,7 +241,17 @@ public class LoginDialog extends JDialog {
.getText().trim(), Integer.parseInt(txtPort
.getText().trim()), "", txtZone.getText().trim(),
txtResource.getText().trim());
- } else {
+ } else if(chkProxyLogin.isSelected()){
+ // TODO
+ GlobusCredential globusCred = new GlobusCredential(txtProxy.getText());
+ GSSCredential gssCred = new GlobusGSSCredentialImpl(globusCred, GSSCredential.INITIATE_AND_ACCEPT);
+ GSIIRODSAccount acc = GSIIRODSAccount.instance(
+ txtHost.getText().trim(),
+ Integer.parseInt(txtPort.getText().trim()), gssCred, txtResource.getText().trim());
+ acc.setCertificateAuthority(txtCerts.getText().trim());
+ irodsAccount = acc;
+
+ } else{
irodsAccount = IRODSAccount.instance(txtHost.getText()
.trim(),
Integer.parseInt(txtPort.getText().trim()),
@@ -208,7 +267,15 @@ public class LoginDialog extends JDialog {
MessageManager.showError(this, ex.getMessage(),
MessageManager.TITLE_MESSAGE);
return true;
- }
+ } catch (GlobusCredentialException ex) {
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,null,ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ return true;
+ } catch (GSSException ex) {
+ Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE,null,ex);
+ MessageManager.showError(this, ex.getMessage(), MessageManager.TITLE_MESSAGE);
+ return true;
+ }
if (comboLoginMode.getSelectedItem().toString()
.equals(IRODSAccount.AuthScheme.PAM.name())) {
@@ -230,7 +297,18 @@ public class LoginDialog extends JDialog {
.getAuthenticatedIRODSAccount());
try {
idropCore.getIdropConfigurationService()
- .saveLogin(irodsAccount);
+
+ .saveLogin(irodsAccount, chkRememberPass.isSelected());
+
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_PROXY_LOCATION, txtProxy.getText());
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_CERTIFICATES_LOCATION, txtCerts.getText());
+ if(chkProxyLogin.isSelected()){
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_AUTO_GSI,"true");
+ }else{
+ idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_AUTO_GSI,"false");
+ }
+ //todo save proxy path and certificates location
+
} catch (IdropException ex) {
throw new IdropRuntimeException("error saving irodsAccount", ex);
}
@@ -308,210 +386,315 @@ public class LoginDialog extends JDialog {
// <editor-fold defaultstate="collapsed"
// <editor-fold defaultstate="collapsed"
- // desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
- java.awt.GridBagConstraints gridBagConstraints;
-
- pnlLoginInfo = new javax.swing.JPanel();
- lblHost = new javax.swing.JLabel();
- txtHost = new javax.swing.JTextField();
- lblPort = new javax.swing.JLabel();
- txtPort = new javax.swing.JTextField();
- lblZone = new javax.swing.JLabel();
- txtZone = new javax.swing.JTextField();
- lblResource = new javax.swing.JLabel();
- txtResource = new javax.swing.JTextField();
- lblUserName = new javax.swing.JLabel();
- txtUserName = new javax.swing.JTextField();
- lblPassword = new javax.swing.JLabel();
- password = new javax.swing.JPasswordField();
- jPanel1 = new javax.swing.JPanel();
- chkAdvancedLogin = new javax.swing.JCheckBox();
- chkGuestLogin = new javax.swing.JCheckBox();
- lblLoginMode = new javax.swing.JLabel();
- comboLoginMode = new javax.swing.JComboBox();
- pnlToolbar = new javax.swing.JPanel();
- btnOK = new javax.swing.JButton();
- btnCancel = new javax.swing.JButton();
- lblLogin = new javax.swing.JLabel();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- pnlLoginInfo.setLayout(new java.awt.GridBagLayout());
-
- lblHost.setText("Host:");
- lblHost.setMaximumSize(new java.awt.Dimension(40, 14));
- lblHost.setMinimumSize(new java.awt.Dimension(30, 14));
- lblHost.setPreferredSize(null);
- lblHost.setRequestFocusEnabled(false);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlLoginInfo.add(lblHost, gridBagConstraints);
-
- txtHost.setColumns(30);
- txtHost.setPreferredSize(null);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 1;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtHost, gridBagConstraints);
-
- lblPort.setText("Port:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
- pnlLoginInfo.add(lblPort, gridBagConstraints);
-
- txtPort.setColumns(30);
- txtPort.setText("1247");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 2;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtPort, gridBagConstraints);
-
- lblZone.setText("Zone:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlLoginInfo.add(lblZone, gridBagConstraints);
-
- txtZone.setColumns(30);
- txtZone.setPreferredSize(null);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 3;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtZone, gridBagConstraints);
-
- lblResource.setText("Resource:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlLoginInfo.add(lblResource, gridBagConstraints);
-
- txtResource.setColumns(30);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 4;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtResource, gridBagConstraints);
-
- lblUserName.setText("User Name:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlLoginInfo.add(lblUserName, gridBagConstraints);
-
- txtUserName.setColumns(30);
- txtUserName.setPreferredSize(null);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 5;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(txtUserName, gridBagConstraints);
-
- lblPassword.setText("Password:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
- pnlLoginInfo.add(lblPassword, gridBagConstraints);
-
- password.setColumns(30);
- password.setPreferredSize(null);
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 6;
- gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
- pnlLoginInfo.add(password, gridBagConstraints);
-
- chkAdvancedLogin.setText("Advanced Login Settings");
- chkAdvancedLogin.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- chkAdvancedLoginActionPerformed(evt);
- }
- });
- jPanel1.add(chkAdvancedLogin);
-
- chkGuestLogin.setText("Login As Guest");
- chkGuestLogin.setToolTipText("Use a guest login");
- chkGuestLogin.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- chkGuestLoginActionPerformed(evt);
- }
- });
- jPanel1.add(chkGuestLogin);
-
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 8;
- pnlLoginInfo.add(jPanel1, gridBagConstraints);
-
- lblLoginMode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
- lblLoginMode.setText("Login Mode:");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 0;
- gridBagConstraints.gridy = 7;
- pnlLoginInfo.add(lblLoginMode, gridBagConstraints);
-
- comboLoginMode.setModel(new javax.swing.DefaultComboBoxModel(
- new String[] { "Standard", "PAM" }));
- comboLoginMode.setToolTipText("Authentication mode used at login");
- gridBagConstraints = new java.awt.GridBagConstraints();
- gridBagConstraints.gridx = 1;
- gridBagConstraints.gridy = 7;
- gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
- pnlLoginInfo.add(comboLoginMode, gridBagConstraints);
-
- getContentPane().add(pnlLoginInfo, java.awt.BorderLayout.CENTER);
-
- pnlToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT,
- 2, 5));
-
- btnOK.setMnemonic('L');
- btnOK.setText("Login");
- btnOK.setMaximumSize(new java.awt.Dimension(100, 100));
- btnOK.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnOKActionPerformed(evt);
- }
- });
- pnlToolbar.add(btnOK);
-
- btnCancel.setMnemonic('c');
- btnCancel.setText("Cancel");
- btnCancel.setMaximumSize(new java.awt.Dimension(100, 100));
- btnCancel.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnCancelActionPerformed(evt);
- }
- });
- pnlToolbar.add(btnCancel);
-
- getContentPane().add(pnlToolbar, java.awt.BorderLayout.SOUTH);
-
- lblLogin.setText("Please log in to your iDrop data grid");
- getContentPane().add(lblLogin, java.awt.BorderLayout.PAGE_START);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+ java.awt.GridBagConstraints gridBagConstraints;
+
+ pnlLoginInfo = new javax.swing.JPanel();
+ lblHost = new javax.swing.JLabel();
+ txtHost = new javax.swing.JTextField();
+ lblPort = new javax.swing.JLabel();
+ txtPort = new javax.swing.JTextField();
+ lblZone = new javax.swing.JLabel();
+ txtZone = new javax.swing.JTextField();
+ lblResource = new javax.swing.JLabel();
+ txtResource = new javax.swing.JTextField();
+ lblUserName = new javax.swing.JLabel();
+ txtUserName = new javax.swing.JTextField();
+ lblPassword = new javax.swing.JLabel();
+ password = new javax.swing.JPasswordField();
+ jPanel1 = new javax.swing.JPanel();
+ chkAdvancedLogin = new javax.swing.JCheckBox();
+ chkGuestLogin = new javax.swing.JCheckBox();
+ chkProxyLogin = new javax.swing.JCheckBox();
+ lblLoginMode = new javax.swing.JLabel();
+ comboLoginMode = new javax.swing.JComboBox();
+ lblProxy = new javax.swing.JLabel();
+ txtProxy = new javax.swing.JTextField();
+ lblCerts = new javax.swing.JLabel();
+ txtCerts = new javax.swing.JTextField();
+ btnProxy = new javax.swing.JButton();
+ btnCerts = new javax.swing.JButton();
+ pnlToolbar = new javax.swing.JPanel();
+ chkRememberPass = new javax.swing.JCheckBox();
+ btnOK = new javax.swing.JButton();
+ btnCancel = new javax.swing.JButton();
+ lblLogin = new javax.swing.JLabel();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ pnlLoginInfo.setLayout(new java.awt.GridBagLayout());
+
+ lblHost.setText("Host:");
+ lblHost.setMaximumSize(new java.awt.Dimension(40, 14));
+ lblHost.setMinimumSize(new java.awt.Dimension(30, 14));
+ lblHost.setPreferredSize(null);
+ lblHost.setRequestFocusEnabled(false);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlLoginInfo.add(lblHost, gridBagConstraints);
+
+ txtHost.setColumns(30);
+ txtHost.setPreferredSize(null);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 1;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtHost, gridBagConstraints);
+
+ lblPort.setText("Port:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+ pnlLoginInfo.add(lblPort, gridBagConstraints);
+
+ txtPort.setColumns(30);
+ txtPort.setText("1247");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 2;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtPort, gridBagConstraints);
+
+ lblZone.setText("Zone:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblZone, gridBagConstraints);
+
+ txtZone.setColumns(30);
+ txtZone.setPreferredSize(null);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 3;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtZone, gridBagConstraints);
+
+ lblResource.setText("Resource:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblResource, gridBagConstraints);
+
+ txtResource.setColumns(30);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 4;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtResource, gridBagConstraints);
+
+ lblUserName.setText("User Name:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblUserName, gridBagConstraints);
+
+ txtUserName.setColumns(30);
+ txtUserName.setPreferredSize(null);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 5;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(txtUserName, gridBagConstraints);
+
+ lblPassword.setText("Password:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblPassword, gridBagConstraints);
+
+ password.setColumns(30);
+ password.setPreferredSize(null);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 6;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+ pnlLoginInfo.add(password, gridBagConstraints);
+
+ chkAdvancedLogin.setText("Advanced Login Settings");
+ chkAdvancedLogin.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ chkAdvancedLoginActionPerformed(evt);
+ }
+ });
+ jPanel1.add(chkAdvancedLogin);
+
+ chkGuestLogin.setText("Login As Guest");
+ chkGuestLogin.setToolTipText("Use a guest login");
+ chkGuestLogin.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ chkGuestLoginActionPerformed(evt);
+ }
+ });
+ jPanel1.add(chkGuestLogin);
+
+ chkProxyLogin.setText("Use GSI");
+ chkProxyLogin.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ chkProxyLoginActionPerformed(evt);
+ }
+ });
+ jPanel1.add(chkProxyLogin);
+
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 10;
+ pnlLoginInfo.add(jPanel1, gridBagConstraints);
+
+ lblLoginMode.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+ lblLoginMode.setText("Login Mode:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 9;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblLoginMode, gridBagConstraints);
+
+ comboLoginMode.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Standard", "PAM" }));
+ comboLoginMode.setToolTipText("Authentication mode used at login");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 9;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlLoginInfo.add(comboLoginMode, gridBagConstraints);
+
+ lblProxy.setText("Proxy location:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblProxy, gridBagConstraints);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 7;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ pnlLoginInfo.add(txtProxy, gridBagConstraints);
+
+ lblCerts.setText("Certificates location:");
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 8;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END;
+ pnlLoginInfo.add(lblCerts, gridBagConstraints);
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 1;
+ gridBagConstraints.gridy = 8;
+ gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START;
+ pnlLoginInfo.add(txtCerts, gridBagConstraints);
+
+ btnProxy.setText("Choose...");
+ btnProxy.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnProxyActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 7;
+ pnlLoginInfo.add(btnProxy, gridBagConstraints);
+
+ btnCerts.setText("Choose...");
+ btnCerts.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnCertsActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 2;
+ gridBagConstraints.gridy = 8;
+ pnlLoginInfo.add(btnCerts, gridBagConstraints);
+
+ getContentPane().add(pnlLoginInfo, java.awt.BorderLayout.CENTER);
+
+ pnlToolbar.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 2, 5));
+
+ chkRememberPass.setText("Login Automatically");
+ chkRememberPass.setActionCommand("Login Auto");
+ chkRememberPass.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ chkRememberPassActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(chkRememberPass);
+
+ btnOK.setMnemonic('L');
+ btnOK.setText("Login");
+ btnOK.setMaximumSize(new java.awt.Dimension(100, 100));
+ btnOK.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnOKActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(btnOK);
+
+ btnCancel.setMnemonic('c');
+ btnCancel.setText("Cancel");
+ btnCancel.setMaximumSize(new java.awt.Dimension(100, 100));
+ btnCancel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnCancelActionPerformed(evt);
+ }
+ });
+ pnlToolbar.add(btnCancel);
+
+ getContentPane().add(pnlToolbar, java.awt.BorderLayout.SOUTH);
+
+ lblLogin.setText("Please log in to your iDrop data grid");
+ getContentPane().add(lblLogin, java.awt.BorderLayout.PAGE_START);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void chkRememberPassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRememberPassActionPerformed
+ // TODO add your handling code here:
+ }//GEN-LAST:event_chkRememberPassActionPerformed
+
+ private void chkProxyLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkProxyLoginActionPerformed
+ if(chkProxyLogin.isSelected()){
+ chkGuestLogin.setSelected(false);
+ //hide username/pass
+ hideForGuestLogin();
+ showProxyLoginFields();
+ }else{
+ //show username/password
+ showWhenGuestLogin();
+ hideProxyLoginFields();
+ }
+ }//GEN-LAST:event_chkProxyLoginActionPerformed
+
+ private void btnProxyActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnProxyActionPerformed
+ final JFileChooser chooser = new JFileChooser();
+ chooser.setFileHidingEnabled(false);
+ int res = chooser.showOpenDialog(this);
+ if(res == JFileChooser.APPROVE_OPTION){
+ if(chooser.getSelectedFile().canRead()){
+ txtProxy.setText(chooser.getSelectedFile().getAbsolutePath());
+ }
+ }
+ }//GEN-LAST:event_btnProxyActionPerformed
+
+ private void btnCertsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCertsActionPerformed
+ final JFileChooser chooser = new JFileChooser();
+ chooser.setFileHidingEnabled(false);
+ chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+ int res = chooser.showOpenDialog(this);
+ if(res == JFileChooser.APPROVE_OPTION){
+ txtCerts.setText(chooser.getSelectedFile().getAbsolutePath());
+ }
+ }//GEN-LAST:event_btnCertsActionPerformed
private void chkAdvancedLoginActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkAdvancedLoginActionPerformed
@@ -526,9 +709,12 @@ public class LoginDialog extends JDialog {
private void chkGuestLoginActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkGuestLoginActionPerformed
if (chkGuestLogin.isSelected()) {
+ chkProxyLogin.setSelected(false);
+ hideProxyLoginFields();
hideForGuestLogin();
+
} else {
- showWhenGuestLogin();
+ showWhenGuestLogin();
}
}// GEN-LAST:event_chkGuestLoginActionPerformed
@@ -539,60 +725,95 @@ public class LoginDialog extends JDialog {
private void btnCancelActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnCancelActionPerformed
dispose();
}// GEN-LAST:event_btnCancelActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
-
- private javax.swing.JButton btnCancel;
- private javax.swing.JButton btnOK;
- private javax.swing.JCheckBox chkAdvancedLogin;
- private javax.swing.JCheckBox chkGuestLogin;
- private javax.swing.JComboBox comboLoginMode;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JLabel lblHost;
- private javax.swing.JLabel lblLogin;
- private javax.swing.JLabel lblLoginMode;
- private javax.swing.JLabel lblPassword;
- private javax.swing.JLabel lblPort;
- private javax.swing.JLabel lblResource;
- private javax.swing.JLabel lblUserName;
- private javax.swing.JLabel lblZone;
- private javax.swing.JPasswordField password;
- private javax.swing.JPanel pnlLoginInfo;
- private javax.swing.JPanel pnlToolbar;
- private javax.swing.JTextField txtHost;
- private javax.swing.JTextField txtPort;
- private javax.swing.JTextField txtResource;
- private javax.swing.JTextField txtUserName;
- private javax.swing.JTextField txtZone;
-
- // End of variables declaration//GEN-END:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnCancel;
+ private javax.swing.JButton btnCerts;
+ private javax.swing.JButton btnOK;
+ private javax.swing.JButton btnProxy;
+ private javax.swing.JCheckBox chkAdvancedLogin;
+ private javax.swing.JCheckBox chkGuestLogin;
+ private javax.swing.JCheckBox chkProxyLogin;
+ private javax.swing.JCheckBox chkRememberPass;
+ private javax.swing.JComboBox comboLoginMode;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JLabel lblCerts;
+ private javax.swing.JLabel lblHost;
+ private javax.swing.JLabel lblLogin;
+ private javax.swing.JLabel lblLoginMode;
+ private javax.swing.JLabel lblPassword;
+ private javax.swing.JLabel lblPort;
+ private javax.swing.JLabel lblProxy;
+ private javax.swing.JLabel lblResource;
+ private javax.swing.JLabel lblUserName;
+ private javax.swing.JLabel lblZone;
+ private javax.swing.JPasswordField password;
+ private javax.swing.JPanel pnlLoginInfo;
+ private javax.swing.JPanel pnlToolbar;
+ private javax.swing.JTextField txtCerts;
+ private javax.swing.JTextField txtHost;
+ private javax.swing.JTextField txtPort;
+ private javax.swing.JTextField txtProxy;
+ private javax.swing.JTextField txtResource;
+ private javax.swing.JTextField txtUserName;
+ private javax.swing.JTextField txtZone;
+ // End of variables declaration//GEN-END:variables
private void showAdvancedViewFields() {
- txtResource.setVisible(true);
- txtPort.setVisible(true);
- lblPort.setVisible(true);
- lblResource.setVisible(true);
+ lblHost.setVisible(true);
+ txtHost.setVisible(true);
+ lblZone.setVisible(true);
+ txtZone.setVisible(true);
+ txtResource.setVisible(true);
+ txtPort.setVisible(true);
+ lblPort.setVisible(true);
+ lblResource.setVisible(true);
}
private void hideAdvancedViewFields() {
- txtResource.setVisible(false);
- txtPort.setVisible(false);
- lblPort.setVisible(false);
- lblResource.setVisible(false);
+ lblHost.setVisible(false);
+ txtHost.setVisible(false);
+ lblZone.setVisible(false);
+ txtZone.setVisible(false);
+ txtResource.setVisible(false);
+ txtPort.setVisible(false);
+ lblPort.setVisible(false);
+ lblResource.setVisible(false);
}
private void hideForGuestLogin() {
- lblUserName.setVisible(false);
- txtUserName.setVisible(false);
- lblPassword.setVisible(false);
- password.setVisible(false);
- lblLoginMode.setVisible(false);
- comboLoginMode.setVisible(false);
+ lblUserName.setVisible(false);
+ txtUserName.setVisible(false);
+ lblPassword.setVisible(false);
+ password.setVisible(false);
+ lblLoginMode.setVisible(false);
+ comboLoginMode.setVisible(false);
}
private void showWhenGuestLogin() {
- lblUserName.setVisible(true);
- txtUserName.setVisible(true);
- lblPassword.setVisible(true);
- password.setVisible(true);
+ lblUserName.setVisible(true);
+ txtUserName.setVisible(true);
+ lblPassword.setVisible(true);
+ password.setVisible(true);
}
+
+ private void showProxyLoginFields(){
+ lblProxy.setVisible(true);
+ txtProxy.setVisible(true);
+ btnProxy.setVisible(true);
+ lblCerts.setVisible(true);
+ txtCerts.setVisible(true);
+ btnCerts.setVisible(true);
+ }
+
+ private void hideProxyLoginFields(){
+ lblProxy.setVisible(false);
+ txtProxy.setVisible(false);
+ btnProxy.setVisible(false);
+ lblCerts.setVisible(false);
+ txtCerts.setVisible(false);
+ btnCerts.setVisible(false);
+ }
+
+
+
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form
new file mode 100644
index 0000000..173ab2c
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.form
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane1" alignment="0" pref="470" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane1" alignment="0" pref="171" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="panel">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[426, 158]"/>
+ </Property>
+ </Properties>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" pref="75" max="-2" attributes="0"/>
+ <Component id="jComboBox1" min="-2" pref="235" max="-2" attributes="0"/>
+ <EmptySpace pref="109" max="32767" attributes="0"/>
+ <Component id="btnDel" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="btnAdd" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="btnDel" min="-2" max="-2" attributes="0"/>
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="jComboBox1" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Component id="btnAdd" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="109" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnAdd">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="+"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnDel">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="x"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDelActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="jComboBox1">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="2">
+ <StringItem index="0" value="Every condition fullfiled"/>
+ <StringItem index="1" value="At least one condition fullfiled"/>
+ </StringArray>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java
new file mode 100644
index 0000000..34c4805
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanel.java
@@ -0,0 +1,165 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import java.awt.Dimension;
+import java.awt.event.ItemListener;
+import java.util.LinkedList;
+import javax.swing.JComponent;
+
+/**
+ *
+ * @author Hanka
+ */
+public class MetaPanel extends JComponent {
+
+ private int counter = 0;
+ MetaSearch metasearch;
+ LinkedList <MetaPanelOne> panels = new LinkedList();
+
+ public MetaPanel(MetaSearch m) {
+ metasearch=m;
+ initComponents();
+ btnAddActionPerformed(null);
+ if (metasearch.panels.size()==0) btnDel.setVisible(false);
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jScrollPane1 = new javax.swing.JScrollPane();
+ panel = new javax.swing.JPanel();
+ btnAdd = new javax.swing.JButton();
+ btnDel = new javax.swing.JButton();
+ jComboBox1 = new javax.swing.JComboBox();
+
+ panel.setPreferredSize(new java.awt.Dimension(426, 158));
+
+ btnAdd.setText("+");
+ btnAdd.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnAddActionPerformed(evt);
+ }
+ });
+
+ btnDel.setText("x");
+ btnDel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnDelActionPerformed(evt);
+ }
+ });
+
+ jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Every condition fullfiled", "At least one condition fullfiled" }));
+
+ javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);
+ panel.setLayout(panelLayout);
+ panelLayout.setHorizontalGroup(
+ panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelLayout.createSequentialGroup()
+ .addGap(75, 75, 75)
+ .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
+ .addComponent(btnDel)
+ .addContainerGap())
+ .addGroup(panelLayout.createSequentialGroup()
+ .addComponent(btnAdd)
+ .addGap(0, 0, Short.MAX_VALUE))
+ );
+ panelLayout.setVerticalGroup(
+ panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(panelLayout.createSequentialGroup()
+ .addGroup(panelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(btnDel)
+ .addGroup(panelLayout.createSequentialGroup()
+ .addContainerGap()
+ .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addComponent(btnAdd)
+ .addContainerGap(109, Short.MAX_VALUE))
+ );
+
+ jScrollPane1.setViewportView(panel);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 470, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 171, Short.MAX_VALUE)
+ );
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddActionPerformed
+ MetaPanelOne dp = new MetaPanelOne(this);
+ dp.setBounds(50,50+23*getCounter(),390,23);
+ panel.add(dp);
+ dp.setVisible(true);
+ panel.setPreferredSize(new Dimension(panel.getWidth(), dp.getY()+dp.getHeight()-panel.getY()+2));
+ metasearch.pack();
+ setCounter(getCounter() + 1);
+ panels.add(dp);
+ if (panels.size()==2) panels.getFirst().DelVisible();
+ }//GEN-LAST:event_btnAddActionPerformed
+
+ private void btnDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelActionPerformed
+ if (metasearch.panels.size()==2) metasearch.panels.getFirst().btnDel.setVisible(false);
+ if (metasearch.panels.size()>1){
+ setCounter(0);
+ this.setVisible(false);
+ //this=null;
+ metasearch.combos.getLast().setVisible(false);
+ metasearch.combos.removeLast();
+ metasearch.panels.remove(this);
+ for (MetaPanel one: metasearch.panels){
+ one.setLocation(0,193*getCounter());
+ setCounter(getCounter() + 1);
+ }
+ metasearch.setCounter(getCounter());
+ metasearch.setBtnNew(0, metasearch.panels.getLast().getY()+metasearch.panels.getLast().getHeight());
+ }
+ if (metasearch.panels.size()==1) metasearch.panels.getFirst().btnDel.setVisible(false);
+ }//GEN-LAST:event_btnDelActionPerformed
+
+ void DelVisible(){
+ btnDel.setVisible(true);
+ }
+
+ int combo(){
+ return jComboBox1.getSelectedIndex();
+ }
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnAdd;
+ private javax.swing.JButton btnDel;
+ private javax.swing.JComboBox jComboBox1;
+ private javax.swing.JScrollPane jScrollPane1;
+ private javax.swing.JPanel panel;
+ // End of variables declaration//GEN-END:variables
+
+ /**
+ * @return the counter
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * @param counter the counter to set
+ */
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+
+
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form
new file mode 100644
index 0000000..2ecd51b
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.form
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="panel" alignment="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="panel" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="panel">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[383, 23]"/>
+ </Property>
+ </Properties>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
+ <Property name="useNullLayout" type="boolean" value="true"/>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JTextField" name="txtAtr">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Attribute"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="0" y="1" width="100" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="cmbOp">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="8">
+ <StringItem index="0" value="&gt;"/>
+ <StringItem index="1" value="&gt;="/>
+ <StringItem index="2" value="&lt;"/>
+ <StringItem index="3" value="&lt;="/>
+ <StringItem index="4" value="="/>
+ <StringItem index="5" value="&lt;&gt;"/>
+ <StringItem index="6" value="like"/>
+ <StringItem index="7" value="not like"/>
+ </StringArray>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="130" y="1" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JTextField" name="txtVal">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Value"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="217" y="1" width="100" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnDel">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="-"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDelActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="336" y="0" width="50" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java
new file mode 100644
index 0000000..dbf73f4
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaPanelOne.java
@@ -0,0 +1,132 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+/**
+ *
+ * @author Hanka
+ */
+public class MetaPanelOne extends javax.swing.JPanel {
+
+ private int counter;
+ MetaPanel metapanel;
+
+ public MetaPanelOne(MetaPanel m) {
+ initComponents();
+ metapanel=m;
+ if (metapanel.panels.size()==0) btnDel.setVisible(false);
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ panel = new javax.swing.JPanel();
+ txtAtr = new javax.swing.JTextField();
+ cmbOp = new javax.swing.JComboBox();
+ txtVal = new javax.swing.JTextField();
+ btnDel = new javax.swing.JButton();
+
+ panel.setPreferredSize(new java.awt.Dimension(383, 23));
+ panel.setLayout(null);
+
+ txtAtr.setText("Attribute");
+ panel.add(txtAtr);
+ txtAtr.setBounds(0, 1, 100, 20);
+
+ cmbOp.setModel(new javax.swing.DefaultComboBoxModel(new String[] { ">", ">=", "<", "<=", "=", "<>", "like", "not like" }));
+ panel.add(cmbOp);
+ cmbOp.setBounds(130, 1, 59, 20);
+
+ txtVal.setText("Value");
+ panel.add(txtVal);
+ txtVal.setBounds(217, 1, 100, 20);
+
+ btnDel.setText("-");
+ btnDel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnDelActionPerformed(evt);
+ }
+ });
+ panel.add(btnDel);
+ btnDel.setBounds(336, 0, 50, 23);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
+ this.setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(panel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(panel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ );
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnDelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDelActionPerformed
+ if (metapanel.panels.size()>1){
+ setCounter(0);
+ this.setVisible(false);
+ metapanel.panels.remove(this);
+ for (MetaPanelOne one: metapanel.panels){
+ one.setBounds(50,50+23*getCounter(),390,23);
+ setCounter(getCounter() + 1);
+ }
+ metapanel.setCounter(getCounter());
+ }
+ if (metapanel.panels.size()==1) metapanel.panels.getFirst().btnDel.setVisible(false);
+ }//GEN-LAST:event_btnDelActionPerformed
+
+
+ void DelVisible(){
+ btnDel.setVisible(true);
+ }
+
+
+ boolean checktxt (){
+ if (txtAtr.getText().equals("") || txtVal.getText().equals("")) return false;
+ else return true;
+ }
+
+ String atr (){
+ return txtAtr.getText();
+ }
+
+ String val (){
+ return txtVal.getText();
+ }
+
+ int combo (){
+ return cmbOp.getSelectedIndex();
+ }
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnDel;
+ private javax.swing.JComboBox cmbOp;
+ private javax.swing.JPanel panel;
+ private javax.swing.JTextField txtAtr;
+ private javax.swing.JTextField txtVal;
+ // End of variables declaration//GEN-END:variables
+
+ /**
+ * @return the counter
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * @param counter the counter to set
+ */
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form
new file mode 100644
index 0000000..8f9985b
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.form
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jScrollPane2" alignment="0" pref="617" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <Component id="jScrollPane2" min="-2" pref="464" max="-2" attributes="0"/>
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JScrollPane" name="jScrollPane2">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="panel">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout">
+ <Property name="useNullLayout" type="boolean" value="true"/>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnNew">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="New condition node"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[165453, 6486483]"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnNewActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnSearch">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Search"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSearchActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
+ <AbsoluteConstraints x="485" y="0" width="100" height="60"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java
new file mode 100644
index 0000000..d053928
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/MetaSearch.java
@@ -0,0 +1,462 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import javax.swing.JComboBox;
+import javax.swing.JFrame;
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTable;
+import javax.swing.JTextField;
+import javax.swing.table.DefaultTableModel;
+import org.irods.jargon.core.exception.JargonException;
+import org.irods.jargon.core.pub.DataObjectAO;
+//import org.irods.jargon.core.query.MetaDataSet;
+import org.irods.jargon.core.query.AVUQueryElement;
+import org.irods.jargon.core.query.AVUQueryElement.AVUQueryPart;
+import org.irods.jargon.core.query.AVUQueryOperatorEnum;
+import org.irods.jargon.core.query.JargonQueryException;
+import org.irods.jargon.core.query.MetaDataAndDomainData;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author Hanka
+ */
+public class MetaSearch extends javax.swing.JDialog {
+
+ private int counter=0;
+ LinkedList <MetaPanel> panels = new LinkedList();
+ LinkedList <JComboBox> combos = new LinkedList();
+
+ IDROPCore idrop;
+ iDrop idropgui;
+ /*
+ public MetaSearch(java.awt.Frame parent, boolean modal) {
+ super(parent, modal);
+ initComponents();
+ this.setTitle("MetaSearch");
+ }
+ */
+
+ public MetaSearch(iDrop parent, boolean modal,IDROPCore a) {
+ super(parent, modal);
+ initComponents();
+ this.setTitle("MetaSearch");
+ idrop=a;
+ idropgui=parent;
+ btnNewActionPerformed(null);
+ }
+
+ /**
+ * This method is called from within the constructor to initialize the form.
+ * WARNING: Do NOT modify this code. The content of this method is always
+ * regenerated by the Form Editor.
+ */
+ @SuppressWarnings("unchecked")
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jScrollPane2 = new javax.swing.JScrollPane();
+ panel = new javax.swing.JPanel();
+ btnNew = new javax.swing.JButton();
+ btnSearch = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+
+ panel.setLayout(null);
+
+ btnNew.setText("New condition node");
+ btnNew.setMaximumSize(new java.awt.Dimension(165453, 6486483));
+ btnNew.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnNewActionPerformed(evt);
+ }
+ });
+ panel.add(btnNew);
+ btnNew.setBounds(0, 0, 127, 23);
+
+ btnSearch.setText("Search");
+ btnSearch.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnSearchActionPerformed(evt);
+ }
+ });
+ panel.add(btnSearch);
+ btnSearch.setBounds(485, 0, 100, 60);
+
+ jScrollPane2.setViewportView(panel);
+
+ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+ getContentPane().setLayout(layout);
+ layout.setHorizontalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)
+ );
+ layout.setVerticalGroup(
+ layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addGroup(layout.createSequentialGroup()
+ .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 464, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGap(0, 0, Short.MAX_VALUE))
+ );
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ //funkcja zwracająca warunek do dodania
+
+
+ public static boolean isInt(String str) {
+ try {
+ Integer.parseInt(str);
+ } catch (NumberFormatException ex) {
+ return false;
+ }
+ return true;
+ }
+
+ AVUQueryElement condition(int op, String val) throws JargonQueryException{
+ //atr: atr - 0; val - 1;
+ //op: > - 0; >= - 1; < - 2; <= - 3; = - 4; <> - 5; like - 6; not like - 7;
+ //dla liczb: >=- 8, < - 9, <= - 10
+ if (isInt(val)) {
+ if (op==1) op=8;
+ else if(op==2) op=9;
+ else if (op==3) op=10;
+ }
+ switch(op){
+ case 0:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.GREATER_THAN,val);
+ case 1:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.GREATER_OR_EQUAL,val);
+ case 2:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LESS_THAN,val);
+ case 3:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LESS_OR_EQUAL,val);
+ case 4:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.EQUAL,val);
+ case 5:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NOT_EQUAL,val);
+ case 6:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.LIKE,val);
+ case 7:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NOT_LIKE,val);
+ case 8:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NUM_GREATER_OR_EQUAL,val);
+ case 9:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NUM_LESS_THAN,val);
+ case 10:
+ return AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.VALUE, AVUQueryOperatorEnum.NUM_LESS_OR_EQUAL,val);
+ }
+ return null;
+ }
+
+
+ //szukanie wewnątrz węzła dla przynjamniej jednego warunku spełnionego
+ //zwraca częściową listę wynikową
+ List<MetaDataAndDomainData> node_or(int big, MetaPanel panel) {
+
+ List<AVUQueryElement> avuQueryElements = new ArrayList<AVUQueryElement>(); // lista warunków
+ List<MetaDataAndDomainData> metadataElementspom; //pomocnicza lista wynikow
+ List<MetaDataAndDomainData> metadataElements=new LinkedList<MetaDataAndDomainData>(); //lista wynikow
+ int ktory=0;
+ int small=0;
+ try{
+ DataObjectAO dataObjectAO = idrop.getIrodsFileSystem()
+ .getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
+ //dla każdego z warunków
+ for (MetaPanelOne one: panel.panels){
+ //atr: atr - 0; val - 1;
+ //op: > - 0; >= - 1; < - 2; <= - 3; = - 4; <> - 5; like - 6; not like - 7;
+ //dla liczb: >=- 8, < - 9, <= - 10
+ //atrybut taki sam i sprawdza wartość
+ avuQueryElements.clear();
+ avuQueryElements.add(AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.EQUAL, panels.get(big).panels.get(small).atr())); //atrybut równy wpisanemu
+//jeśli liczba
+ avuQueryElements.add(condition(one.combo(),panels.get(big).panels.get(small).val())); //wartość porównywana zgodnie z wybranym operatorem
+ if (ktory==0) {
+ //jeśli pierwszy warunek sprawdzany to wszytskie wyniki zapisz do listy wynikowej
+ metadataElements= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements); //lista wyników
+ ktory=1;
+ } else {
+ //jeśli kolejny warunek sprawdź, czy ten plik nie jest już na liście i jeśli nie to dodaj do listy
+ metadataElementspom = dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
+ for(MetaDataAndDomainData to:metadataElementspom) {
+ int czy=0;
+ for (MetaDataAndDomainData aaa: metadataElements) {
+ if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
+ czy=1;
+ break;
+ }
+ }
+ if(czy==0) metadataElements.add(to);
+ }
+ }
+ small++;
+ }
+ } catch (JargonQueryException ex) {
+ Exceptions.printStackTrace(ex);
+ } catch (JargonException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ return metadataElements;
+ }
+
+ //szukanie wewnątrz węzła dla każdego warunku spełnionego
+ //zwraca częściową listę wynikową
+ List<MetaDataAndDomainData> node_and(int big, MetaPanel panel) {
+ List<AVUQueryElement> avuQueryElements = new ArrayList<AVUQueryElement>(); // lista warunków
+ List<MetaDataAndDomainData> metadataElementspom1=null; //pomocnicza lista wynikow 1
+ List<MetaDataAndDomainData> metadataElementspom2; //pomocnicza lista wynikow 2
+ List<MetaDataAndDomainData> metadataElements=null; //lista wynikow
+ int ktory=0;
+ int small=0;
+ try{
+ DataObjectAO dataObjectAO = idrop.getIrodsFileSystem()
+ .getIRODSAccessObjectFactory().getDataObjectAO(idrop.getIrodsAccount());
+ //dla każdego z warunków
+ for (MetaPanelOne one: panel.panels){
+ avuQueryElements.clear();
+ avuQueryElements.add(AVUQueryElement.instanceForValueQuery
+ (AVUQueryPart.ATTRIBUTE, AVUQueryOperatorEnum.EQUAL, panels.get(big).panels.get(small).atr())); //atrybut równy wpisanemu
+// jeśli liczba
+ avuQueryElements.add(condition(one.combo(),panels.get(big).panels.get(small).val())); //wartość porównywana zgodnie z wybranym operatorem
+ if (ktory==0) {
+ //jeśli pierwszy warunek sprawdzany to wszytskie wyniki zapisz do listy wynikowej
+ metadataElementspom1= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);//lista wyników
+ metadataElements= dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
+ if (metadataElementspom1.isEmpty()) return metadataElementspom1;
+ ktory=1;
+ } else {
+ //jeśli kolejny warunek sprawdź, czy ten plik jest już na liście i jeśli nie to usun z listy
+ metadataElements.clear();
+ metadataElementspom2 = dataObjectAO.findMetadataValuesByMetadataQuery(avuQueryElements);
+ int czy=0;
+ for(MetaDataAndDomainData to:metadataElementspom2) {
+ for (MetaDataAndDomainData aaa: metadataElementspom1) {
+ czy=0;
+ if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
+ czy=1;
+ break;
+ }
+ }
+ if(czy==1) {
+ metadataElements.add(to);
+ }
+ }
+ metadataElementspom1.clear();
+ for (MetaDataAndDomainData to: metadataElements) {
+ metadataElementspom1.add(to);
+ }
+ }
+ small++;
+ }
+ } catch (JargonQueryException ex) {
+ Exceptions.printStackTrace(ex);
+ } catch (JargonException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ return metadataElementspom1;
+ }
+
+
+ //łączenie dwóch częściowych list wynikowych z paneli
+ //zwraca wynik połączenia zgodnie z wybranym operatorem
+ List<MetaDataAndDomainData> join(List<MetaDataAndDomainData> metadataElementshlp1,
+ List<MetaDataAndDomainData> metadataElementshlp2,int cmb){
+
+ LinkedList<MetaDataAndDomainData> metadataElements = new LinkedList<MetaDataAndDomainData>();
+ metadataElements.clear();
+ //and
+ if (cmb==0){
+ int czy=0;
+ for(MetaDataAndDomainData to:metadataElementshlp2) {
+ for (MetaDataAndDomainData aaa: metadataElementshlp1) {
+ czy=0;
+ if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
+ czy=1;
+ break;
+ }
+ }
+ if(czy==1) {
+ metadataElements.add(to);
+ }
+ }
+ } /*or*/else{
+ for (MetaDataAndDomainData to:metadataElementshlp2){
+ metadataElements.add(to);
+ }
+
+ for(MetaDataAndDomainData to:metadataElementshlp1) {
+ int czy=0;
+ for (MetaDataAndDomainData aaa: metadataElementshlp2) {
+ if (to.getDomainObjectUniqueName().equals(aaa.getDomainObjectUniqueName())) {
+ czy=1;
+ break;
+ }
+ }
+ if(czy==0) metadataElements.add(to);
+ }
+ }
+ return metadataElements;
+ }
+
+
+
+
+ private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActionPerformed
+ int chk=1;
+ //sprawdzanie, czy każde pole wypełnione i poprawność operatorów dla typów
+ for (MetaPanel panel: panels){
+ for (MetaPanelOne pnl: panel.panels){
+ if (!pnl.checktxt()) {
+ MessageManager.showMessage(this, "Add text to each condition", MessageManager.TITLE_MESSAGE);
+ chk=0;
+ break;
+ }
+ //czy zgodne operatory z typem
+ if (chk==1){
+ //op: > - 0; >= - 1; < - 2; <= - 3; = - 4; <> - 5; like - 6; not like - 7;
+ //dla liczb: >=- 8, < - 9, <= - 10
+ if (!isInt(pnl.val())){
+ if ( pnl.combo()!=6 && pnl.combo()!=7 ){
+ MessageManager.showMessage(this, "invalid operator for given type", MessageManager.TITLE_MESSAGE);
+ chk=0;
+ break;
+ }
+ } else {
+ if ( pnl.combo()==6 || pnl.combo()==7){
+ MessageManager.showMessage(this, "invalid operator for given type", MessageManager.TITLE_MESSAGE);
+ chk=0;
+ break;
+ }
+ }
+ }
+ }
+ if (chk==0) break;
+ }
+ //jeśli wszytskie pola wypełnione to szuka
+ if (chk==1){
+ List<MetaDataAndDomainData> metadataElements=new LinkedList<MetaDataAndDomainData>(); //lista wynikow
+ List<MetaDataAndDomainData> metadataElementshlp1=new LinkedList<MetaDataAndDomainData>();
+ List<MetaDataAndDomainData> metadataElementshlp2=new LinkedList<MetaDataAndDomainData>();
+ int big=0; //ktory wezel
+ //będą tworzone częściowe listy dla każdego panelu i potem zgodnie z wyborem (OR, AND) łączone
+ for (MetaPanel panel : panels){
+ //wybór - przynajmniej jeden spelniony
+ if (panel.combo()==1) {
+ metadataElementshlp2 = node_or(big,panel);
+ }
+ //wybor - wszystkie spełnione
+ else {
+ metadataElementshlp2 = node_and(big,panel);
+ }
+ if(big!=0) {
+ metadataElements=join(metadataElementshlp1,metadataElementshlp2,combos.get(big-1).getSelectedIndex());
+ metadataElementshlp1.clear();
+ for (MetaDataAndDomainData to: metadataElements) {
+ metadataElementshlp1.add(to);
+ }
+ } else{
+ metadataElements.clear();
+ metadataElementshlp1.clear();
+
+ for (MetaDataAndDomainData to: metadataElementshlp2) {
+ metadataElementshlp1.add(to);
+ metadataElements.add(to);
+ }
+ }
+ big++;
+ }
+
+
+ javax.swing.JDialog results = new javax.swing.JDialog(this, false);
+ results.setLocationRelativeTo(null);
+ results.setBounds(200, 200, 700 , 200);
+ results.setTitle("Results");
+ results.setVisible(true);
+
+ String titles[] = { "Name", "Attribute", "Value", "Unit" };
+ DefaultTableModel model = new DefaultTableModel(titles,metadataElements.size());
+ JTable table=new JTable(model);
+ JScrollPane pane = new JScrollPane(table);
+ for (int i = 0; i < metadataElements.size(); i++) {
+ table.setValueAt(metadataElements.get(i).getDomainObjectUniqueName(),i,0);
+ table.setValueAt(metadataElements.get(i).getAvuAttribute(),i,1);
+ table.setValueAt(metadataElements.get(i).getAvuValue(),i,2);
+ table.setValueAt(metadataElements.get(i).getAvuUnit(),i,3);
+ }
+ results.add(pane);
+ }
+ }//GEN-LAST:event_btnSearchActionPerformed
+
+
+ private void btnNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNewActionPerformed
+ MetaPanel metapanel = new MetaPanel(this);
+ metapanel.setBounds(0,(170+btnNew.getHeight())*getCounter(),470,170);
+ panel.add(metapanel);
+ metapanel.setVisible(true);
+ panels.add(metapanel);
+ if (getCounter()==0) btnNew.setLocation(btnNew.getX(), 170);
+ else{
+ JComboBox and_or = new JComboBox();
+ and_or.setBounds(btnNew.getX(),btnNew.getY(), btnNew.getWidth()+10, btnNew.getHeight());
+ and_or.addItem("and");
+ and_or.addItem("or");
+ panel.add(and_or);
+ combos.add(and_or);
+ and_or.setVisible(true);
+ btnNew.setLocation(btnNew.getX(), metapanel.getY()+metapanel.getHeight());
+ panel.setPreferredSize(new Dimension(panel.getWidth(), btnNew.getY()+btnNew.getHeight()-panel.getY()+2));
+ }
+ this.pack();
+ setCounter(getCounter() + 1);
+ if (panels.size()==2) panels.getFirst().DelVisible();
+ }//GEN-LAST:event_btnNewActionPerformed
+
+ void setBtnNew(int x,int y){
+ btnNew.setLocation(x,y);
+ }
+
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnNew;
+ private javax.swing.JButton btnSearch;
+ private javax.swing.JScrollPane jScrollPane2;
+ private javax.swing.JPanel panel;
+ // End of variables declaration//GEN-END:variables
+
+ /**
+ * @return the counter
+ */
+ public int getCounter() {
+ return counter;
+ }
+
+ /**
+ * @param counter the counter to set
+ */
+ public void setCounter(int counter) {
+ this.counter = counter;
+ }
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form
index 13b06da..9457c45 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.form
@@ -109,7 +109,7 @@
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
- <EmptySpace pref="528" max="32767" attributes="0"/>
+ <EmptySpace pref="556" max="32767" attributes="0"/>
<Component id="btnDismiss" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
</Group>
@@ -120,7 +120,7 @@
<Group type="102" alignment="0" attributes="0">
<EmptySpace min="-2" pref="15" max="-2" attributes="0"/>
<Component id="btnDismiss" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="32767" attributes="0"/>
+ <EmptySpace pref="12" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java
index f09f73c..430d23b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SearchResultsDialog.java
@@ -146,96 +146,94 @@ public class SearchResultsDialog extends javax.swing.JDialog implements
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
- // desc="Generated Code">//GEN-BEGIN:initComponents
- private void initComponents() {
-
- jPanel1 = new javax.swing.JPanel();
- pnlTabSearch = new javax.swing.JPanel();
- pnlTabSearchTop = new javax.swing.JPanel();
- pnlTabSearchResults = new javax.swing.JPanel();
- scrollPaneSearchResults = new javax.swing.JScrollPane();
- tableSearchResults = new javax.swing.JTable();
- jPanel2 = new javax.swing.JPanel();
- btnDismiss = new javax.swing.JButton();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
- setTitle(org.openide.util.NbBundle.getMessage(
- SearchResultsDialog.class, "SearchResultsDialog.title")); // NOI18N
-
- jPanel1.setLayout(new java.awt.BorderLayout());
-
- pnlTabSearch.setToolTipText(org.openide.util.NbBundle.getMessage(
- SearchResultsDialog.class,
- "SearchResultsDialog.pnlTabSearch.toolTipText")); // NOI18N
- pnlTabSearch.setLayout(new java.awt.BorderLayout());
- pnlTabSearch.add(pnlTabSearchTop, java.awt.BorderLayout.NORTH);
-
- pnlTabSearchResults.setLayout(new java.awt.GridLayout());
-
- tableSearchResults.setModel(new javax.swing.table.DefaultTableModel(
- new Object[][] { { null, null, null, null },
- { null, null, null, null }, { null, null, null, null },
- { null, null, null, null } }, new String[] { "Title 1",
- "Title 2", "Title 3", "Title 4" }));
- scrollPaneSearchResults.setViewportView(tableSearchResults);
-
- pnlTabSearchResults.add(scrollPaneSearchResults);
-
- pnlTabSearch.add(pnlTabSearchResults, java.awt.BorderLayout.CENTER);
-
- jPanel1.add(pnlTabSearch, java.awt.BorderLayout.CENTER);
-
- getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
-
- jPanel2.setPreferredSize(new java.awt.Dimension(661, 50));
-
- btnDismiss.setLabel(org.openide.util.NbBundle.getMessage(
- SearchResultsDialog.class,
- "SearchResultsDialog.btnDismiss.label")); // NOI18N
- btnDismiss.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnDismissActionPerformed(evt);
- }
- });
-
- org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(
- jPanel2);
- jPanel2.setLayout(jPanel2Layout);
- jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- org.jdesktop.layout.GroupLayout.TRAILING,
- jPanel2Layout.createSequentialGroup()
- .addContainerGap(528, Short.MAX_VALUE).add(btnDismiss)
- .add(38, 38, 38)));
- jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING).add(
- jPanel2Layout
- .createSequentialGroup()
- .add(15, 15, 15)
- .add(btnDismiss)
- .addContainerGap(
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)));
-
- getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
+ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+ private void initComponents() {
+
+ jPanel1 = new javax.swing.JPanel();
+ pnlTabSearch = new javax.swing.JPanel();
+ pnlTabSearchTop = new javax.swing.JPanel();
+ pnlTabSearchResults = new javax.swing.JPanel();
+ scrollPaneSearchResults = new javax.swing.JScrollPane();
+ tableSearchResults = new javax.swing.JTable();
+ jPanel2 = new javax.swing.JPanel();
+ btnDismiss = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.title")); // NOI18N
+
+ jPanel1.setLayout(new java.awt.BorderLayout());
+
+ pnlTabSearch.setToolTipText(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.pnlTabSearch.toolTipText")); // NOI18N
+ pnlTabSearch.setLayout(new java.awt.BorderLayout());
+ pnlTabSearch.add(pnlTabSearchTop, java.awt.BorderLayout.NORTH);
+
+ pnlTabSearchResults.setLayout(new java.awt.GridLayout(1, 0));
+
+ tableSearchResults.setModel(new javax.swing.table.DefaultTableModel(
+ new Object [][] {
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null},
+ {null, null, null, null}
+ },
+ new String [] {
+ "Title 1", "Title 2", "Title 3", "Title 4"
+ }
+ ));
+ scrollPaneSearchResults.setViewportView(tableSearchResults);
+
+ pnlTabSearchResults.add(scrollPaneSearchResults);
+
+ pnlTabSearch.add(pnlTabSearchResults, java.awt.BorderLayout.CENTER);
+
+ jPanel1.add(pnlTabSearch, java.awt.BorderLayout.CENTER);
+
+ getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);
+
+ jPanel2.setPreferredSize(new java.awt.Dimension(661, 50));
+
+ btnDismiss.setLabel(org.openide.util.NbBundle.getMessage(SearchResultsDialog.class, "SearchResultsDialog.btnDismiss.label")); // NOI18N
+ btnDismiss.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnDismissActionPerformed(evt);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
+ jPanel2.setLayout(jPanel2Layout);
+ jPanel2Layout.setHorizontalGroup(
+ jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
+ .addContainerGap(556, Short.MAX_VALUE)
+ .add(btnDismiss)
+ .add(38, 38, 38))
+ );
+ jPanel2Layout.setVerticalGroup(
+ jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(jPanel2Layout.createSequentialGroup()
+ .add(15, 15, 15)
+ .add(btnDismiss)
+ .addContainerGap(12, Short.MAX_VALUE))
+ );
+
+ getContentPane().add(jPanel2, java.awt.BorderLayout.SOUTH);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
private void btnDismissActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnDismissActionPerformed
dispose();
}// GEN-LAST:event_btnDismissActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnDismiss;
- private javax.swing.JPanel jPanel1;
- private javax.swing.JPanel jPanel2;
- private javax.swing.JPanel pnlTabSearch;
- private javax.swing.JPanel pnlTabSearchResults;
- private javax.swing.JPanel pnlTabSearchTop;
- private javax.swing.JScrollPane scrollPaneSearchResults;
- private javax.swing.JTable tableSearchResults;
- // End of variables declaration//GEN-END:variables
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnDismiss;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JPanel pnlTabSearch;
+ private javax.swing.JPanel pnlTabSearchResults;
+ private javax.swing.JPanel pnlTabSearchTop;
+ private javax.swing.JScrollPane scrollPaneSearchResults;
+ private javax.swing.JTable tableSearchResults;
+ // End of variables declaration//GEN-END:variables
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
index 4267691..199862b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form
@@ -17,7 +17,6 @@
</Properties>
<SyntheticProperties>
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
- <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<Events>
<EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosing"/>
@@ -65,7 +64,7 @@
<Dimension value="[622, 125]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[1121, 120]"/>
+ <Dimension value="[1121, 190]"/>
</Property>
</Properties>
<Constraints>
@@ -462,6 +461,40 @@
<Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
</Container>
+ <Component class="javax.swing.JButton" name="btnMainToolbarSettings1">
+ <Properties>
+ <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
+ <Image iconType="3" name="/icon_metasearch.png"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="iDrop.btnMainToolbarSettings1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+ <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
+ <EmptyBorder/>
+ </Border>
+ </Property>
+ <Property name="horizontalTextPosition" type="int" value="0"/>
+ <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[65, 70]"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[60, 69]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[60, 69]"/>
+ </Property>
+ <Property name="verticalTextPosition" type="int" value="3"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnMainToolbarSettings1ActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
</SubComponents>
</Container>
<Container class="javax.swing.JPanel" name="pnlMainIrodsTree">
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 e21fb60..aa45c04 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
@@ -166,7 +166,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
IRODSAccount savedAccount = iDropCore.getIrodsAccount();
iDropCore.setIrodsAccount(null);
- LoginDialog loginDialog = new LoginDialog(null, iDropCore);
+ LoginDialog loginDialog = new LoginDialog(null, iDropCore);
loginDialog.setLocationRelativeTo(null);
loginDialog.setVisible(true);
@@ -1335,6 +1335,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
txtMainToolbarSearchTerms = new javax.swing.JTextField();
lblBreadCrumb = new javax.swing.JLabel();
pnlBreadCrumbNav = new javax.swing.JPanel();
+ btnMainToolbarSettings1 = new javax.swing.JButton();
pnlMainIrodsTree = new javax.swing.JPanel();
splitPanelTrees = new javax.swing.JSplitPane();
scrollIrodsTree = new javax.swing.JScrollPane();
@@ -1383,7 +1384,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
pnlMainToolbarIcons.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 20, 10, 20));
pnlMainToolbarIcons.setMinimumSize(new java.awt.Dimension(622, 125));
- pnlMainToolbarIcons.setPreferredSize(new java.awt.Dimension(1121, 120));
+ pnlMainToolbarIcons.setPreferredSize(new java.awt.Dimension(1121, 190));
pnlMainToolbarIcons.setLayout(new java.awt.GridBagLayout());
btnMainToolbarTree.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_tree.png"))); // NOI18N
@@ -1622,6 +1623,21 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
pnlMainToolbarIcons.add(pnlBreadCrumbNav, gridBagConstraints);
+ btnMainToolbarSettings1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon_metasearch.png"))); // NOI18N
+ btnMainToolbarSettings1.setText(org.openide.util.NbBundle.getMessage(iDrop.class, "iDrop.btnMainToolbarSettings1.text")); // NOI18N
+ btnMainToolbarSettings1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
+ btnMainToolbarSettings1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
+ btnMainToolbarSettings1.setMaximumSize(new java.awt.Dimension(65, 70));
+ btnMainToolbarSettings1.setMinimumSize(new java.awt.Dimension(60, 69));
+ btnMainToolbarSettings1.setPreferredSize(new java.awt.Dimension(60, 69));
+ btnMainToolbarSettings1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
+ btnMainToolbarSettings1.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnMainToolbarSettings1ActionPerformed(evt);
+ }
+ });
+ pnlMainToolbarIcons.add(btnMainToolbarSettings1, new java.awt.GridBagConstraints());
+
pnlMain.add(pnlMainToolbarIcons, java.awt.BorderLayout.PAGE_START);
pnlMainIrodsTree.setBorder(javax.swing.BorderFactory.createEtchedBorder());
@@ -1877,6 +1893,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
popup.show(pnlBreadCrumbNav, p.x, p.y + btnMainToolbarTree.getHeight());
}//GEN-LAST:event_btnMainToolbarTreeActionPerformed
+ private void btnMainToolbarSettings1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMainToolbarSettings1ActionPerformed
+ MetaSearch idropMetaSearch = new MetaSearch(this, true, iDropCore);
+ idropMetaSearch.setLocationRelativeTo(null);
+ idropMetaSearch.setVisible(true);
+ }//GEN-LAST:event_btnMainToolbarSettings1ActionPerformed
+
private void btnMainToolbarSettingsActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnMainToolbarSettingsActionPerformed
IDROPConfigurationPanel idropConfigurationPanel = new IDROPConfigurationPanel(
@@ -2044,6 +2066,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
private javax.swing.JButton btnMainToolbarRefresh;
private javax.swing.JButton btnMainToolbarSearchFiles;
private javax.swing.JButton btnMainToolbarSettings;
+ private javax.swing.JButton btnMainToolbarSettings1;
private javax.swing.JButton btnMainToolbarSync;
private javax.swing.JButton btnMainToolbarTools;
private javax.swing.JButton btnMainToolbarTree;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
index a7a98f5..1558152 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java
@@ -1,7 +1,6 @@
package org.irods.jargon.idrop.desktop.systraygui.services;
import java.util.Properties;
-
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.connection.JargonProperties;
import org.irods.jargon.core.exception.JargonException;
@@ -13,51 +12,60 @@ import org.irods.jargon.transfer.engine.synch.ConflictingSynchException;
*
* @author mikeconway
*/
+
public interface IdropConfigurationService {
- public static final String IDROP_VERSION_FILE_NAME = ".idropVersion";
-
- public static final String VERSION_3_1 = "3.1.0.0";
-
- public static final String VERSION_NUMBER = "idrop.version";
- public static final String IDROP_PROPS_FILE_NAME = "idrop.properties";
- public static final String FORCE_MODE = "force.mode";
- public static final String FORCE_NO_SYNCH = "force.no.synch";
- public static final String LOGIN_PRESET = "login.preset";
- public static final String SHOW_STARTUP = "show.startup";
- public static final String SHOW_GUI = "idrop.show.gui";
- public static final String DEVICE_NAME = "idrop.device.name";
- // account info for cache
- public static final String ACCOUNT_CACHE_HOST = "irods.account.host";
- public static final String ACCOUNT_CACHE_PORT = "irods.account.port";
- public static final String ACCOUNT_CACHE_ZONE = "irods.account.zone";
- public static final String ACCOUNT_CACHE_RESOURCE = "irods.account.resource";
- public static final String ACCOUNT_CACHE_USER_NAME = "irods.account.user";
- public static final String ACCOUNT_CACHE_ROOT_DIR = "irods.account.root.dir";
- public static final String ACCOUNT_CACHE_LOGIN_MODE = "irods.account.login.mode";
- public static final String POLICY_AWARE_PROPERTY = "policy.aware";
- public static final String LOOK_AND_FEEL = "idrop.lookandfeel";
- public static final String TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES = "transferengine.record.successful.files";
- public static final String VERIFY_CHECKSUM_ON_TRANSFER = "transfer.computeandvalidate.checksum";
- public static final String ALLOW_CONNECTION_REROUTING = "transfer.allow.redirects";
- public static final String INTRA_FILE_STATUS_CALLBACKS = "transfer.intra.file.callbacks";
- public static final String IRODS_CONNECTION_TIMEOUT = "socket.timeout";
- public static final String IRODS_PARALLEL_CONNECTION_TIMEOUT = "parallel.socket.timeout";
- public static final String IRODS_PARALLEL_CONNECTION_MAX_THREADS = "transfer.max.parallel.threads";
- public static final String IRODS_PARALLEL_USE_PARALLEL = "transfer.use.parallel";
- public static final String IRODS_PARALLEL_USE_NIO = "transfer.use.nio.for.parallel";
- public static final String IRODS_PARALLEL_USE_POOL = "transfer.use.pool";
- public static final String IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE = "jargon.io.internal.input.stream.buffer.size";
- public static final String IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE = "jargon.io.internal.output.stream.buffer.size";
- public static final String IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE = "jargon.io.internal.cache.buffer.size";
- public static final String IRODS_IO_SEND_INPUT_STREAM_BUFFER_SIZE = "jargon.io.send.input.stream.buffer.size";
- public static final String IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE = "jargon.io.input.to.output.copy.byte.buffer.size";
- public static final String IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE = "jargon.io.local.input.stream.buffer.size";
- public static final String IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE = "jargon.io.local.output.stream.buffer.size";
- public static final String IRODS_IO_PUT_BUFFER_SIZE = "jargon.put.buffer.size";
- public static final String IRODS_IO_GET_BUFFER_SIZE = "jargon.get.buffer.size";
- public static final String IRODS_CONNECTION_RESTART = "transfer.reconnect";
- public static final String IDROP_ENABLE_RESC_EDIT = "idrop.settings.enable_default_resc_edit";
+public static final String IDROP_VERSION_FILE_NAME = ".idropVersion";
+
+public static final String VERSION_3_1 = "3.1.0.0";
+
+public static final String VERSION_NUMBER = "idrop.version";
+public static final String IDROP_PROPS_FILE_NAME = "idrop.properties";
+public static final String FORCE_MODE = "force.mode";
+public static final String FORCE_NO_SYNCH = "force.no.synch";
+public static final String LOGIN_PRESET = "login.preset";
+public static final String SHOW_STARTUP = "show.startup";
+public static final String SHOW_GUI = "idrop.show.gui";
+public static final String DEVICE_NAME = "idrop.device.name";
+// account info for cache
+public static final String ACCOUNT_CACHE_HOST = "irods.account.host";
+public static final String ACCOUNT_CACHE_PORT = "irods.account.port";
+public static final String ACCOUNT_CACHE_ZONE = "irods.account.zone";
+public static final String ACCOUNT_CACHE_RESOURCE = "irods.account.resource";
+public static final String ACCOUNT_CACHE_USER_NAME = "irods.account.user";
+public static final String ACCOUNT_CACHE_USER_PASSWORD = "irods.account.password";
+public static final String ACCOUNT_CACHE_USER_SAVE_PASS = "irods.account.savepassword";
+public static final String ACCOUNT_CACHE_ROOT_DIR = "irods.account.root.dir";
+public static final String ACCOUNT_CACHE_LOGIN_MODE = "irods.account.login.mode";
+// for GSI
+public static final String ACCOUNT_CACHE_PROXY_LOCATION = "irods.account.gsi.proxy.location";
+public static final String ACCOUNT_CACHE_CERTIFICATES_LOCATION = "irods.account.gsi.certificates.location";
+public static final String ACCOUNT_CACHE_USER_AUTO_GSI = "irods.account.autogsi";
+// /for GSI
+public static final String POLICY_AWARE_PROPERTY = "policy.aware";
+public static final String LOOK_AND_FEEL = "idrop.lookandfeel";
+public static final String TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES = "transferengine.record.successful.files";
+public static final String VERIFY_CHECKSUM_ON_TRANSFER = "transfer.computeandvalidate.checksum";
+public static final String ALLOW_CONNECTION_REROUTING = "transfer.allow.redirects";
+public static final String INTRA_FILE_STATUS_CALLBACKS = "transfer.intra.file.callbacks";
+public static final String IRODS_CONNECTION_TIMEOUT = "socket.timeout";
+public static final String IRODS_PARALLEL_CONNECTION_TIMEOUT = "parallel.socket.timeout";
+public static final String IRODS_PARALLEL_CONNECTION_MAX_THREADS = "transfer.max.parallel.threads";
+public static final String IRODS_PARALLEL_USE_PARALLEL = "transfer.use.parallel";
+public static final String IRODS_PARALLEL_USE_NIO = "transfer.use.nio.for.parallel";
+public static final String IRODS_PARALLEL_USE_POOL = "transfer.use.pool";
+public static final String IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE = "jargon.io.internal.input.stream.buffer.size";
+public static final String IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE = "jargon.io.internal.output.stream.buffer.size";
+public static final String IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE = "jargon.io.internal.cache.buffer.size";
+public static final String IRODS_IO_SEND_INPUT_STREAM_BUFFER_SIZE = "jargon.io.send.input.stream.buffer.size";
+public static final String IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE = "jargon.io.input.to.output.copy.byte.buffer.size";
+public static final String IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE = "jargon.io.local.input.stream.buffer.size";
+public static final String IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE = "jargon.io.local.output.stream.buffer.size";
+public static final String IRODS_IO_PUT_BUFFER_SIZE = "jargon.put.buffer.size";
+public static final String IRODS_IO_GET_BUFFER_SIZE = "jargon.get.buffer.size";
+public static final String IRODS_CONNECTION_RESTART = "transfer.reconnect";
+public static final String IDROP_ENABLE_RESC_EDIT = "idrop.settings.enable_default_resc_edit";
+public static final String IDROP_PUBLIC_LINK_SERVICE = "idrop.public.link.service.url";
Properties bootstrapConfigurationAndMergePropertiesFromLocalAndClasspath()
throws IdropException;
@@ -88,7 +96,7 @@ public interface IdropConfigurationService {
* {@link IRODSAccount} to be cached
* @throws IdropException
*/
- void saveLogin(final IRODSAccount irodsAccount) throws IdropException;
+ void saveLogin(final IRODSAccount irodsAccount, boolean savePassword) throws IdropException;
void removeConfigProperty(final String key) throws IdropException;
@@ -128,4 +136,5 @@ public interface IdropConfigurationService {
void restoreIDROPConfigFromJargonProperties(
final JargonProperties jargonProperties) throws JargonException;
+
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
index e65e245..264f361 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java
@@ -99,7 +99,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
throw new IdropException(ex);
}
- }
+ }
log.debug("properties from database:{}", databaseProperties);
if (databaseProperties.isEmpty()) {
@@ -250,7 +250,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
}
@Override
- public void saveLogin(final IRODSAccount irodsAccount)
+ public void saveLogin(final IRODSAccount irodsAccount, boolean savePassword)
throws IdropException {
log.info("save login");
if (irodsAccount == null) {
@@ -272,6 +272,17 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
irodsAccount.getUserName());
updateConfig(IdropConfigurationService.ACCOUNT_CACHE_LOGIN_MODE,
irodsAccount.getAuthenticationScheme().name());
+ if(savePassword){
+ updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_PASSWORD,
+ irodsAccount.getPassword());
+ updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_SAVE_PASS,
+ "true");
+ }else{
+ updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_PASSWORD,
+ "");
+ updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_SAVE_PASS,
+ "false");
+ }
log.info("config updated");
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
index 2663d32..89aa42e 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java
@@ -7,498 +7,489 @@ import org.apache.log4j.Level;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
import org.irods.jargon.core.connection.IRODSCommands;
-import org.irods.jargon.core.connection.IRODSConnection;
import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
/**
- * Access data about the configuration of Idrop. This serves as a view to the
- * loaded cache of properties that iDrop consults. The properties are originally
- * 'bootstrapped' at load time and resolved from various sources to come up with
- * the operative set. This bootstrapping is done by the
- * {@link IdropConfigurationService}.
+ * Access data about the configuration of Idrop. This serves as a view to the loaded cache of
+ * properties that iDrop consults. The properties are originally 'bootstrapped' at load time and
+ * resolved from various sources to come up with the operative set. This bootstrapping is done by
+ * the {@link IdropConfigurationService}.
* <p/>
- * In normal operation, this config class is queried by iDrop to save database
- * accesses. When any configuration information is updated, this is through the
- * <code>IdropConfigurationService</code>, which will make necessary database
- * updates, and then update this cache.
- *
+ * In normal operation, this config class is queried by iDrop to save database accesses. When any
+ * configuration information is updated, this is through the
+ * <code>IdropConfigurationService</code>, which will make necessary database updates, and then
+ * update this cache.
+ *
* @author Mike Conway - DICE (www.irods.org)
*/
public class IdropConfig {
- private final Properties idropProperties;
-
- /**
- * Given a key, get the value in the cached properties (this is not going
- * against the config database)
- *
- * @param propKey
- * <code>String</code> with the key of the property
- * @return <code>String</code> with the resulting value, or
- * <code>null</code> if not found
- */
- public String getPropertyForKey(final String propKey) {
- return idropProperties.getProperty(propKey);
- }
-
- /**
- * General method to set a property in the cached properties (this does not
- * update the config database)
- *
- * @param propKey
- * <code>String</code> with the name of the property, cannot be
- * null
- * @param propValue
- * <code>String</code> with the value of the property, can be
- * null
- */
- public void setProperty(final String propKey, final String propValue) {
- if (propKey == null) {
- throw new IllegalArgumentException("null propKey");
- }
- idropProperties.put(propKey, propValue);
- }
-
- public Properties getIdropProperties() {
- return idropProperties;
- }
-
- /**
- * Initialize this wrapper around properties with the
- * <code>Properties</code> that represent the idrop configuration.
- *
- * @param properties
- */
- public IdropConfig(final Properties properties) {
- if (properties == null) {
- throw new IllegalArgumentException("null properties");
- }
- idropProperties = properties;
- }
-
- /**
- * Does iDrop need to display policy-aware features?
- *
- * @return <code>boolean</code> that will be <code>true</code> if policy
- * features are displayed.
- */
- public boolean isPolicyAware() {
- boolean policyAware = false;
- String policyAwareValue = idropProperties
- .getProperty(IdropConfigurationService.POLICY_AWARE_PROPERTY);
-
- if (policyAwareValue != null && policyAwareValue.equals("true")) {
- policyAware = true;
- }
-
- return policyAware;
-
- }
-
- /**
- * Does iDrop need to display advanced options? Otherwise, a simpler client
- * is presented
- *
- * @return <code>boolean</code> that will be <code>true</code> if policy
- * features are displayed.
- */
- public boolean isAdvancedView() {
- boolean advancedView = false;
- String propValue = idropProperties
- .getProperty(IdropPropertiesHelper.ADVANCED_VIEW_PROPERTY);
-
- if (propValue != null && propValue.equals("true")) {
- advancedView = true;
- }
-
- return advancedView;
-
- }
-
- public String getTransferDatabaseName() {
- String propValue = idropProperties
- .getProperty(IdropPropertiesHelper.TRANSFER_DATABASE_NAME);
-
- if (propValue != null) {
- return propValue;
- } else {
- return "transferDatabase";
- }
- }
-
- /**
- * Should iDrop display a preset login limited to a user's home directory?
- *
- * @return
- */
- public boolean isLoginPreset() {
- boolean loginPreset = false;
- String loginPresetValue = idropProperties
- .getProperty(IdropPropertiesHelper.LOGIN_PRESET);
-
- if (loginPresetValue != null && loginPresetValue.equals("true")) {
- loginPreset = true;
- }
-
- return loginPreset;
- }
-
- /**
- * Should successful transfers be logged to the internal database?
- *
- * @return
- */
- public boolean isLogSuccessfulTransfers() {
- boolean logSuccessful = false;
- String logSuccessfulTransfers = idropProperties
- .getProperty(IdropConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
-
- if (logSuccessfulTransfers != null
- && logSuccessfulTransfers.equals("true")) {
- logSuccessful = true;
- }
-
- return logSuccessful;
- }
-
- /**
- * Should a checksum be created and verifed during get/put transfers?
- *
- * @return
- */
- public boolean isVerifyChecksum() {
- boolean verify = false;
- String verifyChecksumValue = idropProperties
- .getProperty(IdropConfigurationService.VERIFY_CHECKSUM_ON_TRANSFER);
-
- if (verifyChecksumValue != null && verifyChecksumValue.equals("true")) {
- verify = true;
- }
-
- return verify;
- }
-
- /**
- * Should connections be re-routed on put/get based on file resource
- * containing files
- *
- * @return
- */
- public boolean isAllowConnectionRerouting() {
- boolean bool = false;
- String val = idropProperties
- .getProperty(IdropConfigurationService.ALLOW_CONNECTION_REROUTING);
-
- if (val != null && val.equals("true")) {
- bool = true;
- }
- return bool;
- }
-
- /**
- * Should transfer progress within a file be shown?
- *
- * @return <code>boolean</code> that will be <code>true</code> if intra-file
- * call-backs are desired.
- */
- public boolean isIntraFileStatusCallbacks() {
- return getBooleanForKey(IdropConfigurationService.INTRA_FILE_STATUS_CALLBACKS);
- }
-
- /**
- * Time-out (in seconds) for the main iRODS connection. This can be set to 0
- * or less to inactivate
- *
- * @return
- */
- public int getIrodsConnectionTimeout() {
- return getIntForKey(IdropConfigurationService.IRODS_CONNECTION_TIMEOUT);
- }
-
- /**
- * Time-out (in seconds) for iRODS connections during parallel transfer.
- * This can be set to 0 or less to inactivate
- *
- * @return
- */
- public int getIrodsParallelConnectionTimeout() {
- return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT);
- }
-
- /**
- * Maximum number of threads in parallel transfers. This is a trade-off in
- * performance and through-put
- *
- * @return
- */
- public int getIrodsParallelTransferMaxThreads() {
- return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS);
- }
-
- /**
- * Indicates whether a pool is used to maintain parallel transfer threads
- *
- * @return
- */
- public boolean isParallelUsePool() {
- return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_POOL);
- }
-
- /**
- * Do I use parallel transfers at all?
- *
- * @return
- */
- public boolean isUseParallelTransfers() {
- return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_PARALLEL);
- }
-
- public boolean isUseNIOForParallelTransfers() {
- return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_NIO);
- }
-
- /**
- * Get the internal buffer size used for the input stream between Jargon and
- * iRODS. See https://code.renci.org/gf/project/jargon/wiki/?pagename=
- * NormalIOArrangement return <code>int</code> with the buffer size for the
- * input stream buffer. (0 = use defaults, -1 = do not wrap with buffered
- * input stream) jargon.io.internal.input.stream.buffer.size
- */
- public int getInternalInputStreamBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE);
- }
-
- /**
- * Get the internal buffer size used for the output stream between Jargon
- * and iRODS. See https://code.renci.org/gf/project/jargon/wiki/?pagename=
- * NormalIOArrangement return <code>int</code> with the buffer size for the
- * output stream buffer. (0 = use defaults, -1 = do not wrap with buffered
- * input stream) jargon.io.internal.output.stream.buffer.size
- */
- public int getInternalOutputStreamBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the internal buffer cache . See
- * https://code.renci.org/gf/
- * project/jargon/wiki/?pagename=NormalIOArrangement. Jargon has an internal
- * buffer where the various <code>send()</code> methods in
- * {@link IRODSConnection} write data to iRODS. In these methods, Jargon
- * uses an internal cache buffer for the sends. This has been done
- * historically, but the benefits of this cache have not yet been measured.
- * Setting this as a parameter to turn off will assist in testing the use of
- * the buffer, and the option of eliminating the buffer altogether. return
- * <code>int</code> with the size of the internal cache (0 = do not utilize
- * the cache buffer) jargon.io.internal.cache.buffer.size
- */
- public int getInternalCacheBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE);
- }
-
- /**
- * Get the buffer size used for the input stream between Jargon and iRODS
- * passed to the <code>send()</code> method of {@link IRODSConnection}. This
- * input stream would typically be from a local file that was being sent to
- * iRODS, or other such source. The {@link IRODSCommands} object, using the
- * <code>irodsFunction</code> method with the <code>InputStream</code>
- * parameter, will wrap the given input stream in a
- * <code>BufferedInputStream</code> based on the setting of this parameter.
- *
- * See https://code.renci.org/gf/project/jargon/wiki/?pagename=
- * NormalIOArrangement return <code>int</code> with the buffer size for the
- * buffered stream that will wrap an <code>InputStream</code> to be sent to
- * iRODS. (0 = use defaults, -1 = do not wrap with buffered input stream)
- * jargon.io.send.input.stream.buffer.size
- */
- public int getSendInputStreamBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_SEND_INPUT_STREAM_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the buffer used in read/write operations to copy data
- * from an input stream to output stream in the {@link IRODSConnection}
- * class <code>send()</code> methods.
- *
- * @return <code>int</code> with the size of the read/write loop buffer
- * jargon.io.input.to.output.copy.byte.buffer.size
- */
- public int getInputToOutputCopyBufferByteSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the buffer used in a <code>BufferedOutputStream</code>
- * that wraps the output stream for the local file. This is used in
- * processing get operations where the iRODS data is being saved to the
- * local file system. (0 = use defaults, -1 = do not wrap with buffered
- * output stream) jargon.io.local.output.stream.buffer.size
- *
- * @return <code>int</code> with the buffer size
- */
- public int getLocalFileOutputStreamBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the buffer used in a <code>BufferedInputStream</code>
- * that wraps the intput stream for the local file. This is used in
- * processing operations where the data is being read from the local file
- * system. (0 = use defaults, -1 = do not wrap with buffered output stream)
- * jargon.io.local.input.stream.buffer.size
- *
- * @return <code>int</code> with the buffer size
- */
- public int getLocalFileInputStreamBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the file segment for each successive call in normal put
- * operations.
- *
- * @return
- */
- public int getPutBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_PUT_BUFFER_SIZE);
- }
-
- /**
- * Get the size of the file segment for each successive call in normal get
- * operations.
- *
- * @return <code>int</code> with buffer size
- */
- public int getGetBufferSize() {
- return getIntForKey(IdropConfigurationService.IRODS_IO_GET_BUFFER_SIZE);
- }
-
- /**
- * Get the configured synch device name. If not set, this will return a
- * <code>null</code>
- *
- * @return
- */
- public String getSynchDeviceName() {
- return idropProperties
- .getProperty(IdropConfigurationService.DEVICE_NAME);
- }
-
- /**
- * Should the startup wizard be shown
- *
- * @return
- */
- public boolean isShowStartupWizard() {
- boolean showWizard = false;
- String showStartup = idropProperties
- .getProperty(IdropConfigurationService.SHOW_STARTUP);
-
- if (showStartup != null && showStartup.equals("true")) {
- showWizard = true;
- }
-
- return showWizard;
-
- }
-
- /**
- * Should I have a rolling log in the user dir? Will return null of no
- * logging desired, otherwise, will return a log level
- *
- * @return
- */
- public String getLogLevelForRollingLog() {
- String propValue = idropProperties
- .getProperty(IdropPropertiesHelper.ROLLING_LOG_LEVEL);
- return propValue;
-
- }
-
- public void setUpLogging() {
- String rollingLogLevel = getLogLevelForRollingLog();
-
- if (rollingLogLevel == null) {
- return;
- }
-
- // log level is specified, set up a rolling logger
-
- String userHomeDirectory = System.getProperty("user.home");
- StringBuilder sb = new StringBuilder();
- sb.append(userHomeDirectory);
- sb.append("/.idrop/idrop.log");
-
- org.apache.log4j.Logger rootLogger = org.apache.log4j.Logger
- .getRootLogger();
- if (rollingLogLevel.equalsIgnoreCase("INFO")) {
- rootLogger.setLevel(Level.INFO);
- } else if (rollingLogLevel.equalsIgnoreCase("DEBUG")) {
- rootLogger.setLevel(Level.DEBUG);
- } else if (rollingLogLevel.equalsIgnoreCase("WARN")) {
- rootLogger.setLevel(Level.WARN);
- } else {
- rootLogger.setLevel(Level.ERROR);
- }
-
- PatternLayout layout = new PatternLayout(
- "%d %-4r [%t] %-5p %c %x - %m%n");
-
- try {
- RollingFileAppender rfa = new RollingFileAppender(layout,
- sb.toString());
- rfa.setMaximumFileSize(1000000);
- rootLogger.addAppender(rfa);
- } catch (IOException e) {
- // e.printStackTrace();
- }
-
- }
-
- public boolean isShowGuiAtStartup() {
- boolean propBoolean = false;
- String propString = idropProperties
- .getProperty(IdropConfigurationService.SHOW_GUI);
-
- if (propString != null && propString.equals("true")) {
- propBoolean = true;
- }
-
- return propBoolean;
- }
-
- private boolean getBooleanForKey(final String key) {
- boolean propBoolean = false;
- String propString = idropProperties.getProperty(key);
-
- if (propString != null && propString.equals("true")) {
- propBoolean = true;
- }
- return propBoolean;
- }
-
- private int getIntForKey(final String key) {
- int propInt = -1;
- String propString = idropProperties.getProperty(key);
-
- if (propString == null) {
- return propInt;
- }
-
- propInt = Integer.parseInt(propString.trim());
-
- return propInt;
- }
-
- public boolean isConnectionRestart() {
- boolean propBoolean = false;
- String propString = idropProperties
- .getProperty(IdropConfigurationService.IRODS_CONNECTION_RESTART);
-
- if (propString != null && propString.equals("true")) {
- propBoolean = true;
- }
-
- return propBoolean;
- }
+ private final Properties idropProperties;
+
+ /**
+ * Given a key, get the value in the cached properties (this is not going against the config
+ * database)
+ *
+ * @param propKey
+ * <code>String</code> with the key of the property
+ * @return
+ * <code>String</code> with the resulting value, or
+ * <code>null</code> if not found
+ */
+ public String getPropertyForKey(final String propKey) {
+ return idropProperties.getProperty(propKey);
+ }
+
+ /**
+ * General method to set a property in the cached properties (this does not update the config
+ * database)
+ *
+ * @param propKey
+ * <code>String</code> with the name of the property, cannot be null
+ * @param propValue
+ * <code>String</code> with the value of the property, can be null
+ */
+ public void setProperty(final String propKey, final String propValue) {
+ if (propKey == null) {
+ throw new IllegalArgumentException("null propKey");
+ }
+ idropProperties.put(propKey, propValue);
+ }
+
+ public Properties getIdropProperties() {
+ return idropProperties;
+ }
+
+ /**
+ * Initialize this wrapper around properties with the
+ * <code>Properties</code> that represent the idrop configuration.
+ *
+ * @param properties
+ */
+ public IdropConfig(final Properties properties) {
+ if (properties == null) {
+ throw new IllegalArgumentException("null properties");
+ }
+ this.idropProperties = properties;
+ }
+
+ /**
+ * Does iDrop need to display policy-aware features?
+ *
+ * @return
+ * <code>boolean</code> that will be
+ * <code>true</code> if policy features are displayed.
+ */
+ public boolean isPolicyAware() {
+ boolean policyAware = false;
+ String policyAwareValue = idropProperties.getProperty(IdropConfigurationService.POLICY_AWARE_PROPERTY);
+
+ if (policyAwareValue != null && policyAwareValue.equals("true")) {
+ policyAware = true;
+ }
+
+ return policyAware;
+
+ }
+
+ /**
+ * Does iDrop need to display advanced options? Otherwise, a simpler client is presented
+ *
+ * @return
+ * <code>boolean</code> that will be
+ * <code>true</code> if policy features are displayed.
+ */
+ public boolean isAdvancedView() {
+ boolean advancedView = false;
+ String propValue = idropProperties.getProperty(IdropPropertiesHelper.ADVANCED_VIEW_PROPERTY);
+
+ if (propValue != null && propValue.equals("true")) {
+ advancedView = true;
+ }
+
+ return advancedView;
+
+ }
+
+ public String getTransferDatabaseName() {
+ String propValue = idropProperties.getProperty(IdropPropertiesHelper.TRANSFER_DATABASE_NAME);
+
+ if (propValue != null) {
+ return propValue;
+ } else {
+ return "transferDatabase";
+ }
+ }
+
+ /**
+ * Should iDrop display a preset login limited to a user's home directory?
+ *
+ * @return
+ */
+ public boolean isLoginPreset() {
+ boolean loginPreset = false;
+ String loginPresetValue = idropProperties.getProperty(IdropPropertiesHelper.LOGIN_PRESET);
+
+ if (loginPresetValue != null && loginPresetValue.equals("true")) {
+ loginPreset = true;
+ }
+
+ return loginPreset;
+ }
+
+ /**
+ * Should successful transfers be logged to the internal database?
+ *
+ * @return
+ */
+ public boolean isLogSuccessfulTransfers() {
+ boolean logSuccessful = false;
+ String logSuccessfulTransfers = idropProperties.getProperty(IdropConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
+
+ if (logSuccessfulTransfers != null
+ && logSuccessfulTransfers.equals("true")) {
+ logSuccessful = true;
+ }
+
+ return logSuccessful;
+ }
+
+ /**
+ * Should a checksum be created and verifed during get/put transfers?
+ *
+ * @return
+ */
+ public boolean isVerifyChecksum() {
+ boolean verify = false;
+ String verifyChecksumValue = idropProperties.getProperty(IdropConfigurationService.VERIFY_CHECKSUM_ON_TRANSFER);
+
+ if (verifyChecksumValue != null
+ && verifyChecksumValue.equals("true")) {
+ verify = true;
+ }
+
+ return verify;
+ }
+
+ /**
+ * Should connections be re-routed on put/get based on file resource containing files
+ *
+ * @return
+ */
+ public boolean isAllowConnectionRerouting() {
+ boolean bool = false;
+ String val = idropProperties.getProperty(IdropConfigurationService.ALLOW_CONNECTION_REROUTING);
+
+ if (val != null
+ && val.equals("true")) {
+ bool = true;
+ }
+ return bool;
+ }
+
+ /**
+ * Should transfer progress within a file be shown?
+ *
+ * @return
+ * <code>boolean</code> that will be
+ * <code>true</code> if intra-file call-backs are desired.
+ */
+ public boolean isIntraFileStatusCallbacks() {
+ return getBooleanForKey(IdropConfigurationService.INTRA_FILE_STATUS_CALLBACKS);
+ }
+
+ /**
+ * Time-out (in seconds) for the main iRODS connection. This can be set to 0 or less to
+ * inactivate
+ *
+ * @return
+ */
+ public int getIrodsConnectionTimeout() {
+ return getIntForKey(IdropConfigurationService.IRODS_CONNECTION_TIMEOUT);
+ }
+
+ /**
+ * Time-out (in seconds) for iRODS connections during parallel transfer. This can be set to 0 or
+ * less to inactivate
+ *
+ * @return
+ */
+ public int getIrodsParallelConnectionTimeout() {
+ return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_TIMEOUT);
+ }
+
+ /**
+ * Maximum number of threads in parallel transfers. This is a trade-off in performance and
+ * through-put
+ *
+ * @return
+ */
+ public int getIrodsParallelTransferMaxThreads() {
+ return getIntForKey(IdropConfigurationService.IRODS_PARALLEL_CONNECTION_MAX_THREADS);
+ }
+
+ /**
+ * Indicates whether a pool is used to maintain parallel transfer threads
+ *
+ * @return
+ */
+ public boolean isParallelUsePool() {
+ return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_POOL);
+ }
+
+ /**
+ * Do I use parallel transfers at all?
+ * @return
+ */
+ public boolean isUseParallelTransfers() {
+ return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_PARALLEL);
+ }
+
+ public boolean isUseNIOForParallelTransfers() {
+ return getBooleanForKey(IdropConfigurationService.IRODS_PARALLEL_USE_NIO);
+ }
+
+ /**
+ * Get the internal buffer size used for the input stream between Jargon and iRODS. See
+ * https://code.renci.org/gf/project/jargon/wiki/?pagename= NormalIOArrangement return
+ * <code>int</code> with the buffer size for the input stream buffer. (0 = use defaults, -1 = do
+ * not wrap with buffered input stream) jargon.io.internal.input.stream.buffer.size
+ */
+ public int getInternalInputStreamBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_INPUT_STREAM_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the internal buffer size used for the output stream between Jargon and iRODS. See
+ * https://code.renci.org/gf/project/jargon/wiki/?pagename= NormalIOArrangement return
+ * <code>int</code> with the buffer size for the output stream buffer. (0 = use defaults, -1 =
+ * do not wrap with buffered input stream) jargon.io.internal.output.stream.buffer.size
+ */
+ public int getInternalOutputStreamBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_OUTPUT_STREAM_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the internal buffer cache . See https://code.renci.org/gf/
+ * project/jargon/wiki/?pagename=NormalIOArrangement. Jargon has an internal buffer where the
+ * various
+ * <code>send()</code> methods in
+ * {@link IRODSConnection} write data to iRODS. In these methods, Jargon uses an internal cache
+ * buffer for the sends. This has been done historically, but the benefits of this cache have
+ * not yet been measured. Setting this as a parameter to turn off will assist in testing the use
+ * of the buffer, and the option of eliminating the buffer altogether. return
+ * <code>int</code> with the size of the internal cache (0 = do not utilize the cache buffer)
+ * jargon.io.internal.cache.buffer.size
+ */
+ public int getInternalCacheBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_INTERNAL_CACHE_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the buffer size used for the input stream between Jargon and iRODS passed to the
+ * <code>send()</code> method of {@link IRODSConnection}. This input stream would typically be
+ * from a local file that was being sent to iRODS, or other such source. The {@link IRODSCommands}
+ * object, using the
+ * <code>irodsFunction</code> method with the
+ * <code>InputStream</code> parameter, will wrap the given input stream in a
+ * <code>BufferedInputStream</code> based on the setting of this parameter.
+ *
+ * See https://code.renci.org/gf/project/jargon/wiki/?pagename= NormalIOArrangement return
+ * <code>int</code> with the buffer size for the buffered stream that will wrap an
+ * <code>InputStream</code> to be sent to iRODS. (0 = use defaults, -1 = do not wrap with
+ * buffered input stream) jargon.io.send.input.stream.buffer.size
+ */
+ public int getSendInputStreamBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_SEND_INPUT_STREAM_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the buffer used in read/write operations to copy data from an input stream to
+ * output stream in the {@link IRODSConnection} class
+ * <code>send()</code> methods.
+ *
+ * @return
+ * <code>int</code> with the size of the read/write loop buffer
+ * jargon.io.input.to.output.copy.byte.buffer.size
+ */
+ public int getInputToOutputCopyBufferByteSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_INPUT_TO_OUTPUT_COPY_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the buffer used in a
+ * <code>BufferedOutputStream</code> that wraps the output stream for the local file. This is
+ * used in processing get operations where the iRODS data is being saved to the local file
+ * system. (0 = use defaults, -1 = do not wrap with buffered output stream)
+ * jargon.io.local.output.stream.buffer.size
+ *
+ * @return
+ * <code>int</code> with the buffer size
+ */
+ public int getLocalFileOutputStreamBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_LOCAL_OUTPUT_STREAM_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the buffer used in a
+ * <code>BufferedInputStream</code> that wraps the intput stream for the local file. This is
+ * used in processing operations where the data is being read from the local file system. (0 =
+ * use defaults, -1 = do not wrap with buffered output stream)
+ * jargon.io.local.input.stream.buffer.size
+ *
+ * @return
+ * <code>int</code> with the buffer size
+ */
+ public int getLocalFileInputStreamBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_LOCAL_INPUT_STREAM_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the file segment for each successive call in normal put operations.
+ *
+ * @return
+ */
+ public int getPutBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_PUT_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the size of the file segment for each successive call in normal get operations.
+ *
+ * @return
+ * <code>int</code> with buffer size
+ */
+ public int getGetBufferSize() {
+ return getIntForKey(IdropConfigurationService.IRODS_IO_GET_BUFFER_SIZE);
+ }
+
+ /**
+ * Get the configured synch device name. If not set, this will return a
+ * <code>null</code>
+ *
+ * @return
+ */
+ public String getSynchDeviceName() {
+ return idropProperties.getProperty(IdropConfigurationService.DEVICE_NAME);
+ }
+
+ /**
+ * Should the startup wizard be shown
+ *
+ * @return
+ */
+ public boolean isShowStartupWizard() {
+ boolean showWizard = false;
+ String showStartup = idropProperties.getProperty(IdropConfigurationService.SHOW_STARTUP);
+
+ if (showStartup != null && showStartup.equals("true")) {
+ showWizard = true;
+ }
+
+ return showWizard;
+
+ }
+
+ /**
+ * Should I have a rolling log in the user dir? Will return null of no logging desired,
+ * otherwise, will return a log level
+ *
+ * @return
+ */
+ public String getLogLevelForRollingLog() {
+ String propValue = idropProperties.getProperty(IdropPropertiesHelper.ROLLING_LOG_LEVEL);
+ return propValue;
+
+ }
+
+ public void setUpLogging() {
+ String rollingLogLevel = getLogLevelForRollingLog();
+
+ if (rollingLogLevel == null) {
+ return;
+ }
+
+ // log level is specified, set up a rolling logger
+
+ String userHomeDirectory = System.getProperty("user.home");
+ StringBuilder sb = new StringBuilder();
+ sb.append(userHomeDirectory);
+ sb.append("/.idrop/idrop.log");
+
+ org.apache.log4j.Logger rootLogger = org.apache.log4j.Logger.getRootLogger();
+ if (rollingLogLevel.equalsIgnoreCase("INFO")) {
+ rootLogger.setLevel(Level.INFO);
+ } else if (rollingLogLevel.equalsIgnoreCase("DEBUG")) {
+ rootLogger.setLevel(Level.DEBUG);
+ } else if (rollingLogLevel.equalsIgnoreCase("WARN")) {
+ rootLogger.setLevel(Level.WARN);
+ } else {
+ rootLogger.setLevel(Level.ERROR);
+ }
+
+ PatternLayout layout = new PatternLayout(
+ "%d %-4r [%t] %-5p %c %x - %m%n");
+
+ try {
+ RollingFileAppender rfa = new RollingFileAppender(layout,
+ sb.toString());
+ rfa.setMaximumFileSize(1000000);
+ rootLogger.addAppender(rfa);
+ } catch (IOException e) {
+ // e.printStackTrace();
+ }
+
+ }
+
+ public boolean isShowGuiAtStartup() {
+ boolean propBoolean = false;
+ String propString = idropProperties.getProperty(IdropConfigurationService.SHOW_GUI);
+
+ if (propString != null && propString.equals("true")) {
+ propBoolean = true;
+ }
+
+ return propBoolean;
+ }
+
+ private boolean getBooleanForKey(String key) {
+ boolean propBoolean = false;
+ String propString = idropProperties.getProperty(key);
+
+ if (propString != null && propString.equals("true")) {
+ propBoolean = true;
+ }
+ return propBoolean;
+ }
+
+ private int getIntForKey(String key) {
+ int propInt = -1;
+ String propString = idropProperties.getProperty(key);
+
+ if (propString == null) {
+ return propInt;
+ }
+
+
+ propInt = Integer.parseInt(propString.trim());
+
+ return propInt;
+ }
+
+ public boolean isConnectionRestart() {
+ boolean propBoolean = false;
+ String propString = idropProperties.getProperty(IdropConfigurationService.IRODS_CONNECTION_RESTART);
+
+ if (propString != null && propString.equals("true")) {
+ propBoolean = true;
+ }
+
+ return propBoolean;
+ }
+
+ public String getPublicLinkServiceUrl(){
+ return idropProperties.getProperty(IdropConfigurationService.IDROP_PUBLIC_LINK_SERVICE);
+ }
+
+
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
index c2d1dc7..7080ebd 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/Version.java
@@ -1,5 +1,5 @@
package org.irods.jargon.idrop.desktop.systraygui.utils;
public final class Version {
public static String VERSION="2.0.1-SNAPSHOT";
- public static String BUILD_TIME="20130605-1641";
+ public static String BUILD_TIME="20130901-0147";
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
index 6a06167..fd89aac 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSOutlineModel.java
@@ -13,8 +13,10 @@ import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
import org.irods.jargon.core.exception.JargonException;
+import org.irods.jargon.core.pub.IRODSFileSystemAO;
import org.irods.jargon.core.pub.io.IRODSFile;
import org.irods.jargon.core.pub.io.IRODSFileFactory;
+import org.irods.jargon.core.pub.io.IRODSFileImpl;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.core.transfer.TransferStatus;
import org.irods.jargon.core.transfer.TransferStatus.TransferState;
@@ -31,184 +33,170 @@ import org.slf4j.LoggerFactory;
*/
public class IRODSOutlineModel extends DefaultOutlineModel {
- public static final org.slf4j.Logger log = LoggerFactory
- .getLogger(IRODSOutlineModel.class);
- private final IRODSFileSystemModel treeModel;
-
- public IRODSFileSystemModel getTreeModel() {
- return treeModel;
- }
-
- private iDrop idrop;
-
- public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
- final TableModel tm1, final boolean bln, final String string) {
- super(tm, tm1, bln, string);
- treeModel = (IRODSFileSystemModel) tm;
- this.idrop = idrop;
-
- }
-
- public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
- final RowModel rm, final boolean bln, final String string) {
- super(tm, rm, bln, string);
- treeModel = (IRODSFileSystemModel) tm;
-
- this.idrop = idrop;
- }
-
- public void notifyFileShouldBeRemoved(final IRODSNode deletedNode)
- throws IdropException {
-
- if (deletedNode == null) {
- return;
- }
- log.info("deleting node from parent:{}", deletedNode);
- final IRODSNode parent = (IRODSNode) deletedNode.getParent();
-
- if (parent == null) {
- return;
- }
-
- final IRODSOutlineModel thisModel = this;
-
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- deletedNode.getUserObject();
- CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) (parent)
- .getUserObject();
- IRODSTree stagingViewTree = idrop.getIrodsTree();
- try {
- TreeUtils.buildTreePathForIrodsAbsolutePath(
- stagingViewTree, entry.getFormattedAbsolutePath());
-
- } catch (IdropException ex) {
- Logger.getLogger(IRODSOutlineModel.class.getName()).log(
- Level.SEVERE, null, ex);
- throw new IdropRuntimeException(ex);
- }
-
- thisModel.treeModel.removeNodeFromParent(deletedNode);
-
- }
- });
- }
-
- public void notifyCompletionOfOperation(final IRODSTree irodsTree,
- final TransferStatus transferStatus) throws IdropException {
- log.info("tree model notified of status:{}", transferStatus);
-
- if (transferStatus.getTransferState() != TransferState.OVERALL_COMPLETION) {
- return;
- }
-
- // for put or copy operation, highlight the new node
- if (transferStatus.getTransferType() == TransferStatus.TransferType.PUT
- || transferStatus.getTransferType() == TransferStatus.TransferType.COPY) {
- log.info("successful put transfer, find the parent tree node, and clear the children");
- notifyFileShouldBeAdded(irodsTree,
- transferStatus.getTargetFileAbsolutePath());
-
- }
- }
-
- public void notifyFileShouldBeAdded(final IRODSTree irodsTree,
- final String irodsFileAbsolutePath) {
- log.info("notifyFileShouldBeAdded() for node:{}", irodsFileAbsolutePath);
-
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
-
- IRODSFileFactory irodsFileFactory = idrop.getiDropCore()
- .getIRODSFileFactoryForLoggedInAccount();
- try {
- try {
- // if the node already exists (e.g. an overwrite, don'
- // add it
-
- TreePath currentPath = TreeUtils
- .buildTreePathForIrodsAbsolutePath(irodsTree,
- irodsFileAbsolutePath);
- // build treePath will return parent if child not found
- if (currentPath == null) {
- log.warn(
- "null tree path found for:{} logged and ignored as a warning",
- irodsFileAbsolutePath);
- return;
- }
- IRODSNode irodsNode = (IRODSNode) currentPath
- .getLastPathComponent();
- CollectionAndDataObjectListingEntry lastPathNodeEntry = (CollectionAndDataObjectListingEntry) irodsNode
- .getUserObject();
- if (irodsFileAbsolutePath.equals(lastPathNodeEntry
- .getFormattedAbsolutePath())) {
- log.info("path already exists, do not double-add");
- return;
- }
-
- } catch (IdropException ex) {
- Logger.getLogger(IRODSOutlineModel.class.getName())
- .log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException(ex);
- }
-
- IRODSFile addedFile = irodsFileFactory
- .instanceIRODSFile(irodsFileAbsolutePath);
- if (!addedFile.exists()) {
- log.info(
- "looking for file that was added, I don't find it, so just move on: {}",
- irodsFileAbsolutePath);
- return;
- }
- TreePath parentPath;
- try {
- parentPath = TreeUtils
- .buildTreePathForIrodsAbsolutePath(irodsTree,
- addedFile.getParent());
- } catch (IdropException ex) {
- Logger.getLogger(IRODSOutlineModel.class.getName())
- .log(Level.SEVERE, null, ex);
- throw new IdropRuntimeException(ex);
- }
-
- if (parentPath == null) {
- log.info("null path for lookup, just move on");
- return;
- }
- log.info("building a new node");
- CollectionAndDataObjectListingEntry newEntry = new CollectionAndDataObjectListingEntry();
- newEntry.setCreatedAt(new Date(addedFile.lastModified()));
- newEntry.setDataSize(addedFile.length());
- newEntry.setModifiedAt(new Date(addedFile.lastModified()));
-
- if (addedFile.isDirectory()) {
- newEntry.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.COLLECTION);
- newEntry.setParentPath(addedFile.getParent());
- newEntry.setPathOrName(addedFile.getAbsolutePath());
- } else {
- newEntry.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.DATA_OBJECT);
- newEntry.setParentPath(addedFile.getParent());
- newEntry.setPathOrName(addedFile.getName());
- }
-
- IRODSNode newNode = new IRODSNode(newEntry, idrop
- .getiDropCore().getIrodsAccount(), idrop
- .getiDropCore().getIrodsFileSystem(), irodsTree);
- ((IRODSNode) parentPath.getLastPathComponent())
- .add(newNode);
- irodsTree.highlightPath(parentPath);
- } catch (JargonException ex) {
- Logger.getLogger(IRODSOutlineModel.class.getName()).log(
- Level.SEVERE, null, ex);
- } finally {
- idrop.getiDropCore()
- .closeIRODSConnectionForLoggedInAccount();
- }
- }
- });
- }
+ public static final org.slf4j.Logger log = LoggerFactory.getLogger(IRODSOutlineModel.class);
+ private final IRODSFileSystemModel treeModel;
+
+ public IRODSFileSystemModel getTreeModel() {
+ return treeModel;
+ }
+ private iDrop idrop;
+
+ public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
+ final TableModel tm1, final boolean bln, final String string) {
+ super(tm, tm1, bln, string);
+ this.treeModel = (IRODSFileSystemModel) tm;
+ this.idrop = idrop;
+
+ }
+
+ public IRODSOutlineModel(final iDrop idrop, final TreeModel tm,
+ final RowModel rm, final boolean bln, final String string) {
+ super(tm, rm, bln, string);
+ this.treeModel = (IRODSFileSystemModel) tm;
+
+ this.idrop = idrop;
+ }
+
+ public void notifyFileShouldBeRemoved(final IRODSNode deletedNode)
+ throws IdropException {
+
+ if (deletedNode == null) {
+ return;
+ }
+ log.info("deleting node from parent:{}", deletedNode);
+ final IRODSNode parent = (IRODSNode) deletedNode.getParent();
+
+ if (parent == null) {
+ return;
+ }
+
+ final IRODSOutlineModel thisModel = this;
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+ deletedNode.getUserObject();
+ CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) (parent).getUserObject();
+ IRODSTree stagingViewTree = idrop.getIrodsTree();
+ try {
+ TreeUtils.buildTreePathForIrodsAbsolutePath(
+ stagingViewTree, entry.getFormattedAbsolutePath());
+
+ } catch (IdropException ex) {
+ Logger.getLogger(IRODSOutlineModel.class.getName()).log(
+ Level.SEVERE, null, ex);
+ throw new IdropRuntimeException(ex);
+ }
+
+ thisModel.treeModel.removeNodeFromParent(deletedNode);
+
+ }
+ });
+ }
+
+ public void notifyCompletionOfOperation(final IRODSTree irodsTree,
+ final TransferStatus transferStatus) throws IdropException {
+ log.info("tree model notified of status:{}", transferStatus);
+
+ if (transferStatus.getTransferState() != TransferState.OVERALL_COMPLETION) {
+ return;
+ }
+
+ // for put or copy operation, highlight the new node
+ if (transferStatus.getTransferType() == TransferStatus.TransferType.PUT
+ || transferStatus.getTransferType() == TransferStatus.TransferType.COPY) {
+ log.info("successful put transfer, find the parent tree node, and clear the children");
+ notifyFileShouldBeAdded(irodsTree,
+ transferStatus.getTargetFileAbsolutePath());
+
+ }
+ }
+
+ public void notifyFileShouldBeAdded(final IRODSTree irodsTree,
+ final String irodsFileAbsolutePath) {
+ log.info("notifyFileShouldBeAdded() for node:{}", irodsFileAbsolutePath);
+
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+
+ IRODSFileFactory irodsFileFactory = idrop.getiDropCore().getIRODSFileFactoryForLoggedInAccount();
+ try {
+ try {
+ // if the node already exists (e.g. an overwrite, don'
+ // add it
+
+ TreePath currentPath = TreeUtils.buildTreePathForIrodsAbsolutePath(irodsTree,
+ irodsFileAbsolutePath);
+ // build treePath will return parent if child not found
+ if (currentPath == null) {
+ log.warn(
+ "null tree path found for:{} logged and ignored as a warning",
+ irodsFileAbsolutePath);
+ return;
+ }
+ IRODSNode irodsNode = (IRODSNode) currentPath.getLastPathComponent();
+ CollectionAndDataObjectListingEntry lastPathNodeEntry = (CollectionAndDataObjectListingEntry) irodsNode.getUserObject();
+ if (irodsFileAbsolutePath.equals(lastPathNodeEntry.getFormattedAbsolutePath())) {
+ log.info("path already exists, do not double-add");
+ return;
+ }
+
+ } catch (IdropException ex) {
+ Logger.getLogger(IRODSOutlineModel.class.getName()).log(Level.SEVERE, null, ex);
+ throw new IdropRuntimeException(ex);
+ }
+
+ IRODSFile addedFile = irodsFileFactory.instanceIRODSFile(irodsFileAbsolutePath);
+ if (!addedFile.exists()) {
+ log.info(
+ "looking for file that was added, I don't find it, so just move on: {}",
+ irodsFileAbsolutePath);
+ return;
+ }
+ TreePath parentPath;
+ try {
+ parentPath = TreeUtils.buildTreePathForIrodsAbsolutePath(irodsTree,
+ addedFile.getParent());
+ } catch (IdropException ex) {
+ Logger.getLogger(IRODSOutlineModel.class.getName()).log(Level.SEVERE, null, ex);
+ throw new IdropRuntimeException(ex);
+ }
+
+ if (parentPath == null) {
+ log.info("null path for lookup, just move on");
+ return;
+ }
+ log.info("building a new node");
+ CollectionAndDataObjectListingEntry newEntry = new CollectionAndDataObjectListingEntry();
+ newEntry.setCreatedAt(new Date(addedFile.lastModified()));
+ newEntry.setDataSize(addedFile.length());
+ newEntry.setModifiedAt(new Date(addedFile.lastModified()));
+
+ if (addedFile.isDirectory()) {
+ newEntry.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.COLLECTION);
+ newEntry.setParentPath(addedFile.getParent());
+ newEntry.setPathOrName(addedFile.getAbsolutePath());
+ } else {
+ newEntry.setObjectType(CollectionAndDataObjectListingEntry.ObjectType.DATA_OBJECT);
+ newEntry.setParentPath(addedFile.getParent());
+ newEntry.setPathOrName(addedFile.getName());
+ IRODSFileSystemAO ao = idrop.getiDropCore().getIRODSAccessObjectFactory().getIRODSFileSystemAO(idrop.getIrodsAccount());
+ newEntry.setOwnerName(ao.getObjStat(addedFile.getAbsolutePath()).getOwnerName());
+ }
+
+ IRODSNode newNode = new IRODSNode(newEntry, idrop.getiDropCore().getIrodsAccount(), idrop.getiDropCore().getIrodsFileSystem(), irodsTree);
+ ((IRODSNode) parentPath.getLastPathComponent()).add(newNode);
+ irodsTree.highlightPath(parentPath);
+ } catch (JargonException ex) {
+ Logger.getLogger(IRODSOutlineModel.class.getName()).log(
+ Level.SEVERE, null, ex);
+ } finally {
+ idrop.getiDropCore().closeIRODSConnectionForLoggedInAccount();
+ }
+ }
+ });
+ }
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java
index 18dd7c5..5804965 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/IRODSTree.java
@@ -1,18 +1,26 @@
package org.irods.jargon.idrop.desktop.systraygui.viscomponents;
-import java.awt.Cursor;
+import java.awt.*;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URI;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
+import java.util.UUID;
+import java.util.concurrent.ExecutionException;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.swing.AbstractAction;
-import javax.swing.Action;
-import javax.swing.JOptionPane;
-import javax.swing.JPopupMenu;
+import javax.swing.*;
import javax.swing.event.TreeExpansionEvent;
import javax.swing.event.TreeExpansionListener;
import javax.swing.event.TreeWillExpandListener;
@@ -20,391 +28,502 @@ import javax.swing.tree.ExpandVetoException;
import javax.swing.tree.TreeModel;
import javax.swing.tree.TreePath;
+import org.irods.jargon.core.exception.JargonException;
+import org.irods.jargon.core.pub.DataObjectAO;
+import org.irods.jargon.core.pub.io.IRODSFile;
+import org.irods.jargon.core.pub.io.IRODSFileFactory;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
+import org.irods.jargon.core.utils.MiscIRODSUtils;
import org.irods.jargon.idrop.desktop.systraygui.DeleteIRODSDialog;
import org.irods.jargon.idrop.desktop.systraygui.IRODSTreeContainingComponent;
import org.irods.jargon.idrop.desktop.systraygui.NewIRODSDirectoryDialog;
import org.irods.jargon.idrop.desktop.systraygui.RenameIRODSDirectoryDialog;
import org.irods.jargon.idrop.desktop.systraygui.iDrop;
+import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
+import org.irods.jargon.ticket.TicketAdminService;
+import org.irods.jargon.ticket.TicketServiceFactory;
+import org.irods.jargon.ticket.TicketServiceFactoryImpl;
+import org.irods.jargon.ticket.packinstr.TicketCreateModeEnum;
import org.netbeans.swing.outline.DefaultOutlineModel;
import org.netbeans.swing.outline.Outline;
+import org.netbeans.swing.outline.OutlineModel;
import org.netbeans.swing.outline.TreePathSupport;
import org.slf4j.LoggerFactory;
/**
* Swing JTree component for viewing iRODS server file system
- *
+ *
* @author Mike Conway - DICE (www.irods.org)
*/
public class IRODSTree extends Outline implements TreeWillExpandListener,
- TreeExpansionListener, IRODSTreeContainingComponent {
-
- /**
- *
- */
- private static final long serialVersionUID = -7815706939610881953L;
- public static org.slf4j.Logger log = LoggerFactory
- .getLogger(IRODSTree.class);
- protected iDrop idropParentGui = null;
- protected JPopupMenu m_popup = null;
- protected Action m_action;
- protected TreePath m_clickedPath;
- protected IRODSTree thisTree;
- private boolean refreshingTree = false;
- TreePathSupport tps;
-
- @Override
- public boolean isRefreshingTree() {
- synchronized (this) {
- return refreshingTree;
- }
- }
-
- public void setRefreshingTree(final boolean refreshingTree) {
- synchronized (this) {
- this.refreshingTree = refreshingTree;
- }
- }
-
- public IRODSTree(final TreeModel newModel, final iDrop idropParentGui) {
- super();
-
- DefaultOutlineModel.createOutlineModel(newModel, new IRODSRowModel(),
- true, "File System");
- this.idropParentGui = idropParentGui;
-
- initializeMenusAndListeners();
- }
-
- public IRODSTree() {
- super();
- }
-
- public IRODSTree(final iDrop idropParentGui) {
- super();
- this.idropParentGui = idropParentGui;
- initializeMenusAndListeners();
- }
-
- private void initializeMenusAndListeners() {
- tps = new TreePathSupport(getOutlineModel(), getLayoutCache());
- tps.addTreeExpansionListener(this);
- tps.addTreeWillExpandListener(this);
- setDragEnabled(true);
- setTransferHandler(new IRODSTreeTransferHandler(idropParentGui,
- "selectionModel"));
- setDropMode(javax.swing.DropMode.USE_SELECTION);
- setRenderDataProvider(new OutlineRenderProvider(this));
- setUpTreeMenu();
- IrodsSelectionListenerForBuildingInfoPanel treeListener;
- try {
- treeListener = new IrodsSelectionListenerForBuildingInfoPanel(
- idropParentGui);
- } catch (IdropException ex) {
- Logger.getLogger(IRODSTree.class.getName()).log(Level.SEVERE, null,
- ex);
- throw new IdropRuntimeException(
- "error initializing selection listener", ex);
- }
-
- getSelectionModel().addListSelectionListener(treeListener);
-
- /*
- * ActionMap map = this.getActionMap();
- * map.put(IRODSTreeTransferHandler.
- * getCutAction().getValue(Action.NAME),
- * IRODSTreeTransferHandler.getCutAction());
- * map.put(IRODSTreeTransferHandler
- * .getCopyAction().getValue(Action.NAME),
- * IRODSTreeTransferHandler.getCopyAction());
- * map.put(IRODSTreeTransferHandler
- * .getPasteAction().getValue(Action.NAME),
- * IRODSTreeTransferHandler.getPasteAction());
- *
- * InputMap imap = this.getInputMap();
- * imap.put(KeyStroke.getKeyStroke("ctrl X"),
- * TransferHandler.getCutAction().getValue(Action.NAME));
- * imap.put(KeyStroke.getKeyStroke("ctrl C"),
- * TransferHandler.getCopyAction().getValue(Action.NAME));
- * imap.put(KeyStroke.getKeyStroke("ctrl V"),
- * TransferHandler.getPasteAction().getValue(Action.NAME));
- */
-
- }
-
- /**
- * Set up context sensitive tree menu
- */
- private void setUpTreeMenu() {
- thisTree = this;
- m_popup = new JPopupMenu();
- m_action = new AbstractAction() {
-
- @Override
- public void actionPerformed(final ActionEvent e) {
- if (m_clickedPath == null) {
- return;
- }
-
- if (thisTree.isExpanded(m_clickedPath)) {
- thisTree.collapsePath(m_clickedPath);
- } else {
- thisTree.expandPath(m_clickedPath);
- }
- }
- };
-
- m_popup.add(m_action);
-
- Action newAction = new AbstractAction("New Folder") {
-
- @Override
- public void actionPerformed(final ActionEvent e) {
-
- log.info("adding new node");
-
- IRODSNode parent = (IRODSNode) m_clickedPath
- .getLastPathComponent();
- log.info("parent of new node is: {}", parent);
- CollectionAndDataObjectListingEntry dataEntry = (CollectionAndDataObjectListingEntry) parent
- .getUserObject();
- if (dataEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.DATA_OBJECT) {
- JOptionPane
- .showMessageDialog(
- thisTree,
- "The selected item is not a folder, cannot create a new directory",
- "Info", JOptionPane.INFORMATION_MESSAGE);
- log.info("new folder not created, the selected parent is not a collection");
- return;
- }
- // show a dialog asking for the new directory name...
- NewIRODSDirectoryDialog newDirectoryDialog = new NewIRODSDirectoryDialog(
- idropParentGui, true, dataEntry.getPathOrName(),
- thisTree, parent);
- newDirectoryDialog
- .setLocation(
- (int) (idropParentGui.getLocation().getX() + idropParentGui
- .getWidth() / 2), (int) (idropParentGui
- .getLocation().getY() + idropParentGui
- .getHeight() / 2));
- newDirectoryDialog.setVisible(true);
- }
- };
- m_popup.add(newAction);
-
- m_popup.addSeparator();
-
- Action a1 = new AbstractAction("Delete") {
-
- @Override
- public void actionPerformed(final ActionEvent e) {
- log.info("deleting a node");
- int[] rows = thisTree.getSelectedRows();
- log.debug("selected rows for delete:{}", rows);
-
- DeleteIRODSDialog deleteDialog;
-
- if (rows.length == 1) {
-
- IRODSNode toDelete = (IRODSNode) thisTree.getValueAt(
- rows[0], 0);
- log.info("deleting a single node: {}", toDelete);
- deleteDialog = new DeleteIRODSDialog(idropParentGui, true,
- thisTree, toDelete);
- } else {
- List<IRODSNode> nodesToDelete = new ArrayList<IRODSNode>();
- for (int row : rows) {
- nodesToDelete.add((IRODSNode) thisTree.getValueAt(row,
- 0));
-
- }
-
- deleteDialog = new DeleteIRODSDialog(idropParentGui, true,
- thisTree, nodesToDelete);
- }
-
- deleteDialog
- .setLocation(
- (int) (idropParentGui.getLocation().getX() + idropParentGui
- .getWidth() / 2), (int) (idropParentGui
- .getLocation().getY() + idropParentGui
- .getHeight() / 2));
- deleteDialog.setVisible(true);
- }
- };
-
- m_popup.add(a1);
- Action a2 = new AbstractAction("Rename") {
-
- @Override
- public void actionPerformed(final ActionEvent e) {
- log.info("renaming node");
-
- IRODSNode toRename = (IRODSNode) m_clickedPath
- .getLastPathComponent();
- log.info("node to rename is: {}", toRename);
- CollectionAndDataObjectListingEntry dataEntry = (CollectionAndDataObjectListingEntry) toRename
- .getUserObject();
-
- // dialog uses absolute path, so munge it for files
- StringBuilder sb = new StringBuilder();
- if (dataEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.COLLECTION) {
- sb.append(dataEntry.getPathOrName());
- } else {
- sb.append(dataEntry.getParentPath());
- sb.append('/');
- sb.append(dataEntry.getPathOrName());
- }
-
- // show a dialog asking for the new directory name...
- RenameIRODSDirectoryDialog renameDialog = new RenameIRODSDirectoryDialog(
- idropParentGui, true, sb.toString(), thisTree, toRename);
- renameDialog
- .setLocation(
- (int) (idropParentGui.getLocation().getX() + idropParentGui
- .getWidth() / 2), (int) (idropParentGui
- .getLocation().getY() + idropParentGui
- .getHeight() / 2));
- renameDialog.setVisible(true);
- }
- };
- m_popup.add(a2);
- thisTree.add(m_popup);
- thisTree.addMouseListener(new PopupTrigger());
-
- }
-
- @Override
- public void treeExpanded(final TreeExpansionEvent event) {
- }
-
- @Override
- public void treeCollapsed(final TreeExpansionEvent event) {
- }
-
- class PopupTrigger extends MouseAdapter {
-
- @Override
- public void mouseReleased(final MouseEvent e) {
- if (e.isPopupTrigger()) {
- int x = e.getX();
- int y = e.getY();
-
- TreePath path = thisTree.getClosestPathForLocation(x, y);
- if (path != null) {
- if (thisTree.isExpanded(path)) {
- m_action.putValue(Action.NAME, "Collapse");
- } else {
- m_action.putValue(Action.NAME, "Expand");
- }
- m_popup.show(thisTree, x, y);
- m_clickedPath = path;
- }
- } else if (e.getClickCount() == 2) {
- int x = e.getX();
- int y = e.getY();
- TreePath path = thisTree.getClosestPathForLocation(x, y);
-
- IRODSNode inode = null;
- String fullPath = null;
- if (path != null) {
- Object node = path.getLastPathComponent();
- if (node instanceof IRODSNode) {
- inode = (IRODSNode) node;
- CollectionAndDataObjectListingEntry entry = (CollectionAndDataObjectListingEntry) inode
- .getUserObject();
- fullPath = entry.getPathOrName();
- }
-
- if (fullPath != null) {
- idropParentGui.getiDropCore().setBasePath(fullPath);
- idropParentGui.buildTargetTree(false);
- }
- }
- }
- }
-
- @Override
- public void mousePressed(final MouseEvent e) {
- if (e.isPopupTrigger()) {
- int x = e.getX();
- int y = e.getY();
- TreePath path = thisTree.getClosestPathForLocation(x, y);
- if (path != null) {
- if (thisTree.isExpanded(path)) {
- m_action.putValue(Action.NAME, "Collapse");
- } else {
- m_action.putValue(Action.NAME, "Expand");
- }
- m_popup.show(thisTree, x, y);
- m_clickedPath = path;
- }
- }
- }
- }
-
- @Override
- public void treeWillCollapse(final TreeExpansionEvent event)
- throws ExpandVetoException {
- }
-
- @Override
- public void treeWillExpand(final TreeExpansionEvent event)
-
- // TODO: Need to make this a swing worker??
- throws ExpandVetoException {
- setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
- log.debug("tree expansion event:{}", event);
- IRODSNode expandingNode = (IRODSNode) event.getPath()
- .getLastPathComponent();
- // If I am refreshing the tree, then do not close the connection after
- // each load. It will be closed in the thing
- // doing the refreshing
- try {
- expandingNode.lazyLoadOfChildrenOfThisNode(!isRefreshingTree());
- } catch (IdropException ex) {
- Logger.getLogger(IRODSTree.class.getName()).log(Level.SEVERE, null,
- ex);
- idropParentGui.showIdropException(ex);
- throw new IdropRuntimeException("error expanding irodsNode");
- } finally {
- setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- }
- }
-
- public void highlightPath(final TreePath pathToHighlight) {
- final IRODSTree highlightTree = this;
- java.awt.EventQueue.invokeLater(new Runnable() {
-
- @Override
- public void run() {
- highlightTree.collapsePath(pathToHighlight);
- highlightTree.expandPath(pathToHighlight);
- // highlightTree.sc
- // highlightTree.scrollPathToVisible(pathToHighlight);
- }
- });
- }
-
- // FIXME: move out?
- /*
- * public class TransferActionListener implements ActionListener,
- * PropertyChangeListener { private JComponent focusOwner = null;
- *
- * public TransferActionListener() { KeyboardFocusManager manager =
- * KeyboardFocusManager. getCurrentKeyboardFocusManager();
- * manager.addPropertyChangeListener("permanentFocusOwner", this); }
- *
- * public void propertyChange(PropertyChangeEvent e) { Object o =
- * e.getNewValue(); if (o instanceof JComponent) { focusOwner =
- * (JComponent)o; } else { focusOwner = null; } }
- *
- * public void actionPerformed(ActionEvent e) { if (focusOwner == null)
- * return; String action = (String)e.getActionCommand(); Action a =
- * focusOwner.getActionMap().get(action); if (a != null) {
- * a.actionPerformed(new ActionEvent(focusOwner,
- * ActionEvent.ACTION_PERFORMED, null)); } } }
- */
+ TreeExpansionListener, IRODSTreeContainingComponent {
+
+ public static org.slf4j.Logger log = LoggerFactory.getLogger(IRODSTree.class);
+ protected iDrop idropParentGui = null;
+ protected JPopupMenu m_popup = null;
+ protected Action m_action;
+ protected Action public_link_action;
+ protected TreePath m_clickedPath;
+ protected IRODSTree thisTree;
+ private boolean refreshingTree = false;
+ TreePathSupport tps;
+
+ @Override
+ public boolean isRefreshingTree() {
+ synchronized (this) {
+ return refreshingTree;
+ }
+ }
+
+ public void setRefreshingTree(final boolean refreshingTree) {
+ synchronized (this) {
+ this.refreshingTree = refreshingTree;
+ }
+ }
+
+ public IRODSTree(final TreeModel newModel, final iDrop idropParentGui) {
+ super();
+
+ OutlineModel mdl = DefaultOutlineModel.createOutlineModel(newModel,
+ new IRODSRowModel(), true, "File System");
+ this.idropParentGui = idropParentGui;
+
+ initializeMenusAndListeners();
+ }
+
+ public IRODSTree() {
+ super();
+ }
+
+ public IRODSTree(final iDrop idropParentGui) {
+ super();
+ this.idropParentGui = idropParentGui;
+ initializeMenusAndListeners();
+ }
+
+ private void initializeMenusAndListeners() {
+ tps = new TreePathSupport(this.getOutlineModel(), this.getLayoutCache());
+ tps.addTreeExpansionListener(this);
+ tps.addTreeWillExpandListener(this);
+ setDragEnabled(true);
+ setTransferHandler(new IRODSTreeTransferHandler(idropParentGui,
+ "selectionModel"));
+ setDropMode(javax.swing.DropMode.USE_SELECTION);
+ this.setRenderDataProvider(new OutlineRenderProvider(this));
+ setUpTreeMenu();
+ IrodsSelectionListenerForBuildingInfoPanel treeListener;
+ try {
+ treeListener = new IrodsSelectionListenerForBuildingInfoPanel(
+ idropParentGui);
+ } catch (IdropException ex) {
+ Logger.getLogger(IRODSTree.class.getName()).log(Level.SEVERE, null,
+ ex);
+ throw new IdropRuntimeException(
+ "error initializing selection listener", ex);
+ }
+
+ this.getSelectionModel().addListSelectionListener(treeListener);
+
+ /*
+ ActionMap map = this.getActionMap();
+ map.put(IRODSTreeTransferHandler.getCutAction().getValue(Action.NAME),
+ IRODSTreeTransferHandler.getCutAction());
+ map.put(IRODSTreeTransferHandler.getCopyAction().getValue(Action.NAME),
+ IRODSTreeTransferHandler.getCopyAction());
+ map.put(IRODSTreeTransferHandler.getPasteAction().getValue(Action.NAME),
+ IRODSTreeTransferHandler.getPasteAction());
+
+ InputMap imap = this.getInputMap();
+ imap.put(KeyStroke.getKeyStroke("ctrl X"),
+ TransferHandler.getCutAction().getValue(Action.NAME));
+ imap.put(KeyStroke.getKeyStroke("ctrl C"),
+ TransferHandler.getCopyAction().getValue(Action.NAME));
+ imap.put(KeyStroke.getKeyStroke("ctrl V"),
+ TransferHandler.getPasteAction().getValue(Action.NAME));
+ *
+ */
+
+
+ }
+
+ /**
+ * Set up context sensitive tree menu
+ */
+ private void setUpTreeMenu() {
+ thisTree = this;
+ m_popup = new JPopupMenu();
+ m_action = new AbstractAction() {
+
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+ if (m_clickedPath == null) {
+ return;
+ }
+
+ if (thisTree.isExpanded(m_clickedPath)) {
+ thisTree.collapsePath(m_clickedPath);
+ } else {
+ thisTree.expandPath(m_clickedPath);
+ }
+ }
+ };
+
+ m_popup.add(m_action);
+
+ //public link action
+ public_link_action = new AbstractAction("Public Link") {
+
+ @Override
+ public void actionPerformed(ActionEvent actionEvent) {
+
+ IRODSNode theNode = (IRODSNode) m_clickedPath.getLastPathComponent();
+
+ IRODSFile file;
+
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+
+ String ticketStr = null;
+ try {
+ TicketServiceFactory tsf = new TicketServiceFactoryImpl(idropParentGui.getiDropCore().getIRODSAccessObjectFactory());
+ TicketAdminService tas = tsf.instanceTicketAdminService(idropParentGui.getIrodsAccount());
+ IRODSFileFactory ff = idropParentGui.getiDropCore().getIRODSFileFactory(idropParentGui.getIrodsAccount());
+ file = ff.instanceIRODSFile(theNode.getFullPath());
+ // generate ticket string
+ String ticketString = UUID.randomUUID().toString().replaceAll("-", "");
+ ticketStr = tas.createTicket(TicketCreateModeEnum.READ,file,ticketString);
+ } catch (JargonException e) {
+ idropParentGui.showIdropException(e);
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ throw new IdropRuntimeException("error creating ticket");
+ }
+
+ final GetPublicLink gpl = new GetPublicLink(ticketStr, file.toURI().toString());
+ gpl.addPropertyChangeListener(new PropertyChangeListener() {
+
+ @Override
+ public void propertyChange(PropertyChangeEvent propertyChangeEvent) {
+ if ("state".equals(propertyChangeEvent.getPropertyName())) {
+ if (propertyChangeEvent.getNewValue().equals(SwingWorker.StateValue.DONE)) {
+ try {
+ String result = gpl.get();
+ Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ StringSelection selection = new StringSelection(result);
+ clipboard.setContents(selection, selection);
+ JOptionPane.showMessageDialog(null, "Public link has been copied to clipboard", "Info", JOptionPane.INFORMATION_MESSAGE);
+ } catch (InterruptedException e) {
+ JOptionPane.showMessageDialog(null, "error occurred while obtaining public link", "error", JOptionPane.ERROR_MESSAGE);
+ } catch (ExecutionException e) {
+ JOptionPane.showMessageDialog(null, "error occurred while obtaining public link", "error", JOptionPane.ERROR_MESSAGE);
+ } finally {
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+ }
+ }
+
+ });
+
+ gpl.execute();
+
+ }
+
+ };
+
+ m_popup.add(public_link_action);
+
+ Action newAction = new AbstractAction("New Folder") {
+
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+
+ log.info("adding new node");
+
+ IRODSNode parent = (IRODSNode) m_clickedPath.getLastPathComponent();
+ log.info("parent of new node is: {}", parent);
+ CollectionAndDataObjectListingEntry dataEntry = (CollectionAndDataObjectListingEntry) parent.getUserObject();
+ if (dataEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.DATA_OBJECT) {
+ JOptionPane.showMessageDialog(
+ thisTree,
+ "The selected item is not a folder, cannot create a new directory",
+ "Info", JOptionPane.INFORMATION_MESSAGE);
+ log.info("new folder not created, the selected parent is not a collection");
+ return;
+ }
+ // show a dialog asking for the new directory name...
+ NewIRODSDirectoryDialog newDirectoryDialog = new NewIRODSDirectoryDialog(
+ idropParentGui, true, dataEntry.getPathOrName(),
+ thisTree, parent);
+ newDirectoryDialog.setLocation(
+ (int) (idropParentGui.getLocation().getX() + idropParentGui.getWidth() / 2), (int) (idropParentGui.getLocation().getY() + idropParentGui.getHeight() / 2));
+ newDirectoryDialog.setVisible(true);
+ }
+ };
+ m_popup.add(newAction);
+
+ m_popup.addSeparator();
+
+ Action a1 = new AbstractAction("Delete") {
+
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+ log.info("deleting a node");
+ int[] rows = thisTree.getSelectedRows();
+ log.debug("selected rows for delete:{}", rows);
+
+ DeleteIRODSDialog deleteDialog;
+
+ if (rows.length == 1) {
+
+ IRODSNode toDelete = (IRODSNode) thisTree.getValueAt(
+ rows[0], 0);
+ log.info("deleting a single node: {}", toDelete);
+ deleteDialog = new DeleteIRODSDialog(idropParentGui, true,
+ thisTree, toDelete);
+ } else {
+ List<IRODSNode> nodesToDelete = new ArrayList<IRODSNode>();
+ for (int row : rows) {
+ nodesToDelete.add((IRODSNode) thisTree.getValueAt(row,
+ 0));
+
+ }
+
+ deleteDialog = new DeleteIRODSDialog(idropParentGui, true,
+ thisTree, nodesToDelete);
+ }
+
+ deleteDialog.setLocation(
+ (int) (idropParentGui.getLocation().getX() + idropParentGui.getWidth() / 2), (int) (idropParentGui.getLocation().getY() + idropParentGui.getHeight() / 2));
+ deleteDialog.setVisible(true);
+ }
+ };
+
+ m_popup.add(a1);
+ Action a2 = new AbstractAction("Rename") {
+
+ @Override
+ public void actionPerformed(final ActionEvent e) {
+ log.info("renaming node");
+
+ IRODSNode toRename = (IRODSNode) m_clickedPath.getLastPathComponent();
+ log.info("node to rename is: {}", toRename);
+ CollectionAndDataObjectListingEntry dataEntry = (CollectionAndDataObjectListingEntry) toRename.getUserObject();
+
+ // dialog uses absolute path, so munge it for files
+ StringBuilder sb = new StringBuilder();
+ if (dataEntry.getObjectType() == CollectionAndDataObjectListingEntry.ObjectType.COLLECTION) {
+ sb.append(dataEntry.getPathOrName());
+ } else {
+ sb.append(dataEntry.getParentPath());
+ sb.append('/');
+ sb.append(dataEntry.getPathOrName());
+ }
+
+ // show a dialog asking for the new directory name...
+ RenameIRODSDirectoryDialog renameDialog = new RenameIRODSDirectoryDialog(
+ idropParentGui, true, sb.toString(), thisTree, toRename);
+ renameDialog.setLocation(
+ (int) (idropParentGui.getLocation().getX() + idropParentGui.getWidth() / 2), (int) (idropParentGui.getLocation().getY() + idropParentGui.getHeight() / 2));
+ renameDialog.setVisible(true);
+ }
+ };
+ m_popup.add(a2);
+ thisTree.add(m_popup);
+ thisTree.addMouseListener(new PopupTrigger());
+
+ }
+
+ @Override
+ public void treeExpanded(final TreeExpansionEvent event) {
+ }
+
+ @Override
+ public void treeCollapsed(final TreeExpansionEvent event) {
+ }
+
+ class PopupTrigger extends MouseAdapter {
+
+ @Override
+ public void mouseReleased(final MouseEvent e) {
+ if (e.isPopupTrigger()) {
+ int x = e.getX();
+ int y = e.getY();
+
+ TreePath path = thisTree.getClosestPathForLocation(x, y);
+ if (path != null) {
+ if (thisTree.isExpanded(path)) {
+ m_action.putValue(Action.NAME, "Collapse");
+ } else {
+ m_action.putValue(Action.NAME, "Expand");
+ }
+
+ //public link option only availabe for files
+ IRODSNode currNode = (IRODSNode) path.getLastPathComponent();
+ CollectionAndDataObjectListingEntry entry =
+ (CollectionAndDataObjectListingEntry) currNode.getUserObject();
+ // todo is public link service configured?
+ boolean configured = idropParentGui.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.IDROP_PUBLIC_LINK_SERVICE)!=null;
+ public_link_action.setEnabled(configured && entry.isDataObject() && idropParentGui.getIrodsAccount().getUserName().equals(entry.getOwnerName()));
+
+ m_popup.show(thisTree, x, y);
+ m_clickedPath = path;
+ }
+ } else if (e.getClickCount() == 2) {
+ int x = e.getX();
+ int y = e.getY();
+ TreePath path = thisTree.getClosestPathForLocation(x, y);
+
+ IRODSNode inode = null;
+ String fullPath = null;
+ if (path != null) {
+ Object node = path.getLastPathComponent();
+ if (node instanceof IRODSNode) {
+ inode = (IRODSNode) node;
+ CollectionAndDataObjectListingEntry entry =
+ (CollectionAndDataObjectListingEntry) inode.getUserObject();
+ fullPath = entry.getPathOrName();
+ }
+
+ if (fullPath != null) {
+ idropParentGui.getiDropCore().setBasePath(fullPath);
+ idropParentGui.buildTargetTree(false);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void mousePressed(final MouseEvent e) {
+ if (e.isPopupTrigger()) {
+ int x = e.getX();
+ int y = e.getY();
+ TreePath path = thisTree.getClosestPathForLocation(x, y);
+ if (path != null) {
+ if (thisTree.isExpanded(path)) {
+ m_action.putValue(Action.NAME, "Collapse");
+ } else {
+ m_action.putValue(Action.NAME, "Expand");
+ }
+ //public link option only availabe for files
+ IRODSNode currNode = (IRODSNode) path.getLastPathComponent();
+ CollectionAndDataObjectListingEntry entry =
+ (CollectionAndDataObjectListingEntry) currNode.getUserObject();
+ public_link_action.setEnabled(entry.isDataObject() && idropParentGui.getIrodsAccount().getUserName().equals(entry.getOwnerName()));
+
+ m_popup.show(thisTree, x, y);
+ m_clickedPath = path;
+ }
+ }
+ }
+ }
+
+ @Override
+ public void treeWillCollapse(final TreeExpansionEvent event)
+ throws ExpandVetoException {
+ }
+
+ @Override
+ public void treeWillExpand(final TreeExpansionEvent event)
+
+ //TODO: Need to make this a swing worker??
+ throws ExpandVetoException {
+ setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
+ log.debug("tree expansion event:{}", event);
+ IRODSNode expandingNode = (IRODSNode) event.getPath().getLastPathComponent();
+ // If I am refreshing the tree, then do not close the connection after
+ // each load. It will be closed in the thing
+ // doing the refreshing
+ try {
+ expandingNode.lazyLoadOfChildrenOfThisNode(!isRefreshingTree());
+ } catch (IdropException ex) {
+ Logger.getLogger(IRODSTree.class.getName()).log(Level.SEVERE, null,
+ ex);
+ idropParentGui.showIdropException(ex);
+ throw new IdropRuntimeException("error expanding irodsNode");
+ } finally {
+ setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
+ }
+ }
+
+ public void highlightPath(final TreePath pathToHighlight) {
+ final IRODSTree highlightTree = this;
+ java.awt.EventQueue.invokeLater(new Runnable() {
+
+ @Override
+ public void run() {
+ highlightTree.collapsePath(pathToHighlight);
+ highlightTree.expandPath(pathToHighlight);
+ // highlightTree.sc
+ // highlightTree.scrollPathToVisible(pathToHighlight);
+ }
+ });
+ }
+
+ // FIXME: move out?
+ /*
+public class TransferActionListener implements ActionListener,
+ PropertyChangeListener {
+ private JComponent focusOwner = null;
+
+ public TransferActionListener() {
+ KeyboardFocusManager manager = KeyboardFocusManager.
+ getCurrentKeyboardFocusManager();
+ manager.addPropertyChangeListener("permanentFocusOwner", this);
+ }
+
+ public void propertyChange(PropertyChangeEvent e) {
+ Object o = e.getNewValue();
+ if (o instanceof JComponent) {
+ focusOwner = (JComponent)o;
+ } else {
+ focusOwner = null;
+ }
+ }
+
+ public void actionPerformed(ActionEvent e) {
+ if (focusOwner == null)
+ return;
+ String action = (String)e.getActionCommand();
+ Action a = focusOwner.getActionMap().get(action);
+ if (a != null) {
+ a.actionPerformed(new ActionEvent(focusOwner,
+ ActionEvent.ACTION_PERFORMED,
+ null));
+ }
+ }
+}
+*/
+
+ class GetPublicLink extends SwingWorker<String, Void> {
+
+ private final String theUri;
+
+ private final String ticket;
+
+ public GetPublicLink(String ticket, String theUri) {
+ this.theUri = theUri;
+ this.ticket = ticket;
+ }
+
+ @Override
+ protected String doInBackground() throws Exception {
+ StringBuilder publinkServiceSb = new StringBuilder(idropParentGui.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.IDROP_PUBLIC_LINK_SERVICE));
+ //escape ampersand in query parameter value
+ publinkServiceSb.append("?ticket=").append(ticket).append("&uri=").append(theUri.replaceAll("\\&","%26"));
+ URI u = URI.create(publinkServiceSb.toString());
+ URL url = u.toURL();
+ HttpURLConnection con = (HttpURLConnection) url.openConnection();
+ if (con.getResponseCode() == 200) {
+ BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ return br.readLine();
+
+ } else {
+ throw new Exception("error occurred while obtaining link");
+ }
+ }
+
+ }
+
+
}
diff --git a/idrop-swing/src/main/resources/icon_metasearch.png b/idrop-swing/src/main/resources/icon_metasearch.png
new file mode 100644
index 0000000..ed25fde
--- /dev/null
+++ b/idrop-swing/src/main/resources/icon_metasearch.png
Binary files differ
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.png b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.png
new file mode 100644
index 0000000..aba6538
--- /dev/null
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.png
Binary files differ
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
index 5a524bc..12ea5b3 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -348,3 +348,4 @@ DiffViewDialog.lblIrodsFileChecksumLbl.text=iRODS File Checksum:
DiffViewDialog.lblIrodsFileChecksum.text=irodsfilechecksum
iDrop.btnMainToolbarTree.text=Tree
iDrop.btnMainToolbarTree.toolTipText=Adjust the tree root
+iDrop.btnMainToolbarSettings1.text=MetaSearch
diff --git a/idrop-swing/src/main/resources/org/irods/jargon/idrop/splashWindow.xml b/idrop-swing/src/main/resources/org/irods/jargon/idrop/splashWindow.xml
index ceff841..3d50de8 100644
--- a/idrop-swing/src/main/resources/org/irods/jargon/idrop/splashWindow.xml
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/splashWindow.xml
@@ -2,7 +2,7 @@
<borderlayout>
<constraint location="Center">
<label>
- <imageicon src="org/irods/jargon/idrop/desktop/images/iDrop.png" setas="icon" />
+ <imageicon src="org/irods/jargon/idrop/desktop/images/qcg-logo-large-color1.png" setas="icon" />
</label>
</constraint>
<constraint location="South">