You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2013/01/17 16:20:31 UTC

svn commit: r1434715 - in /syncope/branches/1_0_X/console: pom.xml src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java

Author: ilgrosso
Date: Thu Jan 17 15:20:30 2013
New Revision: 1434715

URL: http://svn.apache.org/viewvc?rev=1434715&view=rev
Log:
Enabling jrebel with latest surefire + minor cleanings in NotificationModalPage

Modified:
    syncope/branches/1_0_X/console/pom.xml
    syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java

Modified: syncope/branches/1_0_X/console/pom.xml
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/pom.xml?rev=1434715&r1=1434714&r2=1434715&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/pom.xml (original)
+++ syncope/branches/1_0_X/console/pom.xml Thu Jan 17 15:20:30 2013
@@ -372,7 +372,7 @@ under the License.
     <profile>
       <id>jrebel</id>
       <properties>
-        <maven.test.skip>true</maven.test.skip>
+        <skipTests>true</skipTests>
         <javaagent>-javaagent:${env.REBEL_HOME}/jrebel.jar</javaagent>
       </properties>
       <build>

Modified: syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1434715&r1=1434714&r2=1434715&view=diff
==============================================================================
--- syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java (original)
+++ syncope/branches/1_0_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java Thu Jan 17 15:20:30 2013
@@ -24,6 +24,18 @@ import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import org.apache.syncope.client.to.NotificationTO;
+import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
+import org.apache.syncope.console.pages.panels.UserSearchPanel;
+import org.apache.syncope.console.rest.NotificationRestClient;
+import org.apache.syncope.console.rest.SchemaRestClient;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxPalettePanel;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
+import org.apache.syncope.types.AttributableType;
+import org.apache.syncope.types.IntMappingType;
+import org.apache.syncope.types.TraceLevel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
@@ -40,34 +52,22 @@ import org.apache.wicket.model.ResourceM
 import org.apache.wicket.model.util.ListModel;
 import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.apache.wicket.validation.validator.EmailAddressValidator;
-import org.apache.syncope.client.to.NotificationTO;
-import org.apache.syncope.client.validation.SyncopeClientCompositeErrorException;
-import org.apache.syncope.console.pages.panels.UserSearchPanel;
-import org.apache.syncope.console.rest.NotificationRestClient;
-import org.apache.syncope.console.rest.SchemaRestClient;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxPalettePanel;
-import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.types.AttributableType;
-import org.apache.syncope.types.IntMappingType;
-import org.apache.syncope.types.TraceLevel;
 
 class NotificationModalPage extends BaseModalPage {
 
     private static final long serialVersionUID = -1975312550059578553L;
 
+    /**
+     * OnChange event name.
+     */
+    private static final String ON_CHANGE = "onchange";
+
     @SpringBean
     private NotificationRestClient restClient;
 
     @SpringBean
     private SchemaRestClient schemaRestClient;
 
-    /**
-     * OnChange event name.
-     */
-    private static String onchange = "onchange";
-
     public NotificationModalPage(final PageReference callPageRef, final ModalWindow window,
             final NotificationTO notificationTO, final boolean createFlag) {
 
@@ -124,7 +124,9 @@ class NotificationModalPage extends Base
         recipientAttrName.setRequired(true);
         form.add(recipientAttrName);
 
-        recipientAttrType.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
+        recipientAttrType.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
 
             @Override
             protected void onUpdate(final AjaxRequestTarget target) {
@@ -161,7 +163,7 @@ class NotificationModalPage extends Base
         recipientsContainer.add(recipients);
         recipients.setEnabled(checkRecipients.getModelObject());
 
-        selfAsRecipient.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
+        selfAsRecipient.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
 
             private static final long serialVersionUID = -1107858522700306810L;
 
@@ -177,7 +179,7 @@ class NotificationModalPage extends Base
             }
         });
 
-        checkRecipients.getField().add(new AjaxFormComponentUpdatingBehavior(onchange) {
+        checkRecipients.getField().add(new AjaxFormComponentUpdatingBehavior(ON_CHANGE) {
 
             private static final long serialVersionUID = -1107858522700306810L;
 
@@ -199,10 +201,9 @@ class NotificationModalPage extends Base
 
             @Override
             protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
-
                 notificationTO.setAbout(about.buildSearchCond());
                 notificationTO.setRecipients(checkRecipients.getModelObject() ? recipients.buildSearchCond() : null);
-                
+
                 try {
                     if (createFlag) {
                         restClient.createNotification(notificationTO);
@@ -240,20 +241,24 @@ class NotificationModalPage extends Base
 
     private List<String> getSchemaNames(final IntMappingType type) {
         if (type == null) {
-            return Collections.emptyList();
+            return Collections.<String>emptyList();
         }
 
         switch (type) {
             case UserSchema:
                 return schemaRestClient.getSchemaNames(AttributableType.USER);
+
             case UserDerivedSchema:
                 return schemaRestClient.getDerivedSchemaNames(AttributableType.USER);
+
             case UserVirtualSchema:
                 return schemaRestClient.getVirtualSchemaNames(AttributableType.USER);
+
             case Username:
                 return Collections.singletonList("Username");
+
             default:
-                return Collections.emptyList();
+                return Collections.<String>emptyList();
         }
     }
 }