You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by an...@apache.org on 2017/04/20 13:35:45 UTC
[12/12] syncope git commit: Merge branch 'SYNCOPE-808' of
https://git-wip-us.apache.org/repos/asf/syncope into SYNCOPE-808
Merge branch 'SYNCOPE-808' of https://git-wip-us.apache.org/repos/asf/syncope into SYNCOPE-808
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/39b71980
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/39b71980
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/39b71980
Branch: refs/heads/SYNCOPE-808
Commit: 39b7198098a49179c3fdfa246ae8e5a94dc5f59c
Parents: eb1e4f1 06fd9e3
Author: Andrea Patricelli <an...@apache.org>
Authored: Thu Apr 20 14:45:50 2017 +0200
Committer: Andrea Patricelli <an...@apache.org>
Committed: Thu Apr 20 14:45:50 2017 +0200
----------------------------------------------------------------------
.../syncope/ide/netbeans/UserProperties.java | 79 ++++++++++++++++++++
.../ide/netbeans/view/ServerDetailsView.form | 7 +-
.../ide/netbeans/view/ServerDetailsView.java | 6 +-
3 files changed, 85 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/39b71980/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.form
----------------------------------------------------------------------
diff --cc ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.form
index 7cb27e1,d6ba1d7..0a80e96
--- a/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.form
+++ b/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.form
@@@ -65,9 -61,13 +65,9 @@@ under the License
</Group>
</Group>
</Group>
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" pref="101" max="-2" attributes="0"/>
- <Component id="jLabel4" min="-2" max="-2" attributes="0"/>
- </Group>
</Group>
- <EmptySpace pref="41" max="32767" attributes="0"/>
- </Group>
+ <EmptySpace pref="40" max="32767" attributes="0"/>
- </Group>
++ </Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
@@@ -78,25 -78,15 +78,25 @@@
<EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="urlTxt" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="schemeTxt" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace type="separate" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="userNameTxt" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="hostTxt" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
- <EmptySpace type="separate" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0">
+ <Component id="portTxt" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="userNameTxt" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
- <Group type="103" groupAlignment="3" attributes="0">
++ <Group type="103" groupAlignment="3" attributes="0">
<Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="passwordTxt" alignment="3" min="-2" max="-2" attributes="0"/>
</Group>
@@@ -139,43 -137,25 +139,42 @@@
</Component>
<Component class="javax.swing.JButton" name="okButton">
<Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/ide/netbeans/view/Bundle.properties" key="ServerDetailsView.okButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
+ <Property name="text" type="java.lang.String" value="submit"/>
- </Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="okButtonActionPerformed"/>
</Events>
</Component>
<Component class="javax.swing.JLabel" name="jLabel4">
<Properties>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/apache/syncope/ide/netbeans/view/Bundle.properties" key="ServerDetailsView.jLabel4.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ <Property name="horizontalAlignment" type="int" value="0"/>
+ <Property name="text" type="java.lang.String" value="Apache Syncope connection"/>
+ <Property name="toolTipText" type="java.lang.String" value=""/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="hostTxt">
+ <Properties>
+ <Property name="toolTipText" type="java.lang.String" value=""/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel5">
+ <Properties>
+ <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="portTxt"/>
</Property>
+ <Property name="text" type="java.lang.String" value="Port"/>
+ <Property name="toolTipText" type="java.lang.String" value=""/>
</Properties>
</Component>
+ <Component class="javax.swing.JTextField" name="portTxt">
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel6">
+ <Properties>
+ <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="hostTxt"/>
+ </Property>
+ <Property name="text" type="java.lang.String" value="Host"/>
+ <Property name="toolTipText" type="java.lang.String" value=""/>
- </Properties>
++ </Properties>
+ </Component>
</SubComponents>
</Form>
http://git-wip-us.apache.org/repos/asf/syncope/blob/39b71980/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
----------------------------------------------------------------------
diff --cc ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
index f4177ac,07aedf9..e851615
--- a/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
+++ b/ide/netbeans/src/main/java/org/apache/syncope/ide/netbeans/view/ServerDetailsView.java
@@@ -105,27 -84,26 +105,27 @@@ public class ServerDetailsView extends
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
+ .addGap(41, 41, 41)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addGroup(layout.createSequentialGroup()
- .addGap(41, 41, 41)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
- .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addGroup(layout.createSequentialGroup()
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
- .addComponent(jLabel1)
- .addComponent(jLabel2)
- .addComponent(jLabel3))
- .addGap(39, 39, 39)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
- .addComponent(userNameTxt)
- .addComponent(urlTxt)
- .addComponent(passwordTxt, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)))))
- .addGroup(layout.createSequentialGroup()
- .addGap(101, 101, 101)
- .addComponent(jLabel4)))
- .addContainerGap(41, Short.MAX_VALUE))
- );
+ .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 256, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+ .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addGroup(layout.createSequentialGroup()
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+ .addComponent(jLabel1)
+ .addComponent(jLabel2)
+ .addComponent(jLabel3)
+ .addComponent(jLabel5)
+ .addComponent(jLabel6))
+ .addGap(39, 39, 39)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+ .addComponent(portTxt)
+ .addComponent(hostTxt)
+ .addComponent(userNameTxt)
+ .addComponent(schemeTxt)
+ .addComponent(passwordTxt, javax.swing.GroupLayout.DEFAULT_SIZE, 155, Short.MAX_VALUE)))))
+ .addContainerGap(40, Short.MAX_VALUE))
- );
++ );
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
@@@ -134,21 -112,13 +134,21 @@@
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
- .addComponent(urlTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
+ .addComponent(schemeTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
- .addComponent(jLabel2)
- .addComponent(userNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
- .addGap(18, 18, 18)
+ .addComponent(hostTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel6))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(portTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel5))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+ .addComponent(userNameTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+ .addComponent(jLabel2))
+ .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
++ .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(passwordTxt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
@@@ -216,37 -175,9 +216,37 @@@
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
+ private javax.swing.JLabel jLabel5;
+ private javax.swing.JLabel jLabel6;
private javax.swing.JButton okButton;
private javax.swing.JPasswordField passwordTxt;
- private javax.swing.JTextField urlTxt;
+ private javax.swing.JTextField portTxt;
+ private javax.swing.JTextField schemeTxt;
private javax.swing.JTextField userNameTxt;
-- // End of variables declaration//GEN-END:variables
++ // End of variables declaration
+
+ private List<String> validate(
+ final JTextField schemeTxt,
+ final JTextField hostTxt,
+ final JTextField portTxt,
+ final JTextField userNameTxt) {
+
+ List<String> res = new ArrayList<>();
+
+ if (StringUtils.isBlank(schemeTxt.getText())
+ || (!StringUtils.equals(schemeTxt.getText(), "http")
+ && !StringUtils.equals(schemeTxt.getText(), "https"))) {
+ res.add("scheme");
+ }
+ if (StringUtils.isBlank(hostTxt.getText())) {
+ res.add("host");
+ }
+ if (StringUtils.isBlank(portTxt.getText()) || !StringUtils.isNumeric(portTxt.getText())) {
+ res.add("port");
+ }
+ if (StringUtils.isBlank(userNameTxt.getText())) {
+ res.add("username");
+ }
+ return res;
+ }
}