summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-07-18 14:17:27 (GMT)
committer Mike Conway <mikeconway@Mike-Conways-MacBook-Pro.local>2011-07-18 14:17:27 (GMT)
commitcdcb06d528148bf1381d05fd2958334f11d4d156 (patch)
tree84806bcde3f51564cbad44c1a023973bb6c7344b
parentaafc22813bc2dd8f93b3bdf6661074ada138eab0 (diff)
downloadQCG-Data-cdcb06d528148bf1381d05fd2958334f11d4d156.zip
QCG-Data-cdcb06d528148bf1381d05fd2958334f11d4d156.tar.gz
QCG-Data-cdcb06d528148bf1381d05fd2958334f11d4d156.tar.bz2
adding config panel
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form213
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java208
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java16
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/LoginDialog.java12
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java14
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.form153
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java308
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.form10
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/iDrop.java41
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationService.java7
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImpl.java28
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropConfig.java20
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java2
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LookAndFeelManager.java4
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java17
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties11
-rw-r--r--idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java22
-rw-r--r--idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/unittest/AllTests.java4
18 files changed, 537 insertions, 553 deletions
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form
new file mode 100644
index 0000000..10fa7f8
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.form
@@ -0,0 +1,213 @@
+<?xml version="1.1" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JDialogFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ <Property name="title" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
+ <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="true"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <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"/>
+ <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,67,0,0,2,-29"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlTop">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="North"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="739" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="0" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlCenter">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="Center"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridLayout">
+ <Property name="columns" type="int" value="0"/>
+ <Property name="rows" type="int" value="1"/>
+ </Layout>
+ <SubComponents>
+ <Container class="javax.swing.JTabbedPane" name="tabConfig">
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlConfigIdrop">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="iDrop">
+ <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="checkShowGUI">
+ <Properties>
+ <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="IDROPConfigurationPanel.checkShowGUI.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.checkShowGUI.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkShowGUIActionPerformed"/>
+ </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="pnlConfigGrids">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="Grids">
+ <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="718" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="494" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlConfigTransfers">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="Transfers">
+ <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.pnlConfigTransfers.TabConstraints.tabTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JCheckBox" name="checkLogSuccessfulTransfer">
+ <Properties>
+ <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="IDROPConfigurationPanel.checkLogSuccessfulTransfer.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.checkLogSuccessfulTransfer.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="checkLogSuccessfulTransferActionPerformed"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+ <GridBagConstraints gridX="0" gridY="0" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="235" insetsLeft="233" insetsBottom="236" insetsRight="232" anchor="18" weightX="0.0" weightY="0.0"/>
+ </Constraint>
+ </Constraints>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlConfigSynch">
+ <Events>
+ <EventHandler event="componentShown" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="pnlConfigSynchComponentShown"/>
+ </Events>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription">
+ <JTabbedPaneConstraints tabName="Synchronization">
+ <Property name="tabTitle" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.pnlConfigSynch.TabConstraints.tabTitle" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </JTabbedPaneConstraints>
+ </Constraint>
+ </Constraints>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="718" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <EmptySpace min="0" pref="494" max="32767" attributes="0"/>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="pnlBottom">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="South"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
+ <Property name="alignment" type="int" value="2"/>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnOK">
+ <Properties>
+ <Property name="mnemonic" type="int" value="79"/>
+ <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="IDROPConfigurationPanel.btnOK.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IDROPConfigurationPanel.btnOK.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnOKActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
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
new file mode 100644
index 0000000..59f1409
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPConfigurationPanel.java
@@ -0,0 +1,208 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/*
+ * IDROPConfigurationPanel.java
+ *
+ * Created on Jul 18, 2011, 9:17:35 AM
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationService;
+import org.irods.jargon.idrop.desktop.systraygui.utils.IDROPConfig;
+import org.irods.jargon.idrop.exceptions.IdropException;
+import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
+import org.slf4j.LoggerFactory;
+
+/**
+ *
+ * @author mikeconway
+ */
+public class IDROPConfigurationPanel extends javax.swing.JDialog {
+
+ private final IDROPCore idropCore;
+ private static final org.slf4j.Logger log = LoggerFactory.getLogger(IDROPConfigurationPanel.class);
+
+ /** Creates new form IDROPConfigurationPanel */
+ public IDROPConfigurationPanel(java.awt.Frame parent, boolean modal, IDROPCore idropCore) {
+ super(parent, modal);
+ this.idropCore = idropCore;
+ initComponents();
+ initWithConfigData();
+ }
+
+ /** 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;
+
+ 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();
+ pnlConfigGrids = new javax.swing.JPanel();
+ pnlConfigTransfers = new javax.swing.JPanel();
+ checkLogSuccessfulTransfer = new javax.swing.JCheckBox();
+ pnlConfigSynch = new javax.swing.JPanel();
+ 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, 739, 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);
+
+ pnlCenter.setLayout(new java.awt.GridLayout());
+
+ pnlConfigIdrop.setLayout(new java.awt.GridBagLayout());
+
+ 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.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkShowGUIActionPerformed(evt);
+ }
+ });
+ pnlConfigIdrop.add(checkShowGUI, new java.awt.GridBagConstraints());
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle"), pnlConfigIdrop); // NOI18N
+
+ org.jdesktop.layout.GroupLayout pnlConfigGridsLayout = new org.jdesktop.layout.GroupLayout(pnlConfigGrids);
+ pnlConfigGrids.setLayout(pnlConfigGridsLayout);
+ pnlConfigGridsLayout.setHorizontalGroup(
+ pnlConfigGridsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 718, Short.MAX_VALUE)
+ );
+ pnlConfigGridsLayout.setVerticalGroup(
+ pnlConfigGridsLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 494, Short.MAX_VALUE)
+ );
+
+ tabConfig.addTab(org.openide.util.NbBundle.getMessage(IDROPConfigurationPanel.class, "IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle"), pnlConfigGrids); // NOI18N
+
+ pnlConfigTransfers.setLayout(new java.awt.GridBagLayout());
+
+ 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.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ checkLogSuccessfulTransferActionPerformed(evt);
+ }
+ });
+ gridBagConstraints = new java.awt.GridBagConstraints();
+ gridBagConstraints.gridx = 0;
+ gridBagConstraints.gridy = 0;
+ gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
+ gridBagConstraints.insets = new java.awt.Insets(235, 233, 236, 232);
+ pnlConfigTransfers.add(checkLogSuccessfulTransfer, 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);
+ }
+ });
+
+ org.jdesktop.layout.GroupLayout pnlConfigSynchLayout = new org.jdesktop.layout.GroupLayout(pnlConfigSynch);
+ pnlConfigSynch.setLayout(pnlConfigSynchLayout);
+ pnlConfigSynchLayout.setHorizontalGroup(
+ pnlConfigSynchLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 718, Short.MAX_VALUE)
+ );
+ pnlConfigSynchLayout.setVerticalGroup(
+ pnlConfigSynchLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
+ .add(0, 494, Short.MAX_VALUE)
+ );
+
+ 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
+
+ private void btnOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnOKActionPerformed
+ this.dispose();
+ }//GEN-LAST:event_btnOKActionPerformed
+
+ private void checkShowGUIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkShowGUIActionPerformed
+ log.info("updating show gui at startup to:{}", checkShowGUI.isSelected());
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IDROPConfigurationService.SHOW_GUI, Boolean.toString(checkShowGUI.isSelected()));
+ } catch (IdropException ex) {
+ log.error("error setting show gui property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+ }//GEN-LAST:event_checkShowGUIActionPerformed
+
+ private void checkLogSuccessfulTransferActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkLogSuccessfulTransferActionPerformed
+ log.info("updating log successful transfers to:{}", checkLogSuccessfulTransfer.isSelected());
+ try {
+ idropCore.getIdropConfigurationService().updateConfig(IDROPConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES, Boolean.toString(checkShowGUI.isSelected()));
+ } catch (IdropException ex) {
+ log.error("error setting log successful property", ex);
+ throw new IdropRuntimeException(ex);
+ }
+
+ }//GEN-LAST:event_checkLogSuccessfulTransferActionPerformed
+
+ private void pnlConfigSynchComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_pnlConfigSynchComponentShown
+ log.info("lazily loading synch data");
+ }//GEN-LAST:event_pnlConfigSynchComponentShown
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnOK;
+ private javax.swing.JCheckBox checkLogSuccessfulTransfer;
+ private javax.swing.JCheckBox checkShowGUI;
+ private javax.swing.JPanel pnlBottom;
+ private javax.swing.JPanel pnlCenter;
+ private javax.swing.JPanel pnlConfigGrids;
+ private javax.swing.JPanel pnlConfigIdrop;
+ private javax.swing.JPanel pnlConfigSynch;
+ private javax.swing.JPanel pnlConfigTransfers;
+ private javax.swing.JPanel pnlTop;
+ private javax.swing.JTabbedPane tabConfig;
+ // End of variables declaration//GEN-END:variables
+
+ private void initWithConfigData() {
+ IDROPConfig idropConfig = idropCore.getIdropConfig();
+ checkShowGUI.setSelected(idropConfig.isShowGuiAtStartup());
+ checkLogSuccessfulTransfer.setSelected(idropConfig.isLogSuccessfulTransfers());
+ }
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
index 48bda69..734cd18 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IDROPCore.java
@@ -12,8 +12,8 @@ import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.core.pub.io.IRODSFile;
import org.irods.jargon.core.pub.io.IRODSFileFactory;
import org.irods.jargon.idrop.desktop.systraygui.services.IconManager;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
-import org.irods.jargon.idrop.desktop.systraygui.utils.IdropConfig;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationService;
+import org.irods.jargon.idrop.desktop.systraygui.utils.IDROPConfig;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
import org.irods.jargon.transfer.engine.TransferManager;
import org.slf4j.LoggerFactory;
@@ -31,17 +31,17 @@ public class IDROPCore {
public void setIrodsFileSystem(final IRODSFileSystem irodsFileSystem) {
this.irodsFileSystem = irodsFileSystem;
}
- private IdropConfig idropConfig = null;
+ private IDROPConfig idropConfig = null;
private TransferManager transferManager = null;
private IconManager iconManager = null;
private Timer queueTimer = new Timer();
- private IdropConfigurationService idropConfigurationService = null;
+ private IDROPConfigurationService idropConfigurationService = null;
- public IdropConfigurationService getIdropConfigurationService() {
+ public IDROPConfigurationService getIdropConfigurationService() {
return idropConfigurationService;
}
- public void setIdropConfigurationService(IdropConfigurationService idropConfigurationService) {
+ public void setIdropConfigurationService(IDROPConfigurationService idropConfigurationService) {
this.idropConfigurationService = idropConfigurationService;
}
@@ -57,11 +57,11 @@ public class IDROPCore {
this.irodsAccount = irodsAccount;
}
- public IdropConfig getIdropConfig() {
+ public IDROPConfig getIdropConfig() {
return idropConfig;
}
- public void setIdropConfig(final IdropConfig idropConfig) {
+ public void setIdropConfig(final IDROPConfig idropConfig) {
this.idropConfig = idropConfig;
}
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 4831cdf..f255ac4 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
@@ -15,7 +15,7 @@ import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.core.pub.UserAO;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationService;
import org.irods.jargon.idrop.desktop.systraygui.utils.IdropPropertiesHelper;
import org.irods.jargon.idrop.exceptions.IdropException;
import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
@@ -53,15 +53,15 @@ public class LoginDialog extends JDialog {
private void loginNormally(
final org.irods.jargon.idrop.desktop.systraygui.iDrop iDrop) {
// predispose based on preferences
- String host = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_HOST);
+ String host = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IDROPConfigurationService.ACCOUNT_CACHE_HOST);
txtHost.setText(host);
- String port = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_PORT);
+ String port = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IDROPConfigurationService.ACCOUNT_CACHE_PORT);
txtPort.setText(port);
- String zone = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_ZONE);
+ String zone = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IDROPConfigurationService.ACCOUNT_CACHE_ZONE);
txtZone.setText(zone);
- String resource = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_RESOURCE);
+ String resource = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IDROPConfigurationService.ACCOUNT_CACHE_RESOURCE);
txtResource.setText(resource);
- String username = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IdropConfigurationService.ACCOUNT_CACHE_USER_NAME);
+ String username = iDrop.getiDropCore().getIdropConfig().getPropertyForKey(IDROPConfigurationService.ACCOUNT_CACHE_USER_NAME);
txtUserName.setText(username);
}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
index 62504c7..c180269 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/StartupSequencer.java
@@ -14,10 +14,10 @@ import javax.swing.JOptionPane;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.pub.IRODSFileSystem;
import org.irods.jargon.idrop.desktop.systraygui.services.IconManager;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationServiceImpl;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationService;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationServiceImpl;
import org.irods.jargon.idrop.desktop.systraygui.services.QueueSchedulerTimerTask;
-import org.irods.jargon.idrop.desktop.systraygui.utils.IdropConfig;
+import org.irods.jargon.idrop.desktop.systraygui.utils.IDROPConfig;
import org.irods.jargon.idrop.desktop.systraygui.utils.LookAndFeelManager;
import org.irods.jargon.idrop.desktop.systraygui.viscomponents.SetupWizard;
import org.irods.jargon.idrop.exceptions.IdropAlreadyRunningException;
@@ -102,7 +102,7 @@ public class StartupSequencer {
Properties derivedProperties = null;
try {
- IdropConfigurationService idropConfigurationService = new IdropConfigurationServiceImpl(
+ IDROPConfigurationService idropConfigurationService = new IDROPConfigurationServiceImpl(
derivedConfigHomeDirectory, idropCore);
idropCore.setIdropConfigurationService(idropConfigurationService);
derivedProperties = idropConfigurationService.bootstrapConfiguration();
@@ -129,12 +129,12 @@ public class StartupSequencer {
"Configuration information gathered, logging in...", ++count);
log.info("config properties derived...");
- idropCore.setIdropConfig(new IdropConfig(derivedProperties));
+ idropCore.setIdropConfig(new IDROPConfig(derivedProperties));
idropCore.getIdropConfig().setUpLogging();
log.info("setting initial look and feel");
LookAndFeelManager laf = new LookAndFeelManager(idropCore);
- laf.setLookAndFeel(idropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.LOOK_AND_FEEL));
+ laf.setLookAndFeel(idropCore.getIdropConfig().getPropertyForKey(IDROPConfigurationService.LOOK_AND_FEEL));
log.info("logging in in splash background thread");
idropSplashWindow.setStatus("Logging in...", ++count);
@@ -259,7 +259,7 @@ public class StartupSequencer {
if (n == 1) {
log.info("switching to show GUI at startup");
try {
- idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.SHOW_GUI, "true");
+ idropCore.getIdropConfigurationService().updateConfig(IDROPConfigurationService.SHOW_GUI, "true");
idrop.showIdropGui();
} catch (IdropException ex) {
log.error("error setting show GUI at startup", ex);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.form
deleted file mode 100644
index 09e2c57..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.form
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.1" encoding="UTF-8" ?>
-
-<Form version="1.3" maxVersion="1.7" 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="2"/>
- <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">
- <Group type="102" alignment="1" attributes="0">
- <Group type="103" groupAlignment="1" attributes="0">
- <Group type="102" alignment="1" attributes="0">
- <EmptySpace max="-2" attributes="0"/>
- <Component id="btnUpdateTimestamps" min="-2" max="-2" attributes="0"/>
- </Group>
- <Group type="102" alignment="1" attributes="0">
- <EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0">
- <Group type="102" alignment="0" attributes="1">
- <Component id="lblDeviceName1" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="32767" attributes="0"/>
- <Component id="txtIrodsPath" min="-2" pref="394" max="-2" attributes="0"/>
- </Group>
- <Group type="102" alignment="0" attributes="0">
- <Component id="lblDeviceName" min="-2" max="-2" attributes="0"/>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Component id="txtDeviceName" min="-2" pref="394" max="-2" attributes="0"/>
- </Group>
- </Group>
- <Group type="102" alignment="1" attributes="0">
- <Component id="lblDeviceName2" min="-2" max="-2" attributes="0"/>
- <EmptySpace pref="36" max="32767" attributes="0"/>
- <Group type="103" groupAlignment="0" max="-2" attributes="0">
- <Group type="102" alignment="0" attributes="1">
- <Component id="btnAdd" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="32767" attributes="0"/>
- <Component id="btnSynch" min="-2" max="-2" attributes="0"/>
- </Group>
- <Component id="localPath" alignment="0" min="-2" pref="394" max="-2" attributes="0"/>
- </Group>
- </Group>
- </Group>
- </Group>
- </Group>
- <EmptySpace min="-2" pref="279" max="-2" attributes="0"/>
- </Group>
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="67" max="-2" attributes="0"/>
- <Component id="jLabel1" min="-2" pref="604" max="-2" attributes="0"/>
- <EmptySpace pref="153" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="-2" pref="4" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="lblDeviceName" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="txtDeviceName" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="lblDeviceName1" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="txtIrodsPath" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="lblDeviceName2" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="localPath" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="btnAdd" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="btnSynch" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace type="unrelated" max="-2" attributes="0"/>
- <Component id="btnUpdateTimestamps" min="-2" max="-2" attributes="0"/>
- <EmptySpace pref="25" max="32767" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="lblDeviceName">
- <Properties>
- <Property name="text" type="java.lang.String" value="Device Name:"/>
- </Properties>
- </Component>
- <Component class="javax.swing.JTextField" name="txtDeviceName">
- </Component>
- <Component class="javax.swing.JLabel" name="lblDeviceName1">
- <Properties>
- <Property name="text" type="java.lang.String" value="iRODS Path:"/>
- </Properties>
- </Component>
- <Component class="javax.swing.JTextField" name="txtIrodsPath">
- </Component>
- <Component class="javax.swing.JLabel" name="lblDeviceName2">
- <Properties>
- <Property name="text" type="java.lang.String" value="Local Path:"/>
- </Properties>
- </Component>
- <Component class="javax.swing.JTextField" name="localPath">
- </Component>
- <Component class="javax.swing.JButton" name="btnAdd">
- <Properties>
- <Property name="text" type="java.lang.String" value="Add Device"/>
- </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="btnSynch">
- <Properties>
- <Property name="text" type="java.lang.String" value="Synch"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSynchActionPerformed"/>
- </Events>
- </Component>
- <Component class="javax.swing.JButton" name="btnUpdateTimestamps">
- <Properties>
- <Property name="text" type="java.lang.String" value="Update Timestamps"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnUpdateTimestampsActionPerformed"/>
- </Events>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel1">
- <Properties>
- <Property name="text" type="java.lang.String" value="Testing only....."/>
- </Properties>
- </Component>
- </SubComponents>
-</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java
deleted file mode 100644
index d90d2dd..0000000
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/SynchSetupDialog.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * SynchSetupDialog.java
- *
- * Created on Mar 22, 2011, 10:34:06 AM
- */
-package org.irods.jargon.idrop.desktop.systraygui;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.irods.jargon.core.exception.DuplicateDataException;
-import org.irods.jargon.core.exception.JargonException;
-import org.irods.jargon.core.pub.IRODSFileSystem;
-import org.irods.jargon.datautils.synchproperties.SynchPropertiesService;
-import org.irods.jargon.datautils.synchproperties.SynchPropertiesServiceImpl;
-import org.irods.jargon.datautils.tree.FileTreeDiffUtilityImpl;
-import org.irods.jargon.idrop.exceptions.IdropRuntimeException;
-import org.irods.jargon.transfer.synch.SynchronizeProcessor;
-import org.irods.jargon.transfer.synch.SynchronizeProcessorImpl;
-
-/**
- *
- * @author mikeconway
- */
-public class SynchSetupDialog extends javax.swing.JDialog {
-
- private final IDROPCore idropCore;
- private final IRODSFileSystem irodsFileSystem;
- private final SynchPropertiesService synchPropertiesService;
-
- /** Creates new form SynchSetupDialog */
- public SynchSetupDialog(final iDrop parent, final IDROPCore idropCore,
- final IRODSFileSystem irodsFileSystem) {
- super(parent, false);
- this.idropCore = idropCore;
- this.irodsFileSystem = irodsFileSystem;
- initComponents();
- try {
- synchPropertiesService = new SynchPropertiesServiceImpl(
- irodsFileSystem.getIRODSAccessObjectFactory(),
- idropCore.getIrodsAccount());
- } catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(
- Level.SEVERE, null, ex);
- throw new IdropRuntimeException(
- "unable to build synchPropertiesService", ex);
- }
- }
-
- /**
- * 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() {
-
- lblDeviceName = new javax.swing.JLabel();
- txtDeviceName = new javax.swing.JTextField();
- lblDeviceName1 = new javax.swing.JLabel();
- txtIrodsPath = new javax.swing.JTextField();
- lblDeviceName2 = new javax.swing.JLabel();
- localPath = new javax.swing.JTextField();
- btnAdd = new javax.swing.JButton();
- btnSynch = new javax.swing.JButton();
- btnUpdateTimestamps = new javax.swing.JButton();
- jLabel1 = new javax.swing.JLabel();
-
- setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-
- lblDeviceName.setText("Device Name:");
-
- lblDeviceName1.setText("iRODS Path:");
-
- lblDeviceName2.setText("Local Path:");
-
- btnAdd.setText("Add Device");
- btnAdd.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnAddActionPerformed(evt);
- }
- });
-
- btnSynch.setText("Synch");
- btnSynch.addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(final java.awt.event.ActionEvent evt) {
- btnSynchActionPerformed(evt);
- }
- });
-
- btnUpdateTimestamps.setText("Update Timestamps");
- btnUpdateTimestamps
- .addActionListener(new java.awt.event.ActionListener() {
- @Override
- public void actionPerformed(
- final java.awt.event.ActionEvent evt) {
- btnUpdateTimestampsActionPerformed(evt);
- }
- });
-
- jLabel1.setText("Testing only.....");
-
- org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(
- getContentPane());
- getContentPane().setLayout(layout);
- layout.setHorizontalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- layout.createSequentialGroup()
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.TRAILING)
- .add(layout.createSequentialGroup()
- .addContainerGap()
- .add(btnUpdateTimestamps))
- .add(layout
- .createSequentialGroup()
- .add(47, 47, 47)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING,
- false)
- .add(layout
- .createSequentialGroup()
- .add(lblDeviceName1)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)
- .add(txtIrodsPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(layout
- .createSequentialGroup()
- .add(lblDeviceName)
- .add(18,
- 18,
- 18)
- .add(txtDeviceName,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
- .add(org.jdesktop.layout.GroupLayout.TRAILING,
- layout.createSequentialGroup()
- .add(lblDeviceName2)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- 36,
- Short.MAX_VALUE)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.LEADING,
- false)
- .add(layout
- .createSequentialGroup()
- .add(btnAdd)
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- Short.MAX_VALUE)
- .add(btnSynch))
- .add(localPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 394,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))
- .add(279, 279, 279))
- .add(layout
- .createSequentialGroup()
- .add(67, 67, 67)
- .add(jLabel1,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- 604,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
- .addContainerGap(153, Short.MAX_VALUE)));
- layout.setVerticalGroup(layout
- .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(layout
- .createSequentialGroup()
- .add(jLabel1)
- .add(4, 4, 4)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName)
- .add(txtDeviceName,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName1)
- .add(txtIrodsPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.RELATED)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.BASELINE)
- .add(lblDeviceName2)
- .add(localPath,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE,
- org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
- org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(18, 18, 18)
- .add(layout
- .createParallelGroup(
- org.jdesktop.layout.GroupLayout.BASELINE)
- .add(btnAdd).add(btnSynch))
- .addPreferredGap(
- org.jdesktop.layout.LayoutStyle.UNRELATED)
- .add(btnUpdateTimestamps)
- .addContainerGap(25, Short.MAX_VALUE)));
-
- pack();
- }// </editor-fold>//GEN-END:initComponents
-
- private void btnAddActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnAddActionPerformed
- try {
- SynchPropertiesService synchPropertiesService = new SynchPropertiesServiceImpl(
- irodsFileSystem.getIRODSAccessObjectFactory(),
- idropCore.getIrodsAccount());
- synchPropertiesService.addSynchDeviceForUserAndIrodsAbsolutePath(
- idropCore.getIrodsAccount().getUserName(), txtDeviceName.getText().trim(), txtIrodsPath.getText().trim(),
- localPath.getText().trim());
- } catch (DuplicateDataException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(
- Level.SEVERE, null, ex);
- } catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(
- Level.SEVERE, null, ex);
- }
- }// GEN-LAST:event_btnAddActionPerformed
-
- private void btnSynchActionPerformed(final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnSynchActionPerformed
-
- try {
- SynchronizeProcessor synchProcessor = new SynchronizeProcessorImpl();
- synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(
- idropCore.getIrodsAccount(), irodsFileSystem.getIRODSAccessObjectFactory()));
- synchProcessor.setIrodsAccessObjectFactory(irodsFileSystem.getIRODSAccessObjectFactory());
- synchProcessor.setIrodsAccount(idropCore.getIrodsAccount());
- synchProcessor.setTransferManager(idropCore.getTransferManager());
- synchProcessor.setSynchPropertiesService(synchPropertiesService);
- // FIXME: refactor to not pass this stuff in, or alt method
- synchProcessor.synchronizeLocalToIRODS(txtDeviceName.getText().trim(), txtIrodsPath.getText().trim());
- } catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(
- Level.SEVERE, null, ex);
- } finally {
- irodsFileSystem.closeAndEatExceptions();
- }
-
- }// GEN-LAST:event_btnSynchActionPerformed
-
- private void btnUpdateTimestampsActionPerformed(
- final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnUpdateTimestampsActionPerformed
- try {
- SynchronizeProcessor synchProcessor = new SynchronizeProcessorImpl();
- synchProcessor.setFileTreeDiffUtility(new FileTreeDiffUtilityImpl(
- idropCore.getIrodsAccount(), irodsFileSystem.getIRODSAccessObjectFactory()));
- synchProcessor.setIrodsAccessObjectFactory(irodsFileSystem.getIRODSAccessObjectFactory());
- synchProcessor.setIrodsAccount(idropCore.getIrodsAccount());
- synchProcessor.setTransferManager(idropCore.getTransferManager());
- synchProcessor.setSynchPropertiesService(synchPropertiesService);
- synchProcessor.getTimestampsAndUpdateSynchDataInIRODS(idropCore.getIrodsAccount().getUserName(), txtDeviceName.getText().trim(), txtIrodsPath.getText().trim());
- } catch (JargonException ex) {
- Logger.getLogger(SynchSetupDialog.class.getName()).log(
- Level.SEVERE, null, ex);
- } finally {
- irodsFileSystem.closeAndEatExceptions();
- }
-
- }// GEN-LAST:event_btnUpdateTimestampsActionPerformed
- // Variables declaration - do not modify//GEN-BEGIN:variables
- private javax.swing.JButton btnAdd;
-
- private javax.swing.JButton btnSynch;
-
- private javax.swing.JButton btnUpdateTimestamps;
-
- private javax.swing.JLabel jLabel1;
-
- private javax.swing.JLabel lblDeviceName;
-
- private javax.swing.JLabel lblDeviceName1;
-
- private javax.swing.JLabel lblDeviceName2;
-
- private javax.swing.JTextField localPath;
-
- private javax.swing.JTextField txtDeviceName;
-
- private javax.swing.JTextField txtIrodsPath;
- // 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 9d82f6f..38ff277 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
@@ -174,6 +174,16 @@
</MenuItem>
</SubComponents>
</Menu>
+ <MenuItem class="javax.swing.JMenuItem" name="jMenuItemConfig">
+ <Properties>
+ <Property name="mnemonic" type="int" value="112"/>
+ <Property name="text" type="java.lang.String" value="Preferences"/>
+ <Property name="toolTipText" type="java.lang.String" value="Set preferences"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItemConfigActionPerformed"/>
+ </Events>
+ </MenuItem>
</SubComponents>
</Menu>
</SubComponents>
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 1edb1c4..8649127 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
@@ -55,7 +55,7 @@ import org.irods.jargon.core.pub.domain.DataObject;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.core.query.MetaDataAndDomainData.MetadataDomain;
import org.irods.jargon.core.transfer.TransferStatus;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationService;
import org.irods.jargon.idrop.desktop.systraygui.utils.IDropUtils;
import org.irods.jargon.idrop.desktop.systraygui.utils.IconHelper;
import org.irods.jargon.idrop.desktop.systraygui.utils.LocalFileUtils;
@@ -106,7 +106,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
private Object lastCachedInfoItem = null;
public DateFormat df = DateFormat.getDateInstance(DateFormat.LONG);
private ChangePasswordDialog changePasswordDialog = null;
- private SynchSetupDialog synchSetupDialog = null;
public static JDialog newPreferencesDialog;
public JCheckBox showGUICheckBox;
public JButton preferencesDialogOKButton;
@@ -192,7 +191,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
buildTargetTree();
}
// setting look and feel will also trigger build of irods tree view
- //setLookAndFeel(iDropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.LOOK_AND_FEEL));
+ //setLookAndFeel(iDropCore.getIdropConfig().getPropertyForKey(IDROPConfigurationService.LOOK_AND_FEEL));
setUpLocalFileSelectTree();
togglePauseTransfer.setSelected(pausedItem.getState());
iDropCore.getIconManager().setRunningStatus(
@@ -400,8 +399,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
MenuItem iDropItem = new MenuItem("iDrop");
MenuItem preferencesItem = new MenuItem("Preferences");
MenuItem changePasswordItem = new MenuItem("Change Password");
- MenuItem synchItem = new MenuItem("Synch");
-
+
iDropItem.addActionListener(this);
MenuItem currentItem = new MenuItem("Show Current and Past Activity");
@@ -415,7 +413,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
exitItem.addActionListener(this);
currentItem.addActionListener(this);
preferencesItem.addActionListener(this);
- synchItem.addActionListener(this);
changePasswordItem.addActionListener(this);
/*
@@ -435,7 +432,6 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
popup.add(iDropItem);
popup.add(preferencesItem);
popup.add(changePasswordItem);
- popup.add(synchItem);
popup.addSeparator();
popup.add(currentItem);
popup.addSeparator();
@@ -525,19 +521,16 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
aboutDialog.setLocation(x, y);
aboutDialog.setVisible(true);
} else if (e.getActionCommand().equals("Preferences")) {
- showGUICheckBox.setSelected(getiDropCore().getIdropConfig().isShowGuiAtStartup());
- newPreferencesDialog.setVisible(true);
- } else if (e.getActionCommand().equals("Synch")) {
- synchSetupDialog = new SynchSetupDialog(this, getiDropCore(),
- getiDropCore().getIrodsFileSystem());
- synchSetupDialog.setVisible(true);
+ IDROPConfigurationPanel idropConfigurationPanel = new IDROPConfigurationPanel(this, true, iDropCore);
+ idropConfigurationPanel.setLocationRelativeTo(null);
+ idropConfigurationPanel.setVisible(true);
} else if (e.getActionCommand().equals("Change Password")) {
if (changePasswordDialog == null) {
changePasswordDialog = new ChangePasswordDialog(this, true);
int x = (toolkit.getScreenSize().width - changePasswordDialog.getWidth()) / 2;
int y = (toolkit.getScreenSize().height - changePasswordDialog.getHeight()) / 2;
- changePasswordDialog.setLocation(x, y);
+ changePasswordDialog.setLocation(x, y);
}
changePasswordDialog.setVisible(true);
@@ -1226,6 +1219,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
jRadioButtonMenuItemMetal = new javax.swing.JRadioButtonMenuItem();
jRadioButtonMenuItemMotif = new javax.swing.JRadioButtonMenuItem();
jRadioButtonMenuItemGTK = new javax.swing.JRadioButtonMenuItem();
+ jMenuItemConfig = new javax.swing.JMenuItem();
menuItemShowInHierarchy.setText("Show in iRODS");
menuItemShowInHierarchy.setToolTipText("Show this file or collection in the iRODS hierarchy");
@@ -1945,6 +1939,16 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
jMenuTools.add(jMenuLookAndFeel);
+ jMenuItemConfig.setMnemonic('p');
+ jMenuItemConfig.setText("Preferences");
+ jMenuItemConfig.setToolTipText("Set preferences");
+ jMenuItemConfig.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ jMenuItemConfigActionPerformed(evt);
+ }
+ });
+ jMenuTools.add(jMenuItemConfig);
+
jMenuBar1.add(jMenuTools);
setJMenuBar(jMenuBar1);
@@ -1991,6 +1995,12 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
}
}//GEN-LAST:event_jRadioButtonMenuItemMotifActionPerformed
+ private void jMenuItemConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemConfigActionPerformed
+ IDROPConfigurationPanel idropConfigurationPanel = new IDROPConfigurationPanel(this, true, iDropCore);
+ idropConfigurationPanel.setLocationRelativeTo(null);
+ idropConfigurationPanel.setVisible(true);
+ }//GEN-LAST:event_jMenuItemConfigActionPerformed
+
private void btnShowTransferManagerActionPerformed(
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnShowTransferManagerActionPerformed
@@ -2430,6 +2440,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
private javax.swing.JMenu jMenuEdit;
private javax.swing.JMenu jMenuFile;
private javax.swing.JMenuItem jMenuItemClose;
+ private javax.swing.JMenuItem jMenuItemConfig;
private javax.swing.JMenuItem jMenuItemExit;
private javax.swing.JMenu jMenuLookAndFeel;
private javax.swing.JMenu jMenuTools;
@@ -2616,7 +2627,7 @@ public class iDrop extends javax.swing.JFrame implements ActionListener,
}
private void initializeLookAndFeelSelected() {
- String lookAndFeelChoice = iDropCore.getIdropConfig().getPropertyForKey(IdropConfigurationService.LOOK_AND_FEEL);
+ String lookAndFeelChoice = iDropCore.getIdropConfig().getPropertyForKey(IDROPConfigurationService.LOOK_AND_FEEL);
if (lookAndFeelChoice == null || lookAndFeelChoice.isEmpty()) {
lookAndFeelChoice = "System";
}
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 ad13d69..3a2936e 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,3 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package org.irods.jargon.idrop.desktop.systraygui.services;
import java.util.Properties;
@@ -15,7 +11,7 @@ import org.irods.jargon.transfer.engine.synch.ConflictingSynchException;
*
* @author mikeconway
*/
-public interface IdropConfigurationService {
+public interface IDROPConfigurationService {
public static final String IDROP_PROPS_FILE_NAME = "idrop.properties";
public static final String FORCE_MODE = "force.mode";
@@ -33,6 +29,7 @@ public interface IdropConfigurationService {
public static final String ACCOUNT_CACHE_ROOT_DIR = "irods.account.root.dir";
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";
Properties bootstrapConfiguration() throws IdropException;
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 daae8df..99e9b52 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
@@ -31,14 +31,14 @@ import org.slf4j.LoggerFactory;
*
* @author Mike Conway - DICE (www.irods.org)
*/
-public class IdropConfigurationServiceImpl implements IdropConfigurationService {
+public class IDROPConfigurationServiceImpl implements IDROPConfigurationService {
private final String idropConfigRootDirectoryAbsolutePath;
private final ConfigurationService configurationService;
private final IDROPCore idropCore;
- private static final org.slf4j.Logger log = LoggerFactory.getLogger(IdropConfigurationServiceImpl.class);
+ private static final org.slf4j.Logger log = LoggerFactory.getLogger(IDROPConfigurationServiceImpl.class);
- public IdropConfigurationServiceImpl(
+ public IDROPConfigurationServiceImpl(
final String idropConfigRootDirectoryAbsolutePath,
final IDROPCore idropCore) throws IdropAlreadyRunningException,
IdropException {
@@ -61,7 +61,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
this.configurationService = transferServiceFactory.instanceConfigurationService();
} catch (Exception ex) {
- Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IDROPConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getMessage().indexOf("Failed to start database") != -1) {
throw new IdropAlreadyRunningException(
@@ -82,7 +82,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
configFileProperties = this.importPropertiesFromDefaultFile();
} catch (Exception ex) {
- Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IDROPConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
if (ex.getMessage().indexOf("Could not open Hibernate Session") != -1) {
throw new IdropAlreadyRunningException(
"iDrop is already running, or the iDrop database is in use");
@@ -156,10 +156,10 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
Properties databaseProperties = configurationService.exportProperties();
databaseProperties.store(new FileOutputStream(sb.toString()), null);
} catch (TransferEngineException ex) {
- Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IDROPConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
throw new IdropException("exception exporting final properties", ex);
} catch (IOException ioe) {
- Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ioe);
+ Logger.getLogger(IDROPConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ioe);
throw new IdropException(
"exception storing final properties in file", ioe);
}
@@ -199,7 +199,7 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
try {
configurationService.importProperties(properties);
} catch (TransferEngineException ex) {
- Logger.getLogger(IdropConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
+ Logger.getLogger(IDROPConfigurationServiceImpl.class.getName()).log(Level.SEVERE, null, ex);
throw new IdropException(
"unable to import properties into database", ex);
}
@@ -222,12 +222,12 @@ public class IdropConfigurationServiceImpl implements IdropConfigurationService
}
log.info("saving irodsAccount:{}", irodsAccount);
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_HOST, irodsAccount.getHost());
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_PORT, String.valueOf(irodsAccount.getPort()));
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_RESOURCE, irodsAccount.getDefaultStorageResource());
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_ROOT_DIR, irodsAccount.getHomeDirectory());
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_ZONE, irodsAccount.getZone());
- updateConfig(IdropConfigurationService.ACCOUNT_CACHE_USER_NAME, irodsAccount.getUserName());
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_HOST, irodsAccount.getHost());
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_PORT, String.valueOf(irodsAccount.getPort()));
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_RESOURCE, irodsAccount.getDefaultStorageResource());
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_ROOT_DIR, irodsAccount.getHomeDirectory());
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_ZONE, irodsAccount.getZone());
+ updateConfig(IDROPConfigurationService.ACCOUNT_CACHE_USER_NAME, irodsAccount.getUserName());
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 a316ee6..b0074c2 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
@@ -6,19 +6,19 @@ import java.util.Properties;
import org.apache.log4j.Level;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.RollingFileAppender;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
+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}.
+ * 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.
+ * 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 {
+public class IDROPConfig {
private final Properties idropProperties;
@@ -53,7 +53,7 @@ public class IdropConfig {
*
* @param properties
*/
- public IdropConfig(final Properties properties) {
+ public IDROPConfig(final Properties properties) {
if (properties == null) {
throw new IllegalArgumentException("null properties");
}
@@ -68,7 +68,7 @@ public class IdropConfig {
*/
public boolean isPolicyAware() {
boolean policyAware = false;
- String policyAwareValue = idropProperties.getProperty(IdropConfigurationService.POLICY_AWARE_PROPERTY);
+ String policyAwareValue = idropProperties.getProperty(IDROPConfigurationService.POLICY_AWARE_PROPERTY);
if (policyAwareValue != null && policyAwareValue.equals("true")) {
policyAware = true;
@@ -130,7 +130,7 @@ public class IdropConfig {
*/
public boolean isLogSuccessfulTransfers() {
boolean logSuccessful = false;
- String logSuccessfulTransfers = idropProperties.getProperty(IdropPropertiesHelper.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
+ String logSuccessfulTransfers = idropProperties.getProperty(IDROPConfigurationService.TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES);
if (logSuccessfulTransfers != null
&& logSuccessfulTransfers.equals("true")) {
@@ -147,12 +147,12 @@ public class IdropConfig {
* @return
*/
public String getSynchDeviceName() {
- return idropProperties.getProperty(IdropConfigurationService.DEVICE_NAME);
+ return idropProperties.getProperty(IDROPConfigurationService.DEVICE_NAME);
}
public boolean isShowStartupWizard() {
boolean showWizard = false;
- String showStartup = idropProperties.getProperty(IdropConfigurationService.SHOW_STARTUP);
+ String showStartup = idropProperties.getProperty(IDROPConfigurationService.SHOW_STARTUP);
if (showStartup != null && showStartup.equals("true")) {
showWizard = true;
@@ -215,7 +215,7 @@ public class IdropConfig {
public boolean isShowGuiAtStartup() {
boolean propBoolean = false;
- String propString = idropProperties.getProperty(IdropConfigurationService.SHOW_GUI);
+ String propString = idropProperties.getProperty(IDROPConfigurationService.SHOW_GUI);
if (propString != null && propString.equals("true")) {
propBoolean = true;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
index df629fc..7e0a3f5 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/IdropPropertiesHelper.java
@@ -19,7 +19,7 @@ public class IdropPropertiesHelper {
public static final String LOGIN_PRESET_PORT = "login.preset.port";
public static final String LOGIN_PRESET_ZONE = "login.preset.zone";
public static final String LOGIN_PRESET_RESOURCE = "login.preset.resource";
- public static final String TRANSFER_ENGINE_RECORD_SUCCESSFUL_FILES = "transferengine.record.successful.files";
+
public static final String ADVANCED_VIEW_PROPERTY = "advanced.view";
public static final String TRANSFER_DATABASE_NAME = "transfer.database";
public static final String ROLLING_LOG_LEVEL = "rolling.log.level";
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LookAndFeelManager.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LookAndFeelManager.java
index ccf3a74..5826766 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LookAndFeelManager.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/utils/LookAndFeelManager.java
@@ -7,7 +7,7 @@ package org.irods.jargon.idrop.desktop.systraygui.utils;
import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import org.irods.jargon.idrop.desktop.systraygui.IDROPCore;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
+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.slf4j.LoggerFactory;
@@ -43,7 +43,7 @@ public class LookAndFeelManager {
if (lookAndFeelChoice != null) {
try {
- idropCore.getIdropConfigurationService().updateConfig(IdropConfigurationService.LOOK_AND_FEEL, lookAndFeelChoice);
+ idropCore.getIdropConfigurationService().updateConfig(IDROPConfigurationService.LOOK_AND_FEEL, lookAndFeelChoice);
} catch (IdropException ex) {
log.error("unable to update configration for look and feel");
throw new IdropRuntimeException("unable to set prop for look and feel", ex);
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
index 847e217..c4cd88c 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/SetupWizard.java
@@ -16,7 +16,7 @@ import javax.swing.event.ChangeListener;
import org.irods.jargon.idrop.desktop.systraygui.IDROPCore;
import org.irods.jargon.idrop.desktop.systraygui.MessageManager;
import org.irods.jargon.idrop.desktop.systraygui.iDrop;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationService;
+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.idrop.finder.IRODSFinderDialog;
@@ -36,7 +36,7 @@ import org.slf4j.LoggerFactory;
public class SetupWizard extends javax.swing.JDialog {
private final IDROPCore idropCore;
- private final IdropConfigurationService idropConfigurationService;
+ private final IDROPConfigurationService idropConfigurationService;
private static final org.slf4j.Logger log = LoggerFactory.getLogger(SetupWizard.class);
public final String SETUP_ERROR_TITLE = "iDrop - Setup";
private int tabStep = 0;
@@ -361,7 +361,7 @@ public class SetupWizard extends javax.swing.JDialog {
private void saveSeeSystemTrayYas() throws IdropRuntimeException {
log.info("indicates system try shown, set to not load gui");
try {
- idropConfigurationService.updateConfig(IdropConfigurationService.SHOW_GUI, "false");
+ idropConfigurationService.updateConfig(IDROPConfigurationService.SHOW_GUI, "false");
log.info("config is updated");
} catch (IdropException ex) {
log.error("error updating configuration", ex);
@@ -377,7 +377,7 @@ public class SetupWizard extends javax.swing.JDialog {
return;
}
try {
- idropConfigurationService.updateConfig(IdropConfigurationService.DEVICE_NAME, txtDeviceName.getText());
+ idropConfigurationService.updateConfig(IDROPConfigurationService.DEVICE_NAME, txtDeviceName.getText());
log.info("device name is set to:{}", txtDeviceName.getText());
// FIXME: check name in iRODS
} catch (IdropException ex) {
@@ -397,9 +397,9 @@ public class SetupWizard extends javax.swing.JDialog {
private void btnLaterActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLaterActionPerformed
log.info("indicates system try not shown, set to always load gui");
try {
- idropConfigurationService.updateConfig(IdropConfigurationService.SHOW_GUI, "true");
+ idropConfigurationService.updateConfig(IDROPConfigurationService.SHOW_GUI, "true");
log.info("clearing device name to force wizard next time");
- idropConfigurationService.removeConfigProperty(IdropConfigurationService.DEVICE_NAME);
+ idropConfigurationService.removeConfigProperty(IDROPConfigurationService.DEVICE_NAME);
log.info("config is updated");
} catch (IdropException ex) {
log.error("error updating configuration", ex);
@@ -467,7 +467,7 @@ public class SetupWizard extends javax.swing.JDialog {
final java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnSeeSystemTrayNoActionPerformed
log.info("indicates system try not shown, set to always load gui");
try {
- idropConfigurationService.updateConfig(IdropConfigurationService.SHOW_GUI, "true");
+ idropConfigurationService.updateConfig(IDROPConfigurationService.SHOW_GUI, "true");
log.info("config is updated");
} catch (IdropException ex) {
log.error("error updating configuration", ex);
@@ -585,8 +585,7 @@ public class SetupWizard extends javax.swing.JDialog {
MessageManager.showError(this, ex.getMessage(), SETUP_ERROR_TITLE);
} catch (ConflictingSynchException ex) {
MessageManager.showError(this, ex.getMessage(), SETUP_ERROR_TITLE);
- }
-
+ }
}
}
}
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
new file mode 100644
index 0000000..966e70a
--- /dev/null
+++ b/idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties
@@ -0,0 +1,11 @@
+IDROPConfigurationPanel.title=iDrop - Preferences
+IDROPConfigurationPanel.btnOK.text=OK
+IDROPConfigurationPanel.btnOK.toolTipText=Close configuration panel
+IDROPConfigurationPanel.pnlConfigIdrop.TabConstraints.tabTitle=iDrop
+IDROPConfigurationPanel.pnlConfigTransfers.TabConstraints.tabTitle=Transfers
+IDROPConfigurationPanel.pnlConfigSynch.TabConstraints.tabTitle=Synchronization
+IDROPConfigurationPanel.pnlConfigGrids.TabConstraints.tabTitle=Grids
+IDROPConfigurationPanel.checkShowGUI.text=Show iDrop GUI at Startup
+IDROPConfigurationPanel.checkShowGUI.toolTipText=Show the gui at startup or just start in system tray
+IDROPConfigurationPanel.checkLogSuccessfulTransfer.text=Log successful transfers file by file
+IDROPConfigurationPanel.checkLogSuccessfulTransfer.toolTipText=Log each file in a transfer, can have performance impact
diff --git a/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java b/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java
index 5ea8333..3b6da35 100644
--- a/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java
+++ b/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/systraygui/services/IdropConfigurationServiceImplTest.java
@@ -1,13 +1,8 @@
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
package org.irods.jargon.idrop.desktop.systraygui.services;
import java.util.Properties;
-
+
import junit.framework.Assert;
-import junit.framework.TestCase;
import org.irods.jargon.idrop.desktop.systraygui.IDROPCore;
import org.irods.jargon.testutils.TestingPropertiesHelper;
import org.irods.jargon.testutils.filemanip.ScratchFileUtils;
@@ -18,21 +13,22 @@ import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
-
+
/**
- *
+ *
* @author mikeconway
*/
-public class IdropConfigurationServiceImplTest {
+public class IDROPConfigurationServiceImplTest {
- private static IdropConfigurationService idropConfigurationService;
private static ConfigurationService configurationService;
private static Properties testingProperties = new Properties();
private static TestingPropertiesHelper testingPropertiesHelper = new TestingPropertiesHelper();
private static ScratchFileUtils scratchFileUtils = null;
private static final String TESTING_SUBDIR = "IdropConfigurationServiceImplTest";
+ private static IDROPConfigurationService idropConfigurationService;
+
- public IdropConfigurationServiceImplTest() {
+ public IDROPConfigurationServiceImplTest() {
}
@BeforeClass
@@ -41,11 +37,11 @@ public class IdropConfigurationServiceImplTest {
testingProperties = testingPropertiesLoader.getTestProperties();
scratchFileUtils = new ScratchFileUtils(testingProperties);
scratchFileUtils.clearAndReinitializeScratchDirectory(TESTING_SUBDIR);
- idropConfigurationService = new IdropConfigurationServiceImpl(scratchFileUtils.createAndReturnAbsoluteScratchPath(TESTING_SUBDIR), new IDROPCore());
+ idropConfigurationService = new IDROPConfigurationServiceImpl(scratchFileUtils.createAndReturnAbsoluteScratchPath(TESTING_SUBDIR), new IDROPCore());
TransferServiceFactoryImpl transferServiceFactory = new TransferServiceFactoryImpl();
configurationService = transferServiceFactory.instanceConfigurationService();
}
-
+
@AfterClass
public static void tearDownClass() throws Exception {
}
diff --git a/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/unittest/AllTests.java b/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/unittest/AllTests.java
index 66dd3cb..e6ca994 100644
--- a/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/unittest/AllTests.java
+++ b/idrop-swing/src/test/java/org/irods/jargon/idrop/desktop/unittest/AllTests.java
@@ -4,7 +4,7 @@
*/
package org.irods.jargon.idrop.desktop.unittest;
-import org.irods.jargon.idrop.desktop.systraygui.services.IdropConfigurationServiceImplTest;
+import org.irods.jargon.idrop.desktop.systraygui.services.IDROPConfigurationServiceImplTest;
import org.irods.jargon.idrop.desktop.systraygui.utils.IdropPropertiesHelperTest;
import org.irods.jargon.idrop.desktop.systraygui.utils.LocalFileUtilsTest;
import org.irods.jargon.idrop.desktop.systraygui.viscomponents.FileSystemModelTest;
@@ -20,7 +20,7 @@ import org.junit.runners.Suite;
@Suite.SuiteClasses({ IdropPropertiesHelperTest.class, LocalFileUtilsTest.class,
FileSystemModelTest.class, IRODSSearchTableModelTest.class,
LocalFileSystemModelTest.class, MetadataTableModelTest.class,
- QueueManagerDetailTableModelTest.class, QueueManagerMasterTableModelTest.class, IdropConfigurationServiceImplTest.class
+ QueueManagerDetailTableModelTest.class, QueueManagerMasterTableModelTest.class, IDROPConfigurationServiceImplTest.class
})
public class AllTests {