summaryrefslogtreecommitdiffstats
path: root/idrop-swing
diff options
context:
space:
mode:
authorLisa Stillwell <lisa@renci.org>2013-01-16 21:39:07 (GMT)
committer Lisa Stillwell <lisa@renci.org>2013-01-16 21:39:07 (GMT)
commit687a70e1c30e09d9652fac73165b96646802e7fb (patch)
tree24339f71ffd29a79eea0c88a9dc988cea2afff47 /idrop-swing
parent4b1b951f536055b500718065fa6578edc60c5ad6 (diff)
downloadQCG-Data-687a70e1c30e09d9652fac73165b96646802e7fb.zip
QCG-Data-687a70e1c30e09d9652fac73165b96646802e7fb.tar.gz
QCG-Data-687a70e1c30e09d9652fac73165b96646802e7fb.tar.bz2
[#983] updated design of Info dialog permissions tab as suggested in 1/15/13 iPlant call
Diffstat (limited to 'idrop-swing')
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form194
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.java218
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.form209
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.java406
-rw-r--r--idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/PermissionsTableModel.java63
-rw-r--r--idrop-swing/src/main/resources/org/irods/jargon/idrop/desktop/systraygui/Bundle.properties15
6 files changed, 736 insertions, 369 deletions
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
new file mode 100644
index 0000000..097ab59
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.form
@@ -0,0 +1,194 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" 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="AddPermissionsDialog.title" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+ <Color blue="ff" green="ff" id="white" palette="1" red="ff" type="palette"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[460, 180]"/>
+ </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,0,-100,0,0,1,-44"/>
+ </AuxValues>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlMain">
+ <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.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="pnlPermissionEdit">
+ <Properties>
+ <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 bottom="20" left="8" right="8" top="16"/>
+ </Border>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[527, 200]"/>
+ </Property>
+ </Properties>
+ <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.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel3">
+ <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 class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel31">
+ <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="AddPermissionsDialog.jLabel31.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[120, 16]"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="cbPermissionsUserName">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[60, 27]"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[260, 27]"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="jPanel4">
+ <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"/>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel32">
+ <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="AddPermissionsDialog.jLabel32.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[120, 16]"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="cbPermissionsPermission">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[260, 27]"/>
+ </Property>
+ </Properties>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ <Container class="javax.swing.JPanel" name="jPanel1">
+ <Properties>
+ <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 bottom="6" left="1" right="1" top="1"/>
+ </Border>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[525, 40]"/>
+ </Property>
+ </Properties>
+ <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.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel2">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[200, 34]"/>
+ </Property>
+ <Property name="requestFocusEnabled" type="boolean" value="false"/>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="East"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnPermissionsCancel">
+ <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="AddPermissionsDialog.btnPermissionsCancel.text" 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="btnPermissionsCancelActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnPermissionsAdd">
+ <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="AddPermissionsDialog.btnPermissionsAdd.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="AddPermissionsDialog.btnPermissionsAdd.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="enabled" type="boolean" value="false"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPermissionsAddActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+</Form>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.java
new file mode 100644
index 0000000..c40d397
--- /dev/null
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/AddPermissionsDialog.java
@@ -0,0 +1,218 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.irods.jargon.idrop.desktop.systraygui;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.util.List;
+import org.irods.jargon.core.connection.IRODSAccount;
+import org.irods.jargon.core.exception.JargonException;
+import org.irods.jargon.core.protovalues.FilePermissionEnum;
+import org.irods.jargon.core.pub.IRODSFileSystem;
+import org.irods.jargon.core.pub.UserAO;
+import org.irods.jargon.core.pub.domain.User;
+import org.irods.jargon.core.pub.domain.UserFilePermission;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lisa
+ */
+public class AddPermissionsDialog extends javax.swing.JDialog implements ActionListener {
+
+ IRODSFileSystem irodsFileSystem;
+ IRODSAccount irodsAccount;
+ boolean isCollection;
+ UserFilePermission permissionToAdd = null;
+
+ /**
+ * Creates new form AddPermissionsDialog
+ */
+ public AddPermissionsDialog(javax.swing.JDialog parent,
+ boolean modal,
+ IRODSFileSystem irodsFileSystem,
+ IRODSAccount irodsAccount) {
+ super(parent, modal);
+ initComponents();
+
+ this.irodsFileSystem = irodsFileSystem;
+ this.irodsAccount = irodsAccount;
+
+
+ cbPermissionsPermission.addItem("READ");
+ cbPermissionsPermission.addItem("WRITE");
+ cbPermissionsPermission.addItem("OWN");
+
+ List<User> users = null;
+ try {
+ UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
+ users = userAO.findAll();
+ for (User user: users) {
+ cbPermissionsUserName.addItem(user.getNameWithZone());
+ }
+ } catch (JargonException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+ cbPermissionsPermission.addActionListener(this);
+ cbPermissionsUserName.addActionListener(this);
+
+ updateAddButtonStatus();
+ }
+
+ private void updateAddButtonStatus() {
+ btnPermissionsAdd.setEnabled((cbPermissionsUserName.getSelectedIndex() >= 0) &&
+ (cbPermissionsPermission.getSelectedIndex() >= 0));
+ }
+
+ public UserFilePermission getPermissionToAdd() {
+ return this.permissionToAdd;
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent ae) {
+ updateAddButtonStatus();
+ }
+
+ /**
+ * 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() {
+
+ pnlMain = new javax.swing.JPanel();
+ pnlPermissionEdit = new javax.swing.JPanel();
+ jPanel3 = new javax.swing.JPanel();
+ jLabel31 = new javax.swing.JLabel();
+ cbPermissionsUserName = new javax.swing.JComboBox();
+ jPanel4 = new javax.swing.JPanel();
+ jLabel32 = new javax.swing.JLabel();
+ cbPermissionsPermission = new javax.swing.JComboBox();
+ jPanel1 = new javax.swing.JPanel();
+ jPanel2 = new javax.swing.JPanel();
+ btnPermissionsCancel = new javax.swing.JButton();
+ btnPermissionsAdd = new javax.swing.JButton();
+
+ setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+ setTitle(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.title")); // NOI18N
+ setBackground(java.awt.Color.white);
+ setPreferredSize(new java.awt.Dimension(460, 180));
+
+ pnlMain.setLayout(new java.awt.BorderLayout());
+
+ pnlPermissionEdit.setBorder(javax.swing.BorderFactory.createEmptyBorder(16, 8, 20, 8));
+ pnlPermissionEdit.setPreferredSize(new java.awt.Dimension(527, 200));
+ pnlPermissionEdit.setLayout(new java.awt.BorderLayout());
+
+ jLabel31.setText(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.jLabel31.text")); // NOI18N
+ jLabel31.setPreferredSize(new java.awt.Dimension(120, 16));
+ jPanel3.add(jLabel31);
+
+ cbPermissionsUserName.setMinimumSize(new java.awt.Dimension(60, 27));
+ cbPermissionsUserName.setPreferredSize(new java.awt.Dimension(260, 27));
+ jPanel3.add(cbPermissionsUserName);
+
+ pnlPermissionEdit.add(jPanel3, java.awt.BorderLayout.NORTH);
+
+ jLabel32.setText(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.jLabel32.text")); // NOI18N
+ jLabel32.setPreferredSize(new java.awt.Dimension(120, 16));
+ jPanel4.add(jLabel32);
+
+ cbPermissionsPermission.setPreferredSize(new java.awt.Dimension(260, 27));
+ jPanel4.add(cbPermissionsPermission);
+
+ pnlPermissionEdit.add(jPanel4, java.awt.BorderLayout.SOUTH);
+
+ pnlMain.add(pnlPermissionEdit, java.awt.BorderLayout.CENTER);
+
+ jPanel1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 6, 1));
+ jPanel1.setPreferredSize(new java.awt.Dimension(525, 40));
+ jPanel1.setLayout(new java.awt.BorderLayout());
+
+ jPanel2.setPreferredSize(new java.awt.Dimension(200, 34));
+ jPanel2.setRequestFocusEnabled(false);
+
+ btnPermissionsCancel.setText(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.btnPermissionsCancel.text")); // NOI18N
+ btnPermissionsCancel.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnPermissionsCancelActionPerformed(evt);
+ }
+ });
+ jPanel2.add(btnPermissionsCancel);
+
+ btnPermissionsAdd.setText(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.btnPermissionsAdd.text")); // NOI18N
+ btnPermissionsAdd.setActionCommand(org.openide.util.NbBundle.getMessage(AddPermissionsDialog.class, "AddPermissionsDialog.btnPermissionsAdd.actionCommand")); // NOI18N
+ btnPermissionsAdd.setEnabled(false);
+ btnPermissionsAdd.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnPermissionsAddActionPerformed(evt);
+ }
+ });
+ jPanel2.add(btnPermissionsAdd);
+
+ jPanel1.add(jPanel2, java.awt.BorderLayout.EAST);
+
+ pnlMain.add(jPanel1, java.awt.BorderLayout.SOUTH);
+
+ getContentPane().add(pnlMain, java.awt.BorderLayout.CENTER);
+
+ pack();
+ }// </editor-fold>//GEN-END:initComponents
+
+ private void btnPermissionsAddActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPermissionsAddActionPerformed
+
+ String selectedPermission = (String)cbPermissionsPermission.getSelectedItem();
+ String tmpSelectedUser = (String)cbPermissionsUserName.getSelectedItem();
+ String selectedUser = null;
+
+ // probably have to remve #zone from user name
+ int idx = tmpSelectedUser.indexOf("#");
+ if (idx >= 0) {
+ selectedUser = tmpSelectedUser.substring(0, idx);
+ }
+ else {
+ selectedUser = tmpSelectedUser;
+ }
+
+ try {
+ UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
+ User user = userAO.findByName(tmpSelectedUser);
+
+ permissionToAdd = new UserFilePermission(
+ selectedUser,
+ user.getId(),
+ FilePermissionEnum.valueOf(selectedPermission),
+ user.getUserType(),
+ user.getZone());
+ } catch (JargonException ex) {
+ Exceptions.printStackTrace(ex);
+ }
+
+ this.setVisible(false);
+ }//GEN-LAST:event_btnPermissionsAddActionPerformed
+
+ private void btnPermissionsCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPermissionsCancelActionPerformed
+ this.dispose();
+ }//GEN-LAST:event_btnPermissionsCancelActionPerformed
+
+
+ // Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnPermissionsAdd;
+ private javax.swing.JButton btnPermissionsCancel;
+ private javax.swing.JComboBox cbPermissionsPermission;
+ private javax.swing.JComboBox cbPermissionsUserName;
+ private javax.swing.JLabel jLabel31;
+ private javax.swing.JLabel jLabel32;
+ private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel2;
+ private javax.swing.JPanel jPanel3;
+ private javax.swing.JPanel jPanel4;
+ private javax.swing.JPanel pnlMain;
+ private javax.swing.JPanel pnlPermissionEdit;
+ // End of variables declaration//GEN-END:variables
+
+}
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.form b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.form
index a0d2fe3..6a4a44b 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.form
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.form
@@ -1210,12 +1210,7 @@
<Data value="null"/>
<Data value="null"/>
</Column>
- <Column editable="false" title="Share Permission" type="java.lang.String">
- <Data value=""/>
- <Data value="null"/>
- <Data value="null"/>
- <Data value="null"/>
- </Column>
+ <Column editable="true" title="Share Permission" type="java.lang.Object"/>
</Table>
</Property>
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
@@ -1259,161 +1254,101 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="100" max="32767" attributes="0"/>
- <Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
- <Component id="btnPermissionsDelete" min="-2" max="-2" attributes="0"/>
- <EmptySpace pref="8" max="32767" attributes="0"/>
- </Group>
+ <Group type="102" alignment="1" attributes="0">
+ <EmptySpace pref="19" max="32767" attributes="0"/>
+ <Component id="btnPermissionsSave" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
- <EmptySpace min="0" pref="42" max="32767" attributes="0"/>
- <Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="7" max="-2" attributes="0"/>
- <Component id="btnPermissionsDelete" min="-2" max="-2" attributes="0"/>
- <EmptySpace max="32767" attributes="0"/>
- </Group>
+ <Group type="102" alignment="1" attributes="0">
+ <EmptySpace max="32767" attributes="0"/>
+ <Component id="btnPermissionsSave" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
- <Component class="javax.swing.JButton" name="btnPermissionsDelete">
+ <Component class="javax.swing.JButton" name="btnPermissionsSave">
<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="IRODSInfoDialog.btnPermissionsDelete.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IRODSInfoDialog.btnPermissionsSave.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="actionCommand" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/irods/jargon/idrop/desktop/systraygui/Bundle.properties" key="IRODSInfoDialog.btnPermissionsSave.actionCommand" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="enabled" type="boolean" value="false"/>
</Properties>
<Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPermissionsDeleteActionPerformed"/>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPermissionsSaveActionPerformed"/>
</Events>
</Component>
</SubComponents>
</Container>
+ <Container class="javax.swing.JPanel" name="jPanel9">
+ <Properties>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[100, 25]"/>
+ </Property>
+ </Properties>
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="West"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
+ <SubComponents>
+ <Container class="javax.swing.JPanel" name="jPanel16">
+ <Constraints>
+ <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
+ <BorderConstraints direction="West"/>
+ </Constraint>
+ </Constraints>
+
+ <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout">
+ <Property name="horizontalGap" type="int" value="1"/>
+ <Property name="verticalGap" type="int" value="1"/>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JButton" name="btnAddSharePermissions">
+ <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="IRODSInfoDialog.btnAddSharePermissions.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[22, 24]"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAddSharePermissionsActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="btnDeleteSharePermissions">
+ <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="IRODSInfoDialog.btnDeleteSharePermissions.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
+ </Property>
+ <Property name="enabled" type="boolean" value="false"/>
+ <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+ <Dimension value="[22, 24]"/>
+ </Property>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnDeleteSharePermissionsActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+ </Container>
+ </SubComponents>
+ </Container>
</SubComponents>
</Container>
</SubComponents>
</Container>
- <Container class="javax.swing.JPanel" name="pnlPermissionEdit">
- <Properties>
- <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
- <Border info="org.netbeans.modules.form.compat2.border.EtchedBorderInfo">
- <EtchetBorder/>
- </Border>
- </Property>
- <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
- <Dimension value="[527, 200]"/>
- </Property>
- </Properties>
- <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>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" attributes="0">
- <EmptySpace min="-2" pref="45" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="0" attributes="0">
- <Component id="jLabel31" alignment="0" min="-2" max="-2" attributes="0"/>
- <Component id="jLabel32" alignment="0" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace min="-2" pref="32" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="0" max="-2" attributes="0">
- <Component id="cbPermissionsUserName" max="32767" attributes="0"/>
- <Component id="cbPermissionsPermission" pref="280" max="32767" attributes="0"/>
- </Group>
- <EmptySpace pref="96" max="32767" attributes="0"/>
- </Group>
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace max="32767" attributes="0"/>
- <Component id="btnPermissionsClear" min="-2" max="-2" attributes="0"/>
- <EmptySpace type="separate" max="-2" attributes="0"/>
- <Component id="btnPermissionsCreate" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="-2" pref="19" max="-2" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="45" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel31" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="cbPermissionsUserName" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace min="-2" pref="31" max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel32" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="cbPermissionsPermission" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace pref="31" max="32767" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="btnPermissionsClear" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="btnPermissionsCreate" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- <EmptySpace max="-2" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="jLabel31">
- <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="IRODSInfoDialog.jLabel31.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel32">
- <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="IRODSInfoDialog.jLabel32.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JComboBox" name="cbPermissionsUserName">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="0"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JComboBox" name="cbPermissionsPermission">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="0"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JButton" name="btnPermissionsClear">
- <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="IRODSInfoDialog.btnPermissionsClear.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JButton" name="btnPermissionsCreate">
- <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="IRODSInfoDialog.btnPermissionsCreate.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
- </Property>
- <Property name="enabled" type="boolean" value="false"/>
- </Properties>
- <Events>
- <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnPermissionsCreateActionPerformed"/>
- </Events>
- </Component>
- </SubComponents>
- </Container>
</SubComponents>
</Container>
</SubComponents>
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.java
index 663a596..745c861 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/IRODSInfoDialog.java
@@ -15,6 +15,7 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
+import javax.swing.DefaultCellEditor;
import javax.swing.JOptionPane;
import javax.swing.ListSelectionModel;
import javax.swing.event.ChangeEvent;
@@ -23,6 +24,7 @@ import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
+import javax.swing.table.TableColumn;
import org.irods.jargon.core.connection.IRODSAccount;
import org.irods.jargon.core.exception.JargonException;
import org.irods.jargon.core.protovalues.FilePermissionEnum;
@@ -36,6 +38,7 @@ import org.irods.jargon.core.pub.domain.AvuData;
import org.irods.jargon.core.pub.domain.Collection;
import org.irods.jargon.core.pub.domain.DataObject;
import org.irods.jargon.core.pub.domain.User;
+import org.irods.jargon.core.pub.domain.UserFilePermission;
import org.irods.jargon.core.query.CollectionAndDataObjectListingEntry;
import org.irods.jargon.idrop.desktop.systraygui.services.IRODSFileService;
import org.irods.jargon.idrop.desktop.systraygui.utils.FieldFormatHelper;
@@ -97,7 +100,6 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
// for now hide clear button
btnMetadataClear.setVisible(false);
- btnPermissionsClear.setVisible(false);
}
private void initSelectedObjectName() {
@@ -391,22 +393,11 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
//cbPermissionsPermission.addItem(permission.name());
//}
// will just do my own for now
- cbPermissionsPermission.addItem("NONE");
- cbPermissionsPermission.addItem("READ");;
- cbPermissionsPermission.addItem("WRITE");
- cbPermissionsPermission.addItem("OWN");
- try {
- UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
- users = userAO.findAll();
- cbPermissionsUserName.addItem("NONE");
- for (User user: users) {
- cbPermissionsUserName.addItem(user.getNameWithZone());
- }
- } catch (JargonException ex) {
- Exceptions.printStackTrace(ex);
- }
- cbPermissionsPermission.addActionListener(dialog);
- cbPermissionsUserName.addActionListener(dialog);
+ //cbPermissionsPermission.addItem("NONE");
+ javax.swing.JComboBox tableCombo = new javax.swing.JComboBox();
+ tableCombo.addItem("READ");
+ tableCombo.addItem("WRITE");
+ tableCombo.addItem("OWN");
// set up permission table and table model
PermissionsTableModel permissionsTableModel = null;
@@ -426,6 +417,9 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
tablePermissions.setModel(permissionsTableModel);
tablePermissions.getSelectionModel().addListSelectionListener(dialog);
+ TableColumn permissionColumn = tablePermissions.getColumnModel().getColumn(1);
+ permissionColumn.setCellEditor(new DefaultCellEditor(tableCombo));
+ permissionsTableModel.resetOriginalPermissionList();
tablePermissions.validate();
dialog.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
@@ -473,18 +467,10 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
btnMetadataDelete.setEnabled(selectedRowCount > 0);
}
- private void updatePermissonsCreateBtnStatus() {
- // create button should only be enabled when non "None" items
- // are selected in the permissions combo boxes
- btnPermissionsCreate.setEnabled(
- (!((String)cbPermissionsPermission.getSelectedItem()).equals("NONE")) &&
- (!((String)cbPermissionsUserName.getSelectedItem()).equals("NONE")));
- }
-
private void updatePermissionsDeleteBtnStatus(int selectedRowCount) {
- // delete button should only be enabled when there is a tableMetadata selection
- // add all text fields are populated
- btnPermissionsDelete.setEnabled(selectedRowCount > 0);
+ // delete button should only be enabled when there is a tableMetadata or
+ // tablePermissions selection
+ btnDeleteSharePermissions.setEnabled(selectedRowCount > 0);
}
// ListSelectionListener methods
@@ -527,10 +513,10 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
// ActionListener Methods
@Override
public void actionPerformed(ActionEvent ae) {
- if (ae.getSource() == cbPermissionsPermission ||
- ae.getSource() == cbPermissionsUserName) {
- updatePermissonsCreateBtnStatus();
- }
+// if (ae.getSource() == cbPermissionsPermission ||
+// ae.getSource() == cbPermissionsUserName) {
+// updatePermissonsCreateBtnStatus();
+// }
}
// end ActionListener Methods
@@ -630,14 +616,11 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
tablePermissions = new javax.swing.JTable();
jPanel7 = new javax.swing.JPanel();
jPanel8 = new javax.swing.JPanel();
- btnPermissionsDelete = new javax.swing.JButton();
- pnlPermissionEdit = new javax.swing.JPanel();
- jLabel31 = new javax.swing.JLabel();
- jLabel32 = new javax.swing.JLabel();
- cbPermissionsUserName = new javax.swing.JComboBox();
- cbPermissionsPermission = new javax.swing.JComboBox();
- btnPermissionsClear = new javax.swing.JButton();
- btnPermissionsCreate = new javax.swing.JButton();
+ btnPermissionsSave = new javax.swing.JButton();
+ jPanel9 = new javax.swing.JPanel();
+ jPanel16 = new javax.swing.JPanel();
+ btnAddSharePermissions = new javax.swing.JButton();
+ btnDeleteSharePermissions = new javax.swing.JButton();
pnlCloseBtn = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jPanel4 = new javax.swing.JPanel();
@@ -1226,7 +1209,7 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
tablePermissions.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
- {"", ""},
+ {"", null},
{null, null},
{null, null},
{null, null}
@@ -1236,10 +1219,10 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
}
) {
Class[] types = new Class [] {
- java.lang.String.class, java.lang.String.class
+ java.lang.String.class, java.lang.Object.class
};
boolean[] canEdit = new boolean [] {
- false, false
+ false, true
};
public Class getColumnClass(int columnIndex) {
@@ -1261,11 +1244,12 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
jPanel8.setPreferredSize(new java.awt.Dimension(100, 44));
- btnPermissionsDelete.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnPermissionsDelete.text")); // NOI18N
- btnPermissionsDelete.setEnabled(false);
- btnPermissionsDelete.addActionListener(new java.awt.event.ActionListener() {
+ btnPermissionsSave.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnPermissionsSave.text")); // NOI18N
+ btnPermissionsSave.setActionCommand(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnPermissionsSave.actionCommand")); // NOI18N
+ btnPermissionsSave.setEnabled(false);
+ btnPermissionsSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnPermissionsDeleteActionPerformed(evt);
+ btnPermissionsSaveActionPerformed(evt);
}
});
@@ -1273,86 +1257,52 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
jPanel8.setLayout(jPanel8Layout);
jPanel8Layout.setHorizontalGroup(
jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 100, Short.MAX_VALUE)
- .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel8Layout.createSequentialGroup()
- .add(8, 8, 8)
- .add(btnPermissionsDelete)
- .addContainerGap(8, Short.MAX_VALUE)))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
+ .addContainerGap(19, Short.MAX_VALUE)
+ .add(btnPermissionsSave)
+ .addContainerGap())
);
jPanel8Layout.setVerticalGroup(
jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(0, 42, Short.MAX_VALUE)
- .add(jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jPanel8Layout.createSequentialGroup()
- .add(7, 7, 7)
- .add(btnPermissionsDelete)
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
+ .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
+ .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+ .add(btnPermissionsSave)
+ .addContainerGap())
);
jPanel7.add(jPanel8, java.awt.BorderLayout.EAST);
- pnlPermissionsTable.add(jPanel7, java.awt.BorderLayout.SOUTH);
-
- pnlPermissionsTab.add(pnlPermissionsTable, java.awt.BorderLayout.CENTER);
-
- pnlPermissionEdit.setBorder(javax.swing.BorderFactory.createEtchedBorder());
- pnlPermissionEdit.setPreferredSize(new java.awt.Dimension(527, 200));
+ jPanel9.setPreferredSize(new java.awt.Dimension(100, 25));
+ jPanel9.setLayout(new java.awt.BorderLayout());
- jLabel31.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.jLabel31.text")); // NOI18N
+ jPanel16.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 1, 1));
- jLabel32.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.jLabel32.text")); // NOI18N
-
- btnPermissionsClear.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnPermissionsClear.text")); // NOI18N
+ btnAddSharePermissions.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnAddSharePermissions.text")); // NOI18N
+ btnAddSharePermissions.setPreferredSize(new java.awt.Dimension(22, 24));
+ btnAddSharePermissions.addActionListener(new java.awt.event.ActionListener() {
+ public void actionPerformed(java.awt.event.ActionEvent evt) {
+ btnAddSharePermissionsActionPerformed(evt);
+ }
+ });
+ jPanel16.add(btnAddSharePermissions);
- btnPermissionsCreate.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnPermissionsCreate.text")); // NOI18N
- btnPermissionsCreate.setEnabled(false);
- btnPermissionsCreate.addActionListener(new java.awt.event.ActionListener() {
+ btnDeleteSharePermissions.setText(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.btnDeleteSharePermissions.text")); // NOI18N
+ btnDeleteSharePermissions.setEnabled(false);
+ btnDeleteSharePermissions.setPreferredSize(new java.awt.Dimension(22, 24));
+ btnDeleteSharePermissions.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
- btnPermissionsCreateActionPerformed(evt);
+ btnDeleteSharePermissionsActionPerformed(evt);
}
});
+ jPanel16.add(btnDeleteSharePermissions);
- org.jdesktop.layout.GroupLayout pnlPermissionEditLayout = new org.jdesktop.layout.GroupLayout(pnlPermissionEdit);
- pnlPermissionEdit.setLayout(pnlPermissionEditLayout);
- pnlPermissionEditLayout.setHorizontalGroup(
- pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlPermissionEditLayout.createSequentialGroup()
- .add(45, 45, 45)
- .add(pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(jLabel31)
- .add(jLabel32))
- .add(32, 32, 32)
- .add(pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
- .add(cbPermissionsUserName, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(cbPermissionsPermission, 0, 280, Short.MAX_VALUE))
- .addContainerGap(96, Short.MAX_VALUE))
- .add(pnlPermissionEditLayout.createSequentialGroup()
- .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .add(btnPermissionsClear)
- .add(18, 18, 18)
- .add(btnPermissionsCreate)
- .add(19, 19, 19))
- );
- pnlPermissionEditLayout.setVerticalGroup(
- pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
- .add(pnlPermissionEditLayout.createSequentialGroup()
- .add(45, 45, 45)
- .add(pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel31)
- .add(cbPermissionsUserName, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .add(31, 31, 31)
- .add(pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(jLabel32)
- .add(cbPermissionsPermission, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
- .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 31, Short.MAX_VALUE)
- .add(pnlPermissionEditLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
- .add(btnPermissionsClear)
- .add(btnPermissionsCreate))
- .addContainerGap())
- );
+ jPanel9.add(jPanel16, java.awt.BorderLayout.WEST);
- pnlPermissionsTab.add(pnlPermissionEdit, java.awt.BorderLayout.SOUTH);
+ jPanel7.add(jPanel9, java.awt.BorderLayout.WEST);
+
+ pnlPermissionsTable.add(jPanel7, java.awt.BorderLayout.SOUTH);
+
+ pnlPermissionsTab.add(pnlPermissionsTable, java.awt.BorderLayout.CENTER);
tabbedpanelMain.addTab(org.openide.util.NbBundle.getMessage(IRODSInfoDialog.class, "IRODSInfoDialog.pnlPermissionsTab.TabConstraints.tabTitle"), pnlPermissionsTab); // NOI18N
@@ -1628,126 +1578,159 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
}
}//GEN-LAST:event_btnRefreshActionPerformed
- private void btnPermissionsDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPermissionsDeleteActionPerformed
- int selectedRow = tablePermissions.getSelectedRow();
- String tmpSelectedUser = (String)tablePermissions.getModel().getValueAt(selectedRow, 0);
- String selectedUser = null;
-
- // probably have to remve #zone from user name
- int idx = tmpSelectedUser.indexOf("#");
- if (idx >= 0) {
- selectedUser = tmpSelectedUser.substring(0, idx);
- }
- else {
- selectedUser = tmpSelectedUser;
- }
+ private void btnPermissionsSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPermissionsSaveActionPerformed
- String theZone = irodsAccount.getZone();
+ PermissionsTableModel tm = (PermissionsTableModel)tablePermissions.getModel();
try {
-
- if (isCollection()) {
- CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
- collectionAO.removeAccessPermissionForUser(theZone, selectedObjectFullPath, selectedUser, true);
+ // first get any permissions that were removed
+ UserFilePermission[] permissionsToDelete = tm.getPermissionsToDelete();
+
+ for (UserFilePermission permission: permissionsToDelete) {
+
+ if (isCollection()) {
+ CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
+ collectionAO.removeAccessPermissionForUser(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName(),
+ true);
+ }
+ else {
+ DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
+ dataObjectAO.removeAccessPermissionsForUser(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName());
+ }
}
- else {
+
+ // now add any permissions that were added
+ UserFilePermission[] permissionsToAdd = tm.getPermissionsToAdd();
+
+ for (UserFilePermission permission: permissionsToAdd) {
+ CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
- dataObjectAO.removeAccessPermissionsForUser(theZone, selectedObjectFullPath, selectedUser);
+
+ if (permission.getFilePermissionEnum() == FilePermissionEnum.READ) {
+ if (isCollection()) {
+ collectionAO.setAccessPermissionRead(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName(),
+ true);
+ }
+ else {
+ dataObjectAO.setAccessPermissionRead(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName());
+ }
+ }
+ else
+ if (permission.getFilePermissionEnum() == FilePermissionEnum.WRITE) {
+ if (isCollection()) {
+ collectionAO.setAccessPermissionWrite(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName(),
+ true);
+ }
+ else {
+ dataObjectAO.setAccessPermissionWrite(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName());
+ }
+ }
+ else
+ if (permission.getFilePermissionEnum() == FilePermissionEnum.OWN) {
+ if (isCollection()) {
+ collectionAO.setAccessPermissionOwn(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName(),
+ true);
+ }
+ else {
+ dataObjectAO.setAccessPermissionOwn(
+ permission.getUserZone(),
+ selectedObjectFullPath,
+ permission.getUserName());
+ }
+ }
+ }
+
+ if((permissionsToAdd.length > 0) || (permissionsToDelete.length > 0)) {
+ JOptionPane.showMessageDialog(
+ this, "Permissions Updated Sucessfully", "Update Permissions", JOptionPane.PLAIN_MESSAGE);
}
- // remove this user's entry from table if there is one
- UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
- PermissionsTableModel tm = (PermissionsTableModel)tablePermissions.getModel();
- tm.deleteRow(userAO.findByName(tmpSelectedUser));
-
- JOptionPane.showMessageDialog(
- this, "Permissions Removed Sucessfully", "Remove Permissions", JOptionPane.PLAIN_MESSAGE);
+ tm.resetOriginalPermissionList();
} catch (JargonException ex) {
- Exceptions.printStackTrace(ex);
- JOptionPane.showMessageDialog(
- this, "Permission Remove Failed", "Remove Permissions", JOptionPane.PLAIN_MESSAGE);
- }
- }//GEN-LAST:event_btnPermissionsDeleteActionPerformed
-
- private void btnPermissionsCreateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPermissionsCreateActionPerformed
- String selectedPermission = (String)cbPermissionsPermission.getSelectedItem();
- String tmpSelectedUser = (String)cbPermissionsUserName.getSelectedItem();
- String selectedUser = null;
-
- // probably have to remve #zone from user name
- int idx = tmpSelectedUser.indexOf("#");
- if (idx >= 0) {
- selectedUser = tmpSelectedUser.substring(0, idx);
- }
- else {
- selectedUser = tmpSelectedUser;
+ Exceptions.printStackTrace(ex);
+ JOptionPane.showMessageDialog(
+ this, "Permission Update Failed", "Update Permissions", JOptionPane.PLAIN_MESSAGE);
}
- String theZone = irodsAccount.getZone();
-
- try {
- CollectionAO collectionAO = irodsFileSystem.getIRODSAccessObjectFactory().getCollectionAO(irodsAccount);
- DataObjectAO dataObjectAO = irodsFileSystem.getIRODSAccessObjectFactory().getDataObjectAO(irodsAccount);
+ btnPermissionsSave.setEnabled(false);
+ }//GEN-LAST:event_btnPermissionsSaveActionPerformed
+
+ private void btnAddSharePermissionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAddSharePermissionsActionPerformed
+ AddPermissionsDialog addPermissionsDialog = new AddPermissionsDialog(
+ this, true, irodsFileSystem, irodsAccount);
+
+ addPermissionsDialog.setLocation(
+ (int)this.getLocation().getX(), (int)this.getLocation().getY());
+ addPermissionsDialog.setVisible(true);
+
+ UserFilePermission userFilePermission = addPermissionsDialog.getPermissionToAdd();
- if (!selectedPermission.equals("NONE") && !selectedUser.equals("NONE")) {
- if (selectedPermission.equals("READ")) {
- if (isCollection()) {
- collectionAO.setAccessPermissionRead(theZone, selectedObjectFullPath, selectedUser, true);
- }
- else {
- dataObjectAO.setAccessPermissionRead(theZone, selectedObjectFullPath, selectedUser);
- }
- }
- else
- if (selectedPermission.equals("WRITE")) {
- if (isCollection()) {
- collectionAO.setAccessPermissionWrite(theZone, selectedObjectFullPath, selectedUser, true);
- }
- else {
- dataObjectAO.setAccessPermissionWrite(theZone, selectedObjectFullPath, selectedUser);
- }
- }
- else
- if (selectedPermission.equals("OWN")) {
- if (isCollection()) {
- collectionAO.setAccessPermissionOwn(theZone, selectedObjectFullPath, selectedUser, true);
- }
- else {
- dataObjectAO.setAccessPermissionOwn(theZone, selectedObjectFullPath, selectedUser);
- }
+ // first remove this user's entry from table if there is one
+ if (userFilePermission != null) {
+ try {
+ UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
+ String tableUserName = userFilePermission.getUserName() + "#" + userFilePermission.getUserZone();
+
+ PermissionsTableModel tm = (PermissionsTableModel)tablePermissions.getModel();
+ tm.deleteRow(userAO.findByName(tableUserName));
+
+ // now add to table
+ tm.addRow(userAO.findByName(tableUserName), userFilePermission.getFilePermissionEnum());
+ } catch (JargonException ex) {
+ Exceptions.printStackTrace(ex);
}
-
- // first remove this user's entry from table if there is one
- UserAO userAO = irodsFileSystem.getIRODSAccessObjectFactory().getUserAO(irodsAccount);
- PermissionsTableModel tm = (PermissionsTableModel)tablePermissions.getModel();
- tm.deleteRow(userAO.findByName(tmpSelectedUser));
-
- // now add to table
- tm.addRow(userAO.findByName(tmpSelectedUser), FilePermissionEnum.valueOf(selectedPermission));
-
- JOptionPane.showMessageDialog(
- this, "Permissions Created Sucessfully", "Create Permissions", JOptionPane.PLAIN_MESSAGE);
+ btnPermissionsSave.setEnabled(true);
}
- } catch (JargonException ex) {
- Exceptions.printStackTrace(ex);
- JOptionPane.showMessageDialog(
- this, "Permission Create Failed", "Create Permissions", JOptionPane.PLAIN_MESSAGE);
+ }//GEN-LAST:event_btnAddSharePermissionsActionPerformed
+
+ private void btnDeleteSharePermissionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeleteSharePermissionsActionPerformed
+
+ int[] selectedRows = tablePermissions.getSelectedRows();
+ int numRowsSelected = selectedRows.length;
+
+ // have to remove rows in reverse
+ for(int i=numRowsSelected-1; i>=0; i--) {
+ int selectedRow = selectedRows[i];
+ if (selectedRow >= 0) {
+ PermissionsTableModel model = (PermissionsTableModel) tablePermissions.getModel();
+ model.deleteRow(selectedRow);
+ btnPermissionsSave.setEnabled(true);
+ }
}
- }//GEN-LAST:event_btnPermissionsCreateActionPerformed
+ }//GEN-LAST:event_btnDeleteSharePermissionsActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables
+ private javax.swing.JButton btnAddSharePermissions;
private javax.swing.JButton btnClose;
+ private javax.swing.JButton btnDeleteSharePermissions;
private javax.swing.JButton btnMetadataClear;
private javax.swing.JButton btnMetadataCreate;
private javax.swing.JButton btnMetadataDelete;
- private javax.swing.JButton btnPermissionsClear;
- private javax.swing.JButton btnPermissionsCreate;
- private javax.swing.JButton btnPermissionsDelete;
+ private javax.swing.JButton btnPermissionsSave;
private javax.swing.JButton btnRefresh;
private javax.swing.JButton btnUpdateTagsComments;
- private javax.swing.JComboBox cbPermissionsPermission;
- private javax.swing.JComboBox cbPermissionsUserName;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
@@ -1771,8 +1754,6 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
private javax.swing.JLabel jLabel29;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel30;
- private javax.swing.JLabel jLabel31;
- private javax.swing.JLabel jLabel32;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
@@ -1780,6 +1761,7 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
+ private javax.swing.JPanel jPanel16;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
@@ -1787,6 +1769,7 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
+ private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JScrollPane jScrollPane3;
@@ -1824,7 +1807,6 @@ public class IRODSInfoDialog extends javax.swing.JDialog implements
private javax.swing.JPanel pnlMetadataTab;
private javax.swing.JPanel pnlMetadataTable;
private javax.swing.JPanel pnlObjectInfo;
- private javax.swing.JPanel pnlPermissionEdit;
private javax.swing.JPanel pnlPermissionsTab;
private javax.swing.JPanel pnlPermissionsTable;
private javax.swing.JPanel pnlSelectedObject;
diff --git a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/PermissionsTableModel.java b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/PermissionsTableModel.java
index 3fe30b5..40cb4f6 100644
--- a/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/PermissionsTableModel.java
+++ b/idrop-swing/src/main/java/org/irods/jargon/idrop/desktop/systraygui/viscomponents/PermissionsTableModel.java
@@ -1,6 +1,9 @@
package org.irods.jargon.idrop.desktop.systraygui.viscomponents;
+import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import javax.swing.table.AbstractTableModel;
import org.irods.jargon.core.exception.JargonException;
@@ -18,6 +21,7 @@ import org.slf4j.LoggerFactory;
public class PermissionsTableModel extends AbstractTableModel {
List<UserFilePermission> permissions;
+ List<UserFilePermission> origPermissions;
public static org.slf4j.Logger log = LoggerFactory.getLogger(MetadataTableModel.class);
public PermissionsTableModel(List<UserFilePermission> permissions) {
@@ -25,6 +29,7 @@ public class PermissionsTableModel extends AbstractTableModel {
throw new IdropRuntimeException("null permissions");
}
this.permissions = permissions;
+ resetOriginalPermissionList();
}
@Override
@@ -67,26 +72,21 @@ public class PermissionsTableModel extends AbstractTableModel {
}
@Override
+ public void setValueAt(Object value, int row, int column) {
+ if(column == 1) {
+ UserFilePermission permission = permissions.get(row);
+ permission.setFilePermissionEnum(FilePermissionEnum.valueOf((String)value));
+ fireTableDataChanged();
+ }
+ }
+
+ @Override
public Class<?> getColumnClass(final int columnIndex) {
if (columnIndex >= getColumnCount()) {
throw new IdropRuntimeException("column unavailable, out of bounds");
}
-
- // translate indexes to object values
- // 0 = user name
-
- if (columnIndex == 0) {
- return String.class;
- }
-
- // 1 = share permission
-
- if (columnIndex == 1) {
- return String.class;
- }
-
- throw new IdropRuntimeException("unknown column");
+ return (getValueAt(0, columnIndex).getClass());
}
@Override
@@ -112,6 +112,11 @@ public class PermissionsTableModel extends AbstractTableModel {
throw new IdropRuntimeException("unknown column");
}
+ @Override
+ public boolean isCellEditable(int row, int column) {
+ return (column != 0);
+ }
+
public void addRow(User user, FilePermissionEnum permissionEnum) throws JargonException {
UserFilePermission permission = new UserFilePermission(
user.getName(),
@@ -141,4 +146,32 @@ public class PermissionsTableModel extends AbstractTableModel {
}
}
+ public void deleteRow(int idx) {
+
+ permissions.remove(idx);
+ fireTableDataChanged();
+ }
+
+ public UserFilePermission[] getPermissionsToDelete() {
+
+ Set<UserFilePermission> permissionsToDeleteSet = new HashSet<UserFilePermission>(origPermissions);
+ permissionsToDeleteSet.removeAll(permissions);
+ UserFilePermission[] permissionsToDelete = permissionsToDeleteSet.toArray(new UserFilePermission[0]);
+
+ return permissionsToDelete;
+ }
+
+ public UserFilePermission[] getPermissionsToAdd() {
+
+ Set<UserFilePermission> permissionsToAddSet = new HashSet<UserFilePermission>(permissions);
+ permissionsToAddSet.removeAll(origPermissions);
+ UserFilePermission[] permissionsToAdd = permissionsToAddSet.toArray(new UserFilePermission[0]);
+
+ return permissionsToAdd;
+ }
+
+ public void resetOriginalPermissionList() {
+ this.origPermissions = new ArrayList(this.permissions);
+ }
+
}
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 bf8aabd..7318e94 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
@@ -251,8 +251,6 @@ IRODSInfoDialog.btnMetadataDelete.text=Delete
IRODSInfoDialog.txtMetadataAttribute.text=
IRODSInfoDialog.txtMetadataValue.text=
IRODSInfoDialog.txtMetadataUnit.text=
-IRODSInfoDialog.jLabel31.text=User Name:
-IRODSInfoDialog.jLabel32.text=Share Permission:
IRODSInfoDialog.lblInfoObjectName.text=loading...
IRODSInfoDialog.lblInfoObjectParent.text=loading...
IRODSInfoDialog.lblInfoObjectSize.text=loading...
@@ -288,6 +286,13 @@ DownloadDialog.btnDownloadNow.text=Download Now
IRODSInfoDialog.btnClose.text=Close
IRODSInfoDialog.btnMetadataCreate.text=Create
IRODSInfoDialog.btnRefresh.text=Refresh
-IRODSInfoDialog.btnPermissionsClear.text=Clear
-IRODSInfoDialog.btnPermissionsDelete.text=Delete
-IRODSInfoDialog.btnPermissionsCreate.text=Create
+AddPermissionsDialog.jLabel31.text=User Name:
+AddPermissionsDialog.jLabel32.text=Share Permission:
+AddPermissionsDialog.title=Add Share Permissions
+IRODSInfoDialog.btnPermissionsSave.text=Save
+IRODSInfoDialog.btnPermissionsSave.actionCommand=Save
+IRODSInfoDialog.btnAddSharePermissions.text=+
+IRODSInfoDialog.btnDeleteSharePermissions.text=-
+AddPermissionsDialog.btnPermissionsAdd.text=Add
+AddPermissionsDialog.btnPermissionsAdd.actionCommand=Add
+AddPermissionsDialog.btnPermissionsCancel.text=Cancel