syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1484346 [1/2] - in /syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console: commons/ pages/ pages/panels/ wicket/markup/html/tree/
Date Sun, 19 May 2013 20:30:21 GMT
Author: massi
Date: Sun May 19 20:30:21 2013
New Revision: 1484346

URL: http://svn.apache.org/r1484346
Log:
uniformed modal page and other little refactor

Modified:
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/Constants.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleTemplateModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserTemplateModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Users.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ViewUserModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/VirtualSchemaModalPage.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/AbstractTasks.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/PoliciesPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RolePanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/RoleSearchResultPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/panels/UserSearchResultPanel.java
    syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/wicket/markup/html/tree/TreeActionLinkPanel.java

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/Constants.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/Constants.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/Constants.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/commons/Constants.java Sun May 19 20:30:21 2013
@@ -26,6 +26,10 @@ public final class Constants {
 
     public static final String OPERATION_SUCCEEDED = "operation_succeeded";
 
+    public static final String OPERATION_ERROR = "operation_error";
+
+    public static final String SEARCH_ERROR = "search_error";
+
     public static final String ERROR = "error";
 
     public static final String PREF_USERS_DETAILS_VIEW = "users.details.view";

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractBasePage.java Sun May 19 20:30:21 2013
@@ -20,6 +20,11 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.XMLRolesReader;
+import org.apache.syncope.console.rest.ReportRestClient;
+import org.apache.syncope.console.rest.ResourceRestClient;
+import org.apache.syncope.console.rest.SchemaRestClient;
+import org.apache.syncope.console.rest.TaskRestClient;
+import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.markup.head.MetaHeaderItem;
 import org.apache.wicket.markup.head.HeaderItem;
 import org.apache.wicket.markup.html.WebPage;
@@ -38,11 +43,38 @@ public class AbstractBasePage extends We
      */
     protected static final Logger LOG = LoggerFactory.getLogger(AbstractBasePage.class);
 
+    protected static final String TASKS = "Tasks";
+
+    protected static final String FORM = "form";
+
+    protected static final String CANCEL = "cancel";
+
+    protected static final String SUBMIT = "submit";
+
+    protected static final String APPLY = "apply";
+
+    protected static final String NAME = "name";
+
     protected final HeaderItem meta = new MetaHeaderItem("X-UA-Compatible", "IE=edge");
 
     @SpringBean
     protected XMLRolesReader xmlRolesReader;
 
+    @SpringBean
+    protected UserRestClient userRestClient;
+
+    @SpringBean
+    protected TaskRestClient taskRestClient;
+    
+    @SpringBean
+    protected SchemaRestClient schemaRestClient;
+    
+    @SpringBean
+    protected ResourceRestClient resourceRestClient;
+    
+    @SpringBean
+    protected ReportRestClient reportRestClient;
+
     protected FeedbackPanel feedbackPanel;
 
     /**

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchedTaskModalPage.java Sun May 19 20:30:21 2013
@@ -74,7 +74,7 @@ public abstract class AbstractSchedTaskM
         nextExec.setEnabled(false);
         profile.add(nextExec);
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -116,7 +116,7 @@ public abstract class AbstractSchedTaskM
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -129,10 +129,10 @@ public abstract class AbstractSchedTaskM
         cancel.setDefaultFormProcessing(false);
 
         if (taskTO.getId() > 0) {
-            MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles("Tasks",
+            MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles(TASKS,
                     "update"));
         } else {
-            MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles("Tasks",
+            MetaDataRoleAuthorizationStrategy.authorize(submit, RENDER, xmlRolesReader.getAllAllowedRoles(TASKS,
                     "create"));
         }
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/AbstractSchemaModalPage.java Sun May 19 20:30:21 2013
@@ -20,10 +20,8 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.common.AbstractBaseBean;
 import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.console.rest.SchemaRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with Schema form.
@@ -32,9 +30,6 @@ public abstract class AbstractSchemaModa
 
     private static final long serialVersionUID = 7369215690388444748L;
 
-    @SpringBean
-    protected SchemaRestClient restClient;
-
     protected AttributableType kind;
 
     public AbstractSchemaModalPage(final AttributableType kind) {

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ApprovalModalPage.java Sun May 19 20:30:21 2013
@@ -34,7 +34,6 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.commons.MapChoiceRenderer;
 import org.apache.syncope.console.markup.html.list.AltListView;
 import org.apache.syncope.console.rest.ApprovalRestClient;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxNumberFieldPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel;
@@ -68,9 +67,6 @@ public class ApprovalModalPage extends B
     @SpringBean
     private ApprovalRestClient restClient;
 
-    @SpringBean
-    private UserRestClient userRestClient;
-
     private final ModalWindow editUserWin;
 
     public ApprovalModalPage(final PageReference pageRef, final ModalWindow window, final WorkflowFormTO formTO) {
@@ -194,7 +190,7 @@ public class ApprovalModalPage extends B
         MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE,
                 xmlRolesReader.getAllAllowedRoles("Users", "read"));
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -248,7 +244,7 @@ public class ApprovalModalPage extends B
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -265,14 +261,14 @@ public class ApprovalModalPage extends B
 
         cancel.setDefaultFormProcessing(false);
 
-        Form form = new Form("form");
+        Form form = new Form(FORM);
         form.add(propView);
         form.add(userDetails);
         form.add(submit);
         form.add(cancel);
 
         MetaDataRoleAuthorizationStrategy.authorize(form, ENABLE, xmlRolesReader.getAllAllowedRoles("Approval",
-                "submit"));
+                SUBMIT));
 
         editUserWin = new ModalWindow("editUserWin");
         editUserWin.setCssClassName(ModalWindow.CSS_CLASS_GRAY);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BaseModalPage.java Sun May 19 20:30:21 2013
@@ -36,7 +36,7 @@ public abstract class BaseModalPage exte
     }
 
     @Override
-    public void renderHead(IHeaderResponse response) {
+    public void renderHead(final IHeaderResponse response) {
         super.renderHead(response);
         response.render(new PriorityHeaderItem(meta));
     }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BasePage.java Sun May 19 20:30:21 2013
@@ -22,7 +22,6 @@ import org.apache.syncope.common.to.User
 import org.apache.syncope.console.SyncopeApplication;
 import org.apache.syncope.console.SyncopeSession;
 import org.apache.syncope.console.commons.Constants;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.Component;
 import org.apache.wicket.Page;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -37,7 +36,6 @@ import org.apache.wicket.markup.html.Web
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.request.mapper.parameter.PageParameters;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Syncope Wicket base-page.
@@ -50,9 +48,6 @@ public class BasePage extends AbstractBa
 
     private final static int EDIT_PROFILE_WIN_WIDTH = 800;
 
-    @SpringBean
-    private UserRestClient userRestClient;
-
     public BasePage() {
         super();
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/BulkActionModalPage.java Sun May 19 20:30:21 2013
@@ -138,11 +138,11 @@ public class BulkActionModalPage<T, S> e
             }, action, pageId, !items.isEmpty());
         }
 
-        final Form form = new Form("form");
+        final Form form = new Form(FORM);
         add(form);
 
         final AjaxButton cancel =
-                new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), getPageReference()) {
+                new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Configuration.java Sun May 19 20:30:21 2013
@@ -157,26 +157,26 @@ public class Configuration extends BaseP
         wfForm.add(workflowDefArea);
 
         AjaxButton submit =
-                new ClearIndicatingAjaxButton("apply", new Model<String>(getString("submit")), getPageReference()) {
+                new ClearIndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT)), getPageReference()) {
 
-                    private static final long serialVersionUID = -958724007591692537L;
+            private static final long serialVersionUID = -958724007591692537L;
 
-                    @Override
-                    protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
-                        try {
-                            wfRestClient.updateDefinition(workflowDef);
-                            info(getString(Constants.OPERATION_SUCCEEDED));
-                        } catch (SyncopeClientCompositeErrorException scee) {
-                            error(getString(Constants.ERROR) + ":" + scee.getMessage());
-                        }
-                        target.add(feedbackPanel);
-                    }
+            @Override
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                try {
+                    wfRestClient.updateDefinition(workflowDef);
+                    info(getString(Constants.OPERATION_SUCCEEDED));
+                } catch (SyncopeClientCompositeErrorException scee) {
+                    error(getString(Constants.ERROR) + ":" + scee.getMessage());
+                }
+                target.add(feedbackPanel);
+            }
 
-                    @Override
-                    protected void onError(final AjaxRequestTarget target, final Form<?> form) {
-                        target.add(feedbackPanel);
-                    }
-                };
+            @Override
+            protected void onError(final AjaxRequestTarget target, final Form<?> form) {
+                target.add(feedbackPanel);
+            }
+        };
 
         MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, xmlRolesReader.getAllAllowedRoles("Configuration",
                 "workflowDefUpdate"));
@@ -660,7 +660,7 @@ public class Configuration extends BaseP
 
                         info(getString(Constants.OPERATION_SUCCEEDED));
                     } catch (SyncopeClientCompositeErrorException e) {
-                        info(getString("operation_error"));
+                        info(getString(Constants.OPERATION_ERROR));
                     }
 
                     target.add(feedbackPanel);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConfigurationModalPage.java Sun May 19 20:30:21 2013
@@ -58,7 +58,7 @@ public class ConfigurationModalPage exte
     public ConfigurationModalPage(final PageReference pageRef, final ModalWindow window,
             final ConfigurationTO configurationTO, final boolean createFlag) {
 
-        Form form = new Form("form", new CompoundPropertyModel(configurationTO));
+        Form form = new Form(FORM, new CompoundPropertyModel(configurationTO));
 
         final AjaxTextFieldPanel key = new AjaxTextFieldPanel("key", "key", new PropertyModel(configurationTO, "key"));
         form.add(key);
@@ -69,7 +69,7 @@ public class ConfigurationModalPage exte
                 "value"));
         form.add(value);
 
-        submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -103,7 +103,7 @@ public class ConfigurationModalPage exte
             }
         };
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnObjectModalPage.java Sun May 19 20:30:21 2013
@@ -43,7 +43,7 @@ public class ConnObjectModalPage extends
     public ConnObjectModalPage(final ConnObjectTO connObjectTO) {
         super();
 
-        final Form<Void> form = new Form<Void>("form");
+        final Form<Void> form = new Form<Void>(FORM);
         form.setEnabled(false);
         add(form);
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ConnectorModalPage.java Sun May 19 20:30:21 2013
@@ -137,7 +137,7 @@ public class ConnectorModalPage extends 
 
         // form - first tab
 
-        final Form<ConnInstanceTO> connectorForm = new Form<ConnInstanceTO>("form");
+        final Form<ConnInstanceTO> connectorForm = new Form<ConnInstanceTO>(FORM);
         connectorForm.setModel(new CompoundPropertyModel<ConnInstanceTO>(connInstanceTO));
         connectorForm.setOutputMarkupId(true);
         add(connectorForm);
@@ -398,7 +398,7 @@ public class ConnectorModalPage extends 
 
         // form - submit / cancel buttons
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -444,7 +444,7 @@ public class ConnectorModalPage extends 
         MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, roles);
         connectorForm.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DerivedSchemaModalPage.java Sun May 19 20:30:21 2013
@@ -45,7 +45,7 @@ public class DerivedSchemaModalPage exte
 
     private static final long serialVersionUID = 6668789770131753386L;
 
-    public DerivedSchemaModalPage(AttributableType kind) {
+    public DerivedSchemaModalPage(final AttributableType kind) {
         super(kind);
     }
 
@@ -57,7 +57,7 @@ public class DerivedSchemaModalPage exte
             schema = new DerivedSchemaTO();
         }
 
-        final Form schemaForm = new Form("form");
+        final Form schemaForm = new Form(FORM);
 
         schemaForm.setModel(new CompoundPropertyModel(schema));
 
@@ -79,7 +79,7 @@ public class DerivedSchemaModalPage exte
 
         name.setEnabled(createFlag);
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -89,9 +89,9 @@ public class DerivedSchemaModalPage exte
 
                 try {
                     if (createFlag) {
-                        restClient.createDerivedSchema(kind, schemaTO);
+                        schemaRestClient.createDerivedSchema(kind, schemaTO);
                     } else {
-                        restClient.updateDerivedSchema(kind, schemaTO);
+                        schemaRestClient.updateDerivedSchema(kind, schemaTO);
                     }
 
                     if (pageRef.getPage() instanceof BasePage) {
@@ -111,7 +111,7 @@ public class DerivedSchemaModalPage exte
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/DisplayAttributesModalPage.java Sun May 19 20:30:21 2013
@@ -139,7 +139,7 @@ public class DisplayAttributesModalPage 
         };
 
 
-        final Form form = new Form("form");
+        final Form form = new Form(FORM);
         form.setModel(new CompoundPropertyModel(this));
 
         selectedDetails = prefMan.getList(getRequest(), Constants.PREF_USERS_DETAILS_VIEW);
@@ -240,7 +240,7 @@ public class DisplayAttributesModalPage 
             vsgroup.add(virSchemas);
         }
 
-        final AjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
+        final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -4804368561204623354L;
 
@@ -278,7 +278,7 @@ public class DisplayAttributesModalPage 
 
         form.add(submit);
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/EditUserModalPage.java Sun May 19 20:30:21 2013
@@ -28,7 +28,6 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.panels.MembershipsPanel;
 import org.apache.syncope.console.pages.panels.ResourcesPanel;
 import org.apache.syncope.console.pages.panels.StatusPanel;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
@@ -36,7 +35,6 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with User form.
@@ -45,9 +43,6 @@ public class EditUserModalPage extends U
 
     private static final long serialVersionUID = -6479209496805705739L;
 
-    @SpringBean
-    private UserRestClient userRestClient;
-
     protected Form form;
 
     private UserTO initialUserTO = null;
@@ -102,6 +97,6 @@ public class EditUserModalPage extends U
 
     @Override
     protected void closeAction(final AjaxRequestTarget target, final Form form) {
-        setResponsePage(new ResultStatusModalPage(window, mode, userTO));
+        setResponsePage(new ResultStatusModalPage.Builder(window, userTO).mode(mode).build());
     }
 }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/MembershipModalPage.java Sun May 19 20:30:21 2013
@@ -47,7 +47,7 @@ public class MembershipModalPage extends
 
         form.setModel(new CompoundPropertyModel(membershipTO));
 
-        submit = new AjaxButton("submit", new ResourceModel("submit")) {
+        submit = new AjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -69,7 +69,7 @@ public class MembershipModalPage extends
 
         form.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/NotificationModalPage.java Sun May 19 20:30:21 2013
@@ -32,7 +32,6 @@ import org.apache.syncope.common.validat
 import org.apache.syncope.console.commons.Constants;
 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;
@@ -61,13 +60,10 @@ class NotificationModalPage extends Base
     @SpringBean
     private NotificationRestClient restClient;
 
-    @SpringBean
-    private SchemaRestClient schemaRestClient;
-
     public NotificationModalPage(final PageReference pageRef, final ModalWindow window,
             final NotificationTO notificationTO, final boolean createFlag) {
 
-        Form form = new Form("form", new CompoundPropertyModel(notificationTO));
+        Form form = new Form(FORM, new CompoundPropertyModel(notificationTO));
         form.setModel(new CompoundPropertyModel(notificationTO));
 
         final AjaxTextFieldPanel sender = new AjaxTextFieldPanel("sender", getString("sender"),
@@ -185,7 +181,7 @@ class NotificationModalPage extends Base
             }
         });
 
-        AjaxButton submit = new IndicatingAjaxButton("apply", new Model<String>(getString("submit"))) {
+        AjaxButton submit = new IndicatingAjaxButton(APPLY, new Model<String>(getString(SUBMIT))) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -219,7 +215,7 @@ class NotificationModalPage extends Base
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/PolicyModalPage.java Sun May 19 20:30:21 2013
@@ -57,7 +57,7 @@ public class PolicyModalPage<T extends P
     public PolicyModalPage(final ModalWindow window, final T policyTO, final PageReference pageRef) {
         super();
 
-        final Form form = new Form("form");
+        final Form form = new Form(FORM);
         form.setOutputMarkupId(true);
         add(form);
 
@@ -103,7 +103,7 @@ public class PolicyModalPage<T extends P
 
         form.add(new PolicyBeanPanel("panel", policy));
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(APPLY)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -135,7 +135,7 @@ public class PolicyModalPage<T extends P
 
         form.add(submit);
 
-        final IndicatingAjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final IndicatingAjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportModalPage.java Sun May 19 20:30:21 2013
@@ -35,7 +35,6 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.commons.HttpResourceStream;
 import org.apache.syncope.console.commons.SortableDataProviderComparator;
 import org.apache.syncope.console.markup.html.CrontabContainer;
-import org.apache.syncope.console.rest.ReportRestClient;
 import org.apache.syncope.console.wicket.ajax.form.AbstractAjaxDownloadBehavior;
 import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
@@ -96,9 +95,6 @@ public class ReportModalPage extends Bas
 
     private static final int REPORTLET_CONF_WIN_WIDTH = 800;
 
-    @SpringBean
-    private ReportRestClient restClient;
-
     @SpringBean(name = "baseURL")
     protected String baseURL;
 
@@ -119,7 +115,7 @@ public class ReportModalPage extends Bas
     public ReportModalPage(final ModalWindow window, final ReportTO reportTO, final PageReference callerPageRef) {
         this.reportTO = reportTO;
 
-        form = new Form<ReportTO>("form");
+        form = new Form<ReportTO>(FORM);
         form.setModel(new CompoundPropertyModel(reportTO));
         add(form);
 
@@ -131,7 +127,7 @@ public class ReportModalPage extends Bas
         form.add(crontab);
 
         final AjaxButton submit =
-                new ClearIndicatingAjaxButton("apply", new ResourceModel("apply"), getPageReference()) {
+                new ClearIndicatingAjaxButton(APPLY, new ResourceModel(APPLY), getPageReference()) {
 
                     private static final long serialVersionUID = -958724007591692537L;
 
@@ -144,9 +140,9 @@ public class ReportModalPage extends Bas
 
                         try {
                             if (reportTO.getId() > 0) {
-                                restClient.update(reportTO);
+                                reportRestClient.update(reportTO);
                             } else {
-                                restClient.create(reportTO);
+                                reportRestClient.create(reportTO);
                             }
 
                             ((BasePage) callerPageRef.getPage()).setModalResult(true);
@@ -176,7 +172,7 @@ public class ReportModalPage extends Bas
         form.add(submit);
 
         final AjaxButton cancel =
-                new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), getPageReference()) {
+                new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), getPageReference()) {
 
                     private static final long serialVersionUID = -958724007591692537L;
 
@@ -507,7 +503,7 @@ public class ReportModalPage extends Bas
                     @Override
                     public void onClick(final AjaxRequestTarget target) {
                         try {
-                            restClient.deleteExecution(taskExecutionTO.getId());
+                            reportRestClient.deleteExecution(taskExecutionTO.getId());
 
                             reportTO.removeExecution(taskExecutionTO);
 
@@ -537,7 +533,7 @@ public class ReportModalPage extends Bas
                         if (target != null) {
                             final ReportTO currentReportTO = reportTO.getId() == 0
                                     ? reportTO
-                                    : restClient.read(reportTO.getId());
+                                    : reportRestClient.read(reportTO.getId());
                             reportTO.setExecutions(currentReportTO.getExecutions());
                             final AjaxFallbackDefaultDataTable currentTable =
                                     new AjaxFallbackDefaultDataTable("executionsTable", columns,
@@ -547,7 +543,7 @@ public class ReportModalPage extends Bas
                             executions.addOrReplace(currentTable);
                         }
                     }
-                }, ActionLink.ActionType.RELOAD, "Tasks", "list");
+                }, ActionLink.ActionType.RELOAD, TASKS, "list");
 
                 return panel;
             }
@@ -627,7 +623,7 @@ public class ReportModalPage extends Bas
 
         private void createResourceStream() {
             if (stream == null) {
-                stream = new HttpResourceStream(restClient.exportExecutionResult(exportExecId, exportFormat));
+                stream = new HttpResourceStream(reportRestClient.exportExecutionResult(exportExecId, exportFormat));
             }
         }
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ReportletConfModalPage.java Sun May 19 20:30:21 2013
@@ -33,8 +33,6 @@ import org.apache.syncope.common.report.
 import org.apache.syncope.common.search.NodeCond;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
-import org.apache.syncope.console.rest.ReportRestClient;
-import org.apache.syncope.console.rest.SchemaRestClient;
 import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
@@ -64,7 +62,6 @@ import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.model.util.ListModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.springframework.beans.BeanWrapper;
 import org.springframework.beans.PropertyAccessorFactory;
 import org.springframework.util.ClassUtils;
@@ -76,16 +73,8 @@ public class ReportletConfModalPage exte
     private static final String[] EXCLUDE_PROPERTIES = new String[]{"serialVersionUID", "class", "name",
         "reportletClassName"};
 
-    @SpringBean
-    private ReportRestClient restClient;
-
-    @SpringBean
-    private SchemaRestClient schemaRestClient;
-
     private AbstractReportletConf reportletConf;
 
-    private final PageReference pageRef;
-
     private final AjaxTextFieldPanel name;
 
     private WebMarkupContainer propertiesContainer;
@@ -96,9 +85,8 @@ public class ReportletConfModalPage exte
             final PageReference pageRef) {
 
         this.reportletConf = reportletConf;
-        this.pageRef = pageRef;
 
-        Form form = new Form("form");
+        final Form form = new Form(FORM);
         add(form);
 
         propertiesContainer = new WebMarkupContainer("container");
@@ -140,7 +128,7 @@ public class ReportletConfModalPage exte
             }
         });
         reportletClass.setStyleSheet("long_dynamicsize");
-        reportletClass.setChoices(restClient.getReportletConfClasses());
+        reportletClass.setChoices(reportRestClient.getReportletConfClasses());
         ((DropDownChoice) reportletClass.getField()).setNullValid(true);
         reportletClass.addRequiredLabel();
         reportletClass.getField().add(new AjaxFormComponentUpdatingBehavior(SyncopeConstants.ON_CHANGE) {
@@ -158,7 +146,7 @@ public class ReportletConfModalPage exte
 
         propertiesContainer.add(buildPropView());
 
-        final AjaxButton submit = new AjaxButton("apply", new ResourceModel("apply")) {
+        final AjaxButton submit = new AjaxButton(APPLY, new ResourceModel(APPLY)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -192,7 +180,7 @@ public class ReportletConfModalPage exte
         };
         form.add(submit);
 
-        final AjaxButton cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), pageRef) {
+        final AjaxButton cancel = new ClearIndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL), pageRef) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -266,7 +254,7 @@ public class ReportletConfModalPage exte
                     field = ReportletConfModalPage.this.reportletConf.getClass().getDeclaredField(fieldName);
                 } catch (Exception e) {
                     LOG.error("Could not find field {} in class {}", new Object[]{fieldName,
-                                ReportletConfModalPage.this.reportletConf.getClass(), e});
+                        ReportletConfModalPage.this.reportletConf.getClass(), e});
                 }
                 if (field == null) {
                     return;

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Reports.java Sun May 19 20:30:21 2013
@@ -220,7 +220,7 @@ public class Reports extends BasePage {
                             target.add(reportContainer);
                         }
                     }
-                }, ActionLink.ActionType.RELOAD, "Tasks", "list");
+                }, ActionLink.ActionType.RELOAD, TASKS, "list");
 
                 return panel;
             }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResourceModalPage.java Sun May 19 20:30:21 2013
@@ -27,7 +27,6 @@ import org.apache.syncope.console.pages.
 import org.apache.syncope.console.pages.panels.ResourceDetailsPanel;
 import org.apache.syncope.console.pages.panels.ResourceMappingPanel;
 import org.apache.syncope.console.pages.panels.ResourceSecurityPanel;
-import org.apache.syncope.console.rest.ResourceRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -39,7 +38,6 @@ import org.apache.wicket.markup.html.for
 import org.apache.wicket.model.CompoundPropertyModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with Resource form.
@@ -48,9 +46,6 @@ public class ResourceModalPage extends B
 
     private static final long serialVersionUID = 1734415311027284221L;
 
-    @SpringBean
-    private ResourceRestClient restClient;
-
     public ResourceModalPage(final PageReference pageRef, final ModalWindow window, final ResourceTO resourceTO,
             final boolean createFlag) {
 
@@ -64,14 +59,14 @@ public class ResourceModalPage extends B
                 ? ""
                 : resourceTO.getName()));
 
-        final Form form = new Form("form");
+        final Form form = new Form(FORM);
         form.setModel(new CompoundPropertyModel(resourceTO));
 
         //--------------------------------
         // Resource details panel
         //--------------------------------
         form.add(new ResourceDetailsPanel("details", resourceTO,
-                restClient.getPropagationActionsClasses(), createFlag));
+                resourceRestClient.getPropagationActionsClasses(), createFlag));
         //--------------------------------
 
         //--------------------------------
@@ -93,7 +88,7 @@ public class ResourceModalPage extends B
         form.add(new ResourceSecurityPanel("security", resourceTO));
         //--------------------------------
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit", "submit")) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT, SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -133,9 +128,9 @@ public class ResourceModalPage extends B
                 } else {
                     try {
                         if (createFlag) {
-                            restClient.create(resourceTO);
+                            resourceRestClient.create(resourceTO);
                         } else {
-                            restClient.update(resourceTO);
+                            resourceRestClient.update(resourceTO);
                         }
 
                         ((Resources) pageRef.getPage()).setModalResult(true);
@@ -157,7 +152,7 @@ public class ResourceModalPage extends B
         form.add(submit);
         form.setDefaultButton(submit);
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/ResultStatusModalPage.java Sun May 19 20:30:21 2013
@@ -18,6 +18,9 @@
  */
 package org.apache.syncope.console.pages;
 
+import static org.apache.syncope.common.types.PropagationTaskExecStatus.CREATED;
+import static org.apache.syncope.common.types.PropagationTaskExecStatus.SUBMITTED;
+import static org.apache.syncope.common.types.PropagationTaskExecStatus.SUCCESS;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashSet;
@@ -34,8 +37,9 @@ import org.apache.syncope.common.types.P
 import org.apache.syncope.console.commons.ConnIdSpecialAttributeName;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.StatusUtils;
-import org.apache.syncope.console.rest.UserRestClient;
+import org.apache.syncope.console.pages.panels.RolePanel;
 import org.apache.wicket.Component;
+import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.behavior.Behavior;
@@ -44,12 +48,12 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.markup.ComponentTag;
 import org.apache.wicket.markup.html.WebMarkupContainer;
 import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.image.Image;
 import org.apache.wicket.markup.html.list.ListItem;
 import org.apache.wicket.markup.html.list.ListView;
 import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Show user or role status after performing a successful operation.
@@ -60,135 +64,151 @@ public class ResultStatusModalPage exten
 
     private static final String IMG_STATUSES = "statuses/";
 
-    @SpringBean
-    private UserRestClient userRestClient;
-
     private final AbstractAttributableTO attributable;
 
+    private final UserModalPage.Mode mode;
+
     /**
      * Status management utilities.
      */
     private final StatusUtils statusUtils;
 
-    public ResultStatusModalPage(final ModalWindow window, final AbstractAttributableTO attributable) {
-        this(window, UserModalPage.Mode.ADMIN, attributable);
-    }
+    public static class Builder {
 
-    /**
-     * @param window guest modal window.
-     * @param mode operation mode.
-     * @param attributable User TO.
-     */
-    public ResultStatusModalPage(final ModalWindow window, final UserModalPage.Mode mode,
-            final AbstractAttributableTO attributable) {
+        private ModalWindow window;
 
-        super();
-        this.attributable = attributable;
-        statusUtils = new StatusUtils(this.userRestClient);
+        private UserModalPage.Mode mode;
 
-        final BaseModalPage page = this;
+        private AbstractAttributableTO attributable;
 
-        final WebMarkupContainer container = new WebMarkupContainer("container");
-        container.setOutputMarkupId(true);
-        add(container);
-
-        final Fragment fragment = new Fragment("resultFrag", mode == UserModalPage.Mode.SELF
-                ? "userRequestResultFrag"
-                : "propagationResultFrag", this);
-        fragment.setOutputMarkupId(true);
-        container.add(fragment);
-
-        if (mode == UserModalPage.Mode.ADMIN) {
-            // add Syncope propagation status
-            PropagationStatusTO syncope = new PropagationStatusTO();
-            syncope.setResource("Syncope");
-            syncope.setStatus(PropagationTaskExecStatus.SUCCESS);
-
-            List<PropagationStatusTO> propagations = new ArrayList<PropagationStatusTO>();
-            propagations.add(syncope);
-            propagations.addAll(attributable.getPropagationStatusTOs());
-
-            fragment.add(new Label("info",
-                    ((attributable instanceof UserTO) && ((UserTO) attributable).getUsername() != null)
-                    ? ((UserTO) attributable).getUsername()
-                    : ((attributable instanceof RoleTO) && ((RoleTO) attributable).getName() != null)
-                    ? ((RoleTO) attributable).getName()
-                    : String.valueOf(attributable.getId())));
-
-            final ListView<PropagationStatusTO> propRes = new ListView<PropagationStatusTO>("resources", propagations) {
+        public Builder(final ModalWindow window, final AbstractAttributableTO attributable) {
+            this.window = window;
+            this.attributable = attributable;
+        }
 
-                private static final long serialVersionUID = -1020475259727720708L;
+        public ResultStatusModalPage.Builder mode(final UserModalPage.Mode mode) {
+            this.mode = mode;
+            return this;
+        }
 
-                @Override
-                protected void populateItem(final ListItem<PropagationStatusTO> item) {
-                    final PropagationStatusTO propTO = (PropagationStatusTO) item.getDefaultModelObject();
+        public ResultStatusModalPage build() {
+            return new ResultStatusModalPage(this);
+        }
+    }
 
-                    final ListView attributes = getConnObjectView(propTO);
+    private ResultStatusModalPage(final Builder builder) {
+        super();
+        this.attributable = builder.attributable;
+        statusUtils = new StatusUtils(this.userRestClient);
+        if (builder.mode == null) {
+            this.mode = UserModalPage.Mode.ADMIN;
+        } else {
+            this.mode = builder.mode;
+            final BaseModalPage page = this;
 
-                    final Fragment attrhead;
-                    if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
-                        attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", page);
-                    } else {
-                        attrhead = new Fragment("attrhead", "attrHeadFrag", page);
-                    }
+            final WebMarkupContainer container = new WebMarkupContainer("container");
+            container.setOutputMarkupId(true);
+            add(container);
+
+            final Fragment fragment = new Fragment("resultFrag", mode == UserModalPage.Mode.SELF
+                    ? "userRequestResultFrag"
+                    : "propagationResultFrag", this);
+            fragment.setOutputMarkupId(true);
+            container.add(fragment);
+
+            if (mode == UserModalPage.Mode.ADMIN) {
+                // add Syncope propagation status
+                PropagationStatusTO syncope = new PropagationStatusTO();
+                syncope.setResource("Syncope");
+                syncope.setStatus(PropagationTaskExecStatus.SUCCESS);
+
+                List<PropagationStatusTO> propagations = new ArrayList<PropagationStatusTO>();
+                propagations.add(syncope);
+                propagations.addAll(attributable.getPropagationStatusTOs());
+
+                fragment.add(new Label("info",
+                        ((attributable instanceof UserTO) && ((UserTO) attributable).getUsername() != null)
+                        ? ((UserTO) attributable).getUsername()
+                        : ((attributable instanceof RoleTO) && ((RoleTO) attributable).getName() != null)
+                        ? ((RoleTO) attributable).getName()
+                        : String.valueOf(attributable.getId())));
+
+                final ListView<PropagationStatusTO> propRes = new ListView<PropagationStatusTO>("resources",
+                        propagations) {
+
+                    private static final long serialVersionUID = -1020475259727720708L;
+
+                    @Override
+                    protected void populateItem(final ListItem<PropagationStatusTO> item) {
+                        final PropagationStatusTO propTO = (PropagationStatusTO) item.getDefaultModelObject();
+
+                        final ListView attributes = getConnObjectView(propTO);
+
+                        final Fragment attrhead;
+                        if (attributes.getModelObject() == null || attributes.getModelObject().isEmpty()) {
+                            attrhead = new Fragment("attrhead", "emptyAttrHeadFrag", page);
+                        } else {
+                            attrhead = new Fragment("attrhead", "attrHeadFrag", page);
+                        }
 
-                    item.add(attrhead);
-                    item.add(attributes);
+                        item.add(attrhead);
+                        item.add(attributes);
 
-                    attrhead.add(new Label("resource", propTO.getResource()));
+                        attrhead.add(new Label("resource", propTO.getResource()));
 
-                    attrhead.add(new Label("propagation", propTO.getStatus() == null
-                            ? "UNDEFINED" : propTO.getStatus().toString()));
+                        attrhead.add(new Label("propagation", propTO.getStatus() == null
+                                ? "UNDEFINED" : propTO.getStatus().toString()));
 
-                    final Image image;
-                    final String alt, title;
-                    switch (propTO.getStatus()) {
-
-                        case SUCCESS:
-                        case SUBMITTED:
-                        case CREATED:
-                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
-                                    + Constants.PNG_EXT);
-                            alt = "success icon";
-                            title = "success";
-                            break;
-
-                        default:
-                            image = new Image("icon", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
-                                    + Constants.PNG_EXT);
-                            alt = "failure icon";
-                            title = "failure";
-                    }
+                        final Image image;
+                        final String alt, title;
+                        switch (propTO.getStatus()) {
+
+                            case SUCCESS:
+                            case SUBMITTED:
+                            case CREATED:
+                                image = new Image("icon", IMG_STATUSES + StatusUtils.Status.ACTIVE.toString()
+                                        + Constants.PNG_EXT);
+                                alt = "success icon";
+                                title = "success";
+                                break;
+
+                            default:
+                                image = new Image("icon", IMG_STATUSES + StatusUtils.Status.SUSPENDED.toString()
+                                        + Constants.PNG_EXT);
+                                alt = "failure icon";
+                                title = "failure";
+                        }
 
-                    image.add(new Behavior() {
+                        image.add(new Behavior() {
 
-                        private static final long serialVersionUID = 1469628524240283489L;
+                            private static final long serialVersionUID = 1469628524240283489L;
 
-                        @Override
-                        public void onComponentTag(final Component component, final ComponentTag tag) {
-                            tag.put("alt", alt);
-                            tag.put("title", title);
-                        }
-                    });
+                            @Override
+                            public void onComponentTag(final Component component, final ComponentTag tag) {
+                                tag.put("alt", alt);
+                                tag.put("title", title);
+                            }
+                        });
 
-                    attrhead.add(image);
-                }
-            };
-            fragment.add(propRes);
-        }
+                        attrhead.add(image);
+                    }
+                };
+                fragment.add(propRes);
+            }
 
-        final AjaxLink close = new IndicatingAjaxLink("close") {
+            final AjaxLink close = new IndicatingAjaxLink("close") {
 
-            private static final long serialVersionUID = -7978723352517770644L;
+                private static final long serialVersionUID = -7978723352517770644L;
 
-            @Override
-            public void onClick(final AjaxRequestTarget target) {
-                window.close(target);
-            }
-        };
-        container.add(close);
+                @Override
+                public void onClick(final AjaxRequestTarget target) {
+                    builder.window.close(target);
+                }
+            };
+            container.add(close);
 
-        setOutputMarkupId(true);
+            setOutputMarkupId(true);
+        }
     }
 
     /**

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleModalPage.java Sun May 19 20:30:21 2013
@@ -97,7 +97,7 @@ public class RoleModalPage extends BaseM
                 .pageRef(getPageReference()).build();
         form.add(rolePanel);
 
-        final AjaxButton submit = new IndicatingAjaxButton("submit", new ResourceModel("submit")) {
+        final AjaxButton submit = new IndicatingAjaxButton(SUBMIT, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -123,7 +123,7 @@ public class RoleModalPage extends BaseM
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -167,7 +167,7 @@ public class RoleModalPage extends BaseM
             }
         }
 
-        setResponsePage(new ResultStatusModalPage(window, result));
+        setResponsePage(new ResultStatusModalPage.Builder(window, result).build());
     }
 
     protected void closeAction(final AjaxRequestTarget target, final Form form) {

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleTemplateModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleTemplateModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleTemplateModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/RoleTemplateModalPage.java Sun May 19 20:30:21 2013
@@ -20,20 +20,15 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.SyncTaskTO;
-import org.apache.syncope.console.rest.TaskRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 public class RoleTemplateModalPage extends RoleModalPage {
 
     private static final long serialVersionUID = -3849135555203409845L;
 
-    @SpringBean
-    private TaskRestClient taskRestClient;
-
     private SyncTaskTO syncTaskTO;
 
     public RoleTemplateModalPage(final PageReference callerPageRef, final ModalWindow window,

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Roles.java Sun May 19 20:30:21 2013
@@ -85,7 +85,7 @@ public class Roles extends BasePage {
                         : summaryPanel.getSelectedNode().getId());
 
                 send(getPage(), Broadcast.BREADTH, data);
-                
+
                 if (modalResult) {
                     getSession().info(getString(Constants.OPERATION_SUCCEEDED));
                     target.add(feedbackPanel);
@@ -130,7 +130,7 @@ public class Roles extends BasePage {
             final AbstractSearchResultPanel resultsetPanel) {
 
         if (searchCond == null || !searchCond.isValid()) {
-            error(getString("search_error"));
+            error(getString(Constants.SEARCH_ERROR));
             return;
         }
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SchemaModalPage.java Sun May 19 20:30:21 2013
@@ -64,7 +64,7 @@ public class SchemaModalPage extends Abs
 
     private static final long serialVersionUID = -5991561277287424057L;
 
-    public SchemaModalPage(AttributableType kind) {
+    public SchemaModalPage(final AttributableType kind) {
         super(kind);
     }
 
@@ -79,7 +79,7 @@ public class SchemaModalPage extends Abs
             schema = new SchemaTO();
         }
 
-        final Form schemaForm = new Form("form");
+        final Form schemaForm = new Form(FORM);
 
         schemaForm.setModel(new CompoundPropertyModel(schema));
         schemaForm.setOutputMarkupId(Boolean.TRUE);
@@ -99,7 +99,7 @@ public class SchemaModalPage extends Abs
 
             @Override
             protected List<String> load() {
-                return restClient.getAllValidatorClasses();
+                return schemaRestClient.getAllValidatorClasses();
             }
         };
 
@@ -224,7 +224,7 @@ public class SchemaModalPage extends Abs
         final AjaxCheckBoxPanel uniqueConstraint = new AjaxCheckBoxPanel("uniqueConstraint",
                 getString("uniqueConstraint"), new PropertyModel<Boolean>(schema, "uniqueConstraint"));
 
-        final AjaxButton submit = new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        final AjaxButton submit = new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -243,9 +243,9 @@ public class SchemaModalPage extends Abs
 
                 try {
                     if (createFlag) {
-                        restClient.createSchema(kind, schemaTO);
+                        schemaRestClient.createSchema(kind, schemaTO);
                     } else {
-                        restClient.updateSchema(kind, schemaTO);
+                        schemaRestClient.updateSchema(kind, schemaTO);
                     }
                     if (pageRef.getPage() instanceof BasePage) {
                         ((BasePage) pageRef.getPage()).setModalResult(true);
@@ -264,7 +264,7 @@ public class SchemaModalPage extends Abs
             }
         };
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 
@@ -276,13 +276,9 @@ public class SchemaModalPage extends Abs
 
         cancel.setDefaultFormProcessing(false);
 
-        String allowedRoles;
-
-        if (createFlag) {
-            allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema", "create");
-        } else {
-            allowedRoles = xmlRolesReader.getAllAllowedRoles("Schema", "update");
-        }
+        String allowedRoles = createFlag
+                ? xmlRolesReader.getAllAllowedRoles("Schema", "create")
+                : xmlRolesReader.getAllAllowedRoles("Schema", "update");
 
         MetaDataRoleAuthorizationStrategy.authorize(submit, ENABLE, allowedRoles);
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java Sun May 19 20:30:21 2013
@@ -25,7 +25,6 @@ import org.apache.syncope.common.to.User
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.StatusBean;
 import org.apache.syncope.console.pages.panels.StatusPanel;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.form.AjaxButton;
@@ -34,21 +33,17 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 public class StatusModalPage extends BaseModalPage {
 
     private static final long serialVersionUID = 4114026480146090961L;
 
-    @SpringBean
-    private UserRestClient userRestClient;
-
     public StatusModalPage(final PageReference pageRef, final ModalWindow window,
             final AbstractAttributableTO attributable) {
 
         super();
 
-        final Form form = new Form("form");
+        final Form form = new Form(FORM);
         add(form);
 
         final List<StatusBean> statuses = new ArrayList<StatusBean>();
@@ -133,7 +128,7 @@ public class StatusModalPage extends Bas
         }
         form.add(enable);
 
-        final AjaxButton cancel = new IndicatingAjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new IndicatingAjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/SyncTaskModalPage.java Sun May 19 20:30:21 2013
@@ -23,7 +23,6 @@ import java.util.List;
 import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.to.SyncTaskTO;
 import org.apache.syncope.console.commons.SelectChoiceRenderer;
-import org.apache.syncope.console.rest.ResourceRestClient;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.syncope.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
 import org.apache.wicket.PageReference;
@@ -31,7 +30,6 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.LoadableDetachableModel;
 import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with Task form (to stop and start execution).
@@ -40,9 +38,6 @@ public class SyncTaskModalPage extends A
 
     private static final long serialVersionUID = 2148403203517274669L;
 
-    @SpringBean
-    private ResourceRestClient resourceRestClient;
-
     public SyncTaskModalPage(final ModalWindow window, final SyncTaskTO taskTO, final PageReference pageRef) {
 
         super(window, taskTO, pageRef);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/TaskModalPage.java Sun May 19 20:30:21 2013
@@ -31,7 +31,6 @@ import org.apache.syncope.common.to.Task
 import org.apache.syncope.common.validation.SyncopeClientCompositeErrorException;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.SortableDataProviderComparator;
-import org.apache.syncope.console.rest.TaskRestClient;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn;
 import org.apache.syncope.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
@@ -55,7 +54,6 @@ import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.model.PropertyModel;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 import org.springframework.util.StringUtils;
 
 /**
@@ -65,9 +63,6 @@ public abstract class TaskModalPage exte
 
     private static final long serialVersionUID = -4110576026663173545L;
 
-    @SpringBean
-    protected TaskRestClient taskRestClient;
-
     protected WebMarkupContainer profile;
 
     protected WebMarkupContainer executions;
@@ -80,7 +75,7 @@ public abstract class TaskModalPage exte
         taskExecMessageWin.setCookieName("task-exec-message-win-modal");
         add(taskExecMessageWin);
 
-        form = new Form("form");
+        form = new Form(FORM);
         form.setModel(new CompoundPropertyModel(taskTO));
         add(form);
 
@@ -141,7 +136,7 @@ public abstract class TaskModalPage exte
                         });
                         taskExecMessageWin.show(target);
                     }
-                }, ActionLink.ActionType.EDIT, "Tasks", StringUtils.hasText(model.getObject().getMessage()));
+                }, ActionLink.ActionType.EDIT, TASKS, StringUtils.hasText(model.getObject().getMessage()));
 
                 panel.add(new ActionLink() {
 
@@ -162,7 +157,7 @@ public abstract class TaskModalPage exte
                         target.add(feedbackPanel);
                         target.add(executions);
                     }
-                }, ActionLink.ActionType.DELETE, "Tasks");
+                }, ActionLink.ActionType.DELETE, TASKS);
 
                 return panel;
             }
@@ -186,7 +181,7 @@ public abstract class TaskModalPage exte
                             executions.addOrReplace(currentTable);
                         }
                     }
-                }, ActionLink.ActionType.RELOAD, "Tasks", "list");
+                }, ActionLink.ActionType.RELOAD, TASKS, "list");
 
                 return panel;
             }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/Tasks.java Sun May 19 20:30:21 2013
@@ -213,7 +213,7 @@ public class Tasks extends BasePage {
                     ActionLink.ActionType.DELETE, ActionLink.ActionType.DRYRUN, ActionLink.ActionType.EXECUTE}),
                 restClient,
                 "id",
-                "Tasks",
+                TASKS,
                 pageRef);
 
         table.setCurrentPage(currentPage);

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserModalPage.java Sun May 19 20:30:21 2013
@@ -158,7 +158,7 @@ public abstract class UserModalPage exte
         form.add(submit);
         form.setDefaultButton(submit);
 
-        final AjaxButton cancel = new AjaxButton("cancel", new ResourceModel("cancel")) {
+        final AjaxButton cancel = new AjaxButton(CANCEL, new ResourceModel(CANCEL)) {
 
             private static final long serialVersionUID = 530608535790823587L;
 
@@ -179,7 +179,7 @@ public abstract class UserModalPage exte
     }
 
     protected AjaxButton getOnSubmit() {
-        return new IndicatingAjaxButton("apply", new ResourceModel("submit")) {
+        return new IndicatingAjaxButton(APPLY, new ResourceModel(SUBMIT)) {
 
             private static final long serialVersionUID = -958724007591692537L;
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserOwnerSelectModalPage.java Sun May 19 20:30:21 2013
@@ -19,10 +19,10 @@
 package org.apache.syncope.console.pages;
 
 import org.apache.syncope.common.search.NodeCond;
+import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.pages.panels.AbstractSearchResultPanel;
 import org.apache.syncope.console.pages.panels.SelectOnlyUserSearchResultPanel;
 import org.apache.syncope.console.pages.panels.UserSearchPanel;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.Session;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -30,20 +30,16 @@ import org.apache.wicket.extensions.ajax
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.model.ResourceModel;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 public class UserOwnerSelectModalPage extends BaseModalPage {
 
     private static final long serialVersionUID = 2106489458494696439L;
 
-    @SpringBean
-    private UserRestClient restClient;
-
     public UserOwnerSelectModalPage(final PageReference pageRef, final ModalWindow window) {
         super();
 
         final SelectOnlyUserSearchResultPanel searchResult =
-                new SelectOnlyUserSearchResultPanel("searchResult", true, null, pageRef, window, restClient);
+                new SelectOnlyUserSearchResultPanel("searchResult", true, null, pageRef, window, userRestClient);
         add(searchResult);
 
         final Form searchForm = new Form("searchForm");
@@ -77,7 +73,7 @@ public class UserOwnerSelectModalPage ex
             final AbstractSearchResultPanel resultsetPanel) {
 
         if (searchCond == null || !searchCond.isValid()) {
-            error(getString("search_error"));
+            error(getString(Constants.SEARCH_ERROR));
             return;
         }
 

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserRequestModalPage.java Sun May 19 20:30:21 2013
@@ -23,7 +23,6 @@ import org.apache.syncope.common.to.User
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.util.AttributableOperations;
 import org.apache.syncope.console.rest.UserRequestRestClient;
-import org.apache.syncope.console.rest.UserRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
@@ -38,9 +37,6 @@ public class UserRequestModalPage extend
     private static final long serialVersionUID = 603212869211672852L;
 
     @SpringBean
-    private UserRestClient userRestClient;
-
-    @SpringBean
     private UserRequestRestClient requestRestClient;
 
     private UserTO initialUserTO;
@@ -130,6 +126,6 @@ public class UserRequestModalPage extend
 
     @Override
     protected void closeAction(final AjaxRequestTarget target, final Form form) {
-        setResponsePage(new ResultStatusModalPage(window, mode, userTO));
+        setResponsePage(new ResultStatusModalPage.Builder(window, userTO).mode(mode).build());
     }
 }

Modified: syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserTemplateModalPage.java
URL: http://svn.apache.org/viewvc/syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserTemplateModalPage.java?rev=1484346&r1=1484345&r2=1484346&view=diff
==============================================================================
--- syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserTemplateModalPage.java (original)
+++ syncope/branches/1_1_X/console/src/main/java/org/apache/syncope/console/pages/UserTemplateModalPage.java Sun May 19 20:30:21 2013
@@ -20,12 +20,10 @@ package org.apache.syncope.console.pages
 
 import org.apache.syncope.common.to.SyncTaskTO;
 import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.console.rest.TaskRestClient;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.spring.injection.annot.SpringBean;
 
 /**
  * Modal window with User form.
@@ -34,9 +32,6 @@ public class UserTemplateModalPage exten
 
     private static final long serialVersionUID = 511003221213581368L;
 
-    @SpringBean
-    private TaskRestClient taskRestClient;
-
     private SyncTaskTO syncTaskTO;
 
     public UserTemplateModalPage(final PageReference callerPageRef, final ModalWindow window,



Mime
View raw message