syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmarte...@apache.org
Subject svn commit: r1554031 [1/2] - in /syncope/trunk: common/src/main/java/org/apache/syncope/common/mod/ common/src/main/java/org/apache/syncope/common/reqres/ common/src/main/java/org/apache/syncope/common/services/ common/src/main/java/org/apache/syncope/...
Date Sun, 29 Dec 2013 15:12:12 GMT
Author: fmartelli
Date: Sun Dec 29 15:12:11 2013
New Revision: 1554031

URL: http://svn.apache.org/r1554031
Log:
Fixes SYNCOPE-428

Added:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java
      - copied, changed from r1551501, syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceDeAssociationActionType.java
      - copied, changed from r1551501, syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
    syncope/trunk/console/src/main/webapp/img/actions/assign-icon.png   (with props)
    syncope/trunk/console/src/main/webapp/img/actions/link-icon.png   (with props)
    syncope/trunk/console/src/main/webapp/img/actions/provision-icon.png   (with props)
Modified:
    syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkAssociationAction.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java
    syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ProvisioningModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ActionDataTablePanel.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLink.java
    syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_pt_BR.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/AbstractStatusModalPage.html
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/AbstractStatusModalPage.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/AbstractStatusModalPage_it.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/pages/AbstractStatusModalPage_pt_BR.properties
    syncope/trunk/console/src/main/resources/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.html
    syncope/trunk/console/src/main/webapp/img/actions/unassign-icon.png
    syncope/trunk/console/src/test/java/org/apache/syncope/console/UserTestITCase.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/propagation/impl/PropagationManager.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/AbstractResourceAssociator.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/RoleController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/rest/controller/UserController.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/RoleServiceImpl.java
    syncope/trunk/core/src/main/java/org/apache/syncope/core/services/UserServiceImpl.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/RoleTestITCase.java
    syncope/trunk/core/src/test/java/org/apache/syncope/core/rest/UserTestITCase.java

Copied: syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java (from r1551501, syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java?p2=syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java&p1=syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java&r1=1551501&r2=1554031&rev=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ReferenceMod.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/mod/ResourceAssociationMod.java Sun Dec 29 15:12:11 2013
@@ -18,37 +18,64 @@
  */
 package org.apache.syncope.common.mod;
 
+import java.util.ArrayList;
+import java.util.List;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 
 import org.apache.syncope.common.AbstractBaseBean;
+import org.apache.syncope.common.wrap.ResourceName;
 
 /**
- * This class is used to specify the willing to modify an external reference id. Use 'null' ReferenceMod to keep the
- * current reference id; use a ReferenceMod with a null id to try to reset the reference id; use a ReferenceMod with a
- * not null id to specify a new reference id.
+ * This class is used to specify the willing to create associations between user and external references.
+ * Password can be provided if required by an assign or provisioning operation.
+ *
+ * @see org.apache.syncope.common.types.ResourceAssociationActionType
  */
-@XmlRootElement(name = "referenceMod")
+@XmlRootElement(name = "resourceAssociationMod")
 @XmlType
-public class ReferenceMod extends AbstractBaseBean {
+public class ResourceAssociationMod extends AbstractBaseBean {
 
-    private static final long serialVersionUID = -4188817853738067677L;
+    private static final long serialVersionUID = -4188817853738067678L;
 
-    private Long id;
+    /**
+     * Target external resources.
+     */
+    private List<ResourceName> targetResources;
+
+    /**
+     * Indicate the willing to change password on target external resources.
+     */
+    private boolean changePwd;
+
+    /**
+     * Indicate the new password to be provisioned on target external resources.
+     */
+    private String password;
+
+    public ResourceAssociationMod() {
+        targetResources = new ArrayList<ResourceName>();
+        changePwd = false;
+        password = null;
+    }
+
+    public List<ResourceName> getTargetResources() {
+        return targetResources;
+    }
 
-    public ReferenceMod() {
-        this.id = null;
+    public boolean isChangePwd() {
+        return changePwd;
     }
 
-    public ReferenceMod(final Long id) {
-        this.id = id;
+    public void setChangePwd(boolean changePwd) {
+        this.changePwd = changePwd;
     }
 
-    public Long getId() {
-        return id;
+    public String getPassword() {
+        return password;
     }
 
-    public void setId(final Long id) {
-        this.id = id;
+    public void setPassword(String password) {
+        this.password = password;
     }
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkActionResult.java Sun Dec 29 15:12:11 2013
@@ -41,8 +41,13 @@ public class BulkActionResult extends Ab
     @XmlType(name = "bulkActionStatus")
     public enum Status {
 
+        // general bulk action result statuses
         SUCCESS,
-        FAILURE
+        FAILURE,
+        // specific propagation task execution statuses
+        CREATED,
+        SUBMITTED,
+        UNSUBMITTED;
 
     }
 
@@ -63,6 +68,13 @@ public class BulkActionResult extends Ab
     }
 
     @JsonIgnore
+    public void add(final Object id, final String status) {
+        if (id != null) {
+            results.add(new Result(id.toString(), Status.valueOf(status.toUpperCase())));
+        }
+    }
+
+    @JsonIgnore
     public Map<String, Status> getResultMap() {
         final Map<String, Status> res = new HashMap<String, Status>();
 

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkAssociationAction.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkAssociationAction.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkAssociationAction.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/reqres/BulkAssociationAction.java Sun Dec 29 15:12:11 2013
@@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlElem
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.AbstractBaseBean;
-import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 
 @XmlRootElement(name = "bulkAssociationAction")
 @XmlType
@@ -35,18 +35,18 @@ public class BulkAssociationAction exten
 
     private static final long serialVersionUID = 1395353278878758961L;
 
-    private ResourceAssociationActionType operation;
+    private ResourceDeAssociationActionType operation;
 
     /**
      * Serialized identifiers.
      */
     private final List<Long> targets = new ArrayList<Long>();
 
-    public ResourceAssociationActionType getOperation() {
+    public ResourceDeAssociationActionType getOperation() {
         return operation;
     }
 
-    public void setOperation(final ResourceAssociationActionType operation) {
+    public void setOperation(final ResourceDeAssociationActionType operation) {
         this.operation = operation;
     }
 

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/RoleService.java Sun Dec 29 15:12:11 2013
@@ -35,6 +35,7 @@ import javax.ws.rs.core.Response;
 import org.apache.syncope.common.mod.RoleMod;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 import org.apache.syncope.common.wrap.ResourceName;
 
 @Path("roles")
@@ -186,11 +187,23 @@ public interface RoleService extends JAX
      * @param roleId role id.
      * @param type resource association action type
      * @param resourceNames external resources to be used for propagation-related operations
-     * @return <tt>Response</tt> object featuring the updated role enriched with propagation status information,
-     * as <tt>Entity</tt>
+     * @return <tt>Response</tt> object featuring the bulk action result
+     */
+    @POST
+    @Path("{roleId}/deassociate/{type}")
+    Response bulkDeassociation(@PathParam("roleId") Long roleId, @PathParam("type") ResourceDeAssociationActionType type,
+            List<ResourceName> resourceNames);
+    
+    /**
+     * Executes resource-related operations on given role.
+     *
+     * @param roleId role id.
+     * @param type resource association action type
+     * @param resourceNames external resources to be used for propagation-related operations
+     * @return <tt>Response</tt> object featuring the bulk action result
      */
     @POST
     @Path("{roleId}/associate/{type}")
-    Response associate(@PathParam("roleId") Long roleId, @PathParam("type") ResourceAssociationActionType type,
+    Response bulkAssociation(@PathParam("roleId") Long roleId, @PathParam("type") ResourceAssociationActionType type,
             List<ResourceName> resourceNames);
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/services/UserService.java Sun Dec 29 15:12:11 2013
@@ -34,6 +34,7 @@ import javax.ws.rs.core.Response;
 import org.apache.cxf.jaxrs.model.wadl.Description;
 import org.apache.cxf.jaxrs.model.wadl.Descriptions;
 import org.apache.cxf.jaxrs.model.wadl.DocTarget;
+import org.apache.syncope.common.mod.ResourceAssociationMod;
 import org.apache.syncope.common.mod.StatusMod;
 import org.apache.syncope.common.mod.UserMod;
 import org.apache.syncope.common.wrap.ResourceName;
@@ -42,6 +43,7 @@ import org.apache.syncope.common.reqres.
 import org.apache.syncope.common.reqres.BulkActionResult;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 
 @Path("users")
 @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@@ -287,22 +289,37 @@ public interface UserService extends JAX
      * Executes resource-related operations on given user.
      *
      * @param userId user id.
-     * @param type resource association action type
+     * @param type resource de-association action type
      * @param resourceNames external resources to be used for propagation-related operations
-     * @return <tt>Response</tt> object featuring the updated user enriched with propagation status information,
-     * as <tt>Entity</tt>
+     * @return <tt>Response</tt> object featuring the bulk action result
      */
     @POST
-    @Path("{userId}/associate/{type}")
+    @Path("{userId}/bulkDeassociation/{type}")
     @Descriptions({
         @Description(target = DocTarget.METHOD, value = "Executes resource-related operations on given user"),
-        @Description(target = DocTarget.RETURN, value = "<tt>Response</tt> object featuring the updated user enriched "
-                + "with propagation status information, as <tt>Entity</tt>")
+        @Description(target = DocTarget.RETURN, value = "<tt>Response</tt> object featuring the bulk action result")
     })
-    Response associate(@Description("user id") @PathParam("userId") Long userId,
+    Response bulkDeassociation(@Description("user id") @PathParam("userId") Long userId,
+            @Description("resource de-association action type") @PathParam("type") ResourceDeAssociationActionType type,
+            @Description("external resources to be used for propagation-related operations") List<ResourceName> resourceNames);
+
+    /**
+     * Executes resource-related operations on given user.
+     *
+     * @param userId user id.
+     * @param type resource association action type
+     * @param associationMod external resources to be used for propagation-related operations
+     * @return <tt>Response</tt> object featuring the bulk action result
+     */
+    @POST
+    @Path("{userId}/bulkAssociation/{type}")
+    @Descriptions({
+        @Description(target = DocTarget.METHOD, value = "Executes resource-related operations on given user"),
+        @Description(target = DocTarget.RETURN, value = "<tt>Response</tt> object featuring the bulk action result")
+    })
+    Response bulkAssociation(@Description("user id") @PathParam("userId") Long userId,
             @Description("resource association action type") @PathParam("type") ResourceAssociationActionType type,
-            @Description("external resources to be used for propagation-related operations"
-            ) List<ResourceName> resourceNames);
+            @Description("external resources to be used for propagation-related operations") ResourceAssociationMod associationMod);
 
     /**
      * Executes the provided bulk action.
@@ -317,5 +334,4 @@ public interface UserService extends JAX
         @Description(target = DocTarget.RETURN, value = "Bulk action result")
     })
     BulkActionResult bulk(@Description("list of &lt;username, action&gt; pairs") BulkAction bulkAction);
-
 }

Modified: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java Sun Dec 29 15:12:11 2013
@@ -24,16 +24,16 @@ import javax.xml.bind.annotation.XmlEnum
 public enum ResourceAssociationActionType {
 
     /**
-     * Remove association between user/role on Syncope and external resource(s).
+     * Add association between user/role on Syncope and external resource(s) without any propagation.
      */
-    UNLINK,
+    LINK,
     /**
-     * Remove user/role from external resource(s).
+     * Add user/role into external resource(s).
      */
-    DEPROVISION,
+    PROVISION,
     /**
-     * Unassign (unlink + deprovision) external resource(s) from user/role.
+     * Assign (link + provision) external resource(s) with user/role.
      */
-    UNASSIGN
+    ASSIGN
 
 }

Copied: syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceDeAssociationActionType.java (from r1551501, syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java)
URL: http://svn.apache.org/viewvc/syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceDeAssociationActionType.java?p2=syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceDeAssociationActionType.java&p1=syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java&r1=1551501&r2=1554031&rev=1554031&view=diff
==============================================================================
--- syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceAssociationActionType.java (original)
+++ syncope/trunk/common/src/main/java/org/apache/syncope/common/types/ResourceDeAssociationActionType.java Sun Dec 29 15:12:11 2013
@@ -21,10 +21,10 @@ package org.apache.syncope.common.types;
 import javax.xml.bind.annotation.XmlEnum;
 
 @XmlEnum
-public enum ResourceAssociationActionType {
+public enum ResourceDeAssociationActionType {
 
     /**
-     * Remove association between user/role on Syncope and external resource(s).
+     * Remove association between user/role on Syncope and external resource(s) without any propagation.
      */
     UNLINK,
     /**
@@ -32,7 +32,7 @@ public enum ResourceAssociationActionTyp
      */
     DEPROVISION,
     /**
-     * Unassign (unlink + deprovision) external resource(s) from user/role.
+     * Unassign (unlink + de-provision) external resource(s) from user/role.
      */
     UNASSIGN
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/commons/status/StatusBean.java Sun Dec 29 15:12:11 2013
@@ -39,6 +39,8 @@ public class StatusBean implements Seria
 
     private Status status = Status.OBJECT_NOT_FOUND;
 
+    private boolean linked = true;
+
     public StatusBean(final AbstractAttributableTO attributable, String resourceName) {
         this.attributableId = attributable.getId();
         this.attributableName = attributable instanceof UserTO
@@ -74,6 +76,14 @@ public class StatusBean implements Seria
         return attributableName;
     }
 
+    public boolean isLinked() {
+        return linked;
+    }
+
+    public void setLinked(boolean linked) {
+        this.linked = linked;
+    }
+
     @Override
     public String toString() {
         return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/AbstractStatusModalPage.java Sun Dec 29 15:12:11 2013
@@ -18,8 +18,13 @@
  */
 package org.apache.syncope.console.pages;
 
+import org.apache.wicket.markup.html.panel.Fragment;
+
 public class AbstractStatusModalPage extends BaseModalPage {
 
-    protected static final long serialVersionUID = 6633408683036028540L;
+    private static final long serialVersionUID = 6633408683036028540L;
 
+    public AbstractStatusModalPage() {
+        add(new Fragment("pwdMgtFields", "emptyFragment", this));
+    }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ProvisioningModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ProvisioningModalPage.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ProvisioningModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/ProvisioningModalPage.java Sun Dec 29 15:12:11 2013
@@ -29,7 +29,7 @@ import org.apache.syncope.common.reqres.
 import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.UserTO;
-import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.status.AbstractStatusBeanProvider;
 import org.apache.syncope.console.commons.status.StatusBean;
@@ -97,22 +97,22 @@ public class ProvisioningModalPage<T ext
         columns.add(new AbstractColumn<StatusBean, String>(
                 new StringResourceModel("status", this, null, "")) {
 
-                    private static final long serialVersionUID = -3503023501954863131L;
+            private static final long serialVersionUID = -3503023501954863131L;
 
-                    @Override
-                    public String getCssClass() {
-                        return "action";
-                    }
-
-                    @Override
-                    public void populateItem(
-                            final Item<ICellPopulator<StatusBean>> cellItem,
-                            final String componentId,
-                            final IModel<StatusBean> model) {
-                                cellItem.
-                                add(statusUtils.getStatusImagePanel(componentId, model.getObject().getStatus()));
-                            }
-                });
+            @Override
+            public String getCssClass() {
+                return "action";
+            }
+
+            @Override
+            public void populateItem(
+                    final Item<ICellPopulator<StatusBean>> cellItem,
+                    final String componentId,
+                    final IModel<StatusBean> model) {
+                cellItem.
+                        add(statusUtils.getStatusImagePanel(componentId, model.getObject().getStatus()));
+            }
+        });
 
         final ActionDataTablePanel<StatusBean, String> table = new ActionDataTablePanel<StatusBean, String>(
                 "resourceDatatable",
@@ -130,7 +130,7 @@ public class ProvisioningModalPage<T ext
             @Override
             public void onClick(final AjaxRequestTarget target) {
                 try {
-                    bulkAssociationAction(target, ResourceAssociationActionType.UNLINK, table, columns);
+                    bulkAssociationAction(target, ResourceDeAssociationActionType.UNLINK, table, columns);
                 } catch (Exception e) {
                     LOG.error("Error unlinkink resources", e);
                     error(getString(Constants.ERROR) + ": " + e.getMessage());
@@ -146,7 +146,7 @@ public class ProvisioningModalPage<T ext
             @Override
             public void onClick(final AjaxRequestTarget target) {
                 try {
-                    bulkAssociationAction(target, ResourceAssociationActionType.DEPROVISION, table, columns);
+                    bulkAssociationAction(target, ResourceDeAssociationActionType.DEPROVISION, table, columns);
                 } catch (Exception e) {
                     LOG.error("Error de-provisioning user", e);
                     error(getString(Constants.ERROR) + ": " + e.getMessage());
@@ -162,7 +162,7 @@ public class ProvisioningModalPage<T ext
             @Override
             public void onClick(final AjaxRequestTarget target) {
                 try {
-                    bulkAssociationAction(target, ResourceAssociationActionType.UNASSIGN, table, columns);
+                    bulkAssociationAction(target, ResourceDeAssociationActionType.UNASSIGN, table, columns);
                 } catch (Exception e) {
                     LOG.error("Error unassigning resources", e);
                     error(getString(Constants.ERROR) + ": " + e.getMessage());
@@ -222,7 +222,7 @@ public class ProvisioningModalPage<T ext
 
     private void bulkAssociationAction(
             final AjaxRequestTarget target,
-            final ResourceAssociationActionType type,
+            final ResourceDeAssociationActionType type,
             final ActionDataTablePanel<StatusBean, String> table,
             final List<IColumn<StatusBean, String>> columns) {
 

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/StatusModalPage.java Sun Dec 29 15:12:11 2013
@@ -18,11 +18,18 @@
  */
 package org.apache.syncope.console.pages;
 
+import static org.apache.syncope.console.pages.AbstractBasePage.LOG;
 import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.List;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.common.reqres.BulkActionResult;
 import org.apache.syncope.common.to.AbstractAttributableTO;
+import org.apache.syncope.common.to.ResourceTO;
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.to.UserTO;
+import org.apache.syncope.common.types.ResourceAssociationActionType;
 import org.apache.syncope.console.commons.Constants;
 import org.apache.syncope.console.commons.status.StatusBean;
 import org.apache.syncope.console.commons.status.StatusUtils;
@@ -30,31 +37,66 @@ import org.apache.syncope.console.common
 import org.apache.syncope.console.commons.status.Status;
 import org.apache.syncope.console.commons.status.AbstractStatusBeanProvider;
 import org.apache.syncope.console.pages.panels.ActionDataTablePanel;
+import org.apache.syncope.console.wicket.ajax.markup.html.ClearIndicatingAjaxButton;
 import org.apache.syncope.console.wicket.markup.html.form.ActionLink;
+import org.apache.syncope.console.wicket.markup.html.form.AjaxCheckBoxPanel;
 import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.ISortableDataProvider;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn;
+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.form.PasswordTextField;
+import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.markup.repeater.Item;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
 import org.apache.wicket.model.StringResourceModel;
 
 public class StatusModalPage<T extends AbstractAttributableTO> extends AbstractStatusModalPage {
 
-    private static final long serialVersionUID = 4114026480146090961L;
+    private static final long serialVersionUID = -9148734710505211261L;
 
     private final AbstractAttributableTO attributableTO;
 
-    private int rowsPerPage = 25;
+    private int rowsPerPage = 10;
 
     final StatusUtils statusUtils;
 
     final boolean statusOnly;
 
+    // --------------------------------
+    // password management fields ..
+    // --------------------------------
+    final ClearIndicatingAjaxButton cancel;
+
+    final WebMarkupContainer pwdMgt;
+
+    final Form<?> pwdMgtForm;
+
+    final AjaxCheckBoxPanel changepwd;
+
+    final PasswordTextField password;
+
+    final PasswordTextField confirm;
+    // --------------------------------
+
+    final PageReference pageRef;
+
+    final ModalWindow window;
+
+    final ActionDataTablePanel<StatusBean, String> table;
+
+    final List<IColumn<StatusBean, String>> columns;
+
     public StatusModalPage(
             final PageReference pageRef,
             final ModalWindow window,
@@ -70,54 +112,144 @@ public class StatusModalPage<T extends A
 
         super();
 
+        this.pageRef = pageRef;
+        this.window = window;
         this.statusOnly = statusOnly;
         this.attributableTO = attributableTO;
 
         statusUtils = new StatusUtils(attributableTO instanceof UserTO ? userRestClient : roleRestClient);
 
-        final List<IColumn<StatusBean, String>> columns = new ArrayList<IColumn<StatusBean, String>>();
-        columns.add(new PropertyColumn<StatusBean, String>(
-                new StringResourceModel("resourceName", this, null, "Resource name"), "resourceName", "resourceName"));
+        columns = new ArrayList<IColumn<StatusBean, String>>();
+        columns.add(new AbstractColumn<StatusBean, String>(
+                new StringResourceModel("resourceName", this, null, "Resource name"), "resourceName") {
+
+            private static final long serialVersionUID = 2054811145491901166L;
+
+            @Override
+            public void populateItem(
+                    final Item<ICellPopulator<StatusBean>> cellItem,
+                    final String componentId,
+                    final IModel<StatusBean> model) {
+
+                cellItem.add(new Label(componentId, model.getObject().getResourceName()) {
+
+                    private static final long serialVersionUID = 8432079838783825801L;
+
+                    @Override
+                    protected void onComponentTag(final ComponentTag tag) {
+                        if (model.getObject().isLinked()) {
+                            super.onComponentTag(tag);
+                        } else {
+                            tag.put("style", "color: #DDDDDD");
+                        }
+                    }
+                });
+            }
+        });
+
         columns.add(new PropertyColumn<StatusBean, String>(
                 new StringResourceModel("accountLink", this, null, "Account link"), "accountLink", "accountLink"));
+
         columns.add(new AbstractColumn<StatusBean, String>(
                 new StringResourceModel("status", this, null, "")) {
 
-                    private static final long serialVersionUID = -3503023501954863131L;
+            private static final long serialVersionUID = -3503023501954863131L;
 
-                    @Override
-                    public String getCssClass() {
-                        return "action";
-                    }
+            @Override
+            public String getCssClass() {
+                return "action";
+            }
 
-                    @Override
-                    public void populateItem(
-                            final Item<ICellPopulator<StatusBean>> cellItem,
-                            final String componentId,
-                            final IModel<StatusBean> model) {
-
-                                cellItem.
-                                add(statusUtils.getStatusImagePanel(componentId, model.getObject().getStatus()));
-                            }
-                });
+            @Override
+            public void populateItem(
+                    final Item<ICellPopulator<StatusBean>> cellItem,
+                    final String componentId,
+                    final IModel<StatusBean> model) {
+
+                if (model.getObject().isLinked()) {
+                    cellItem.add(statusUtils.getStatusImagePanel(componentId, model.getObject().getStatus()));
+                } else {
+                    cellItem.add(new Label(componentId, ""));
+                }
+            }
+        });
 
-        final ActionDataTablePanel<StatusBean, String> table = new ActionDataTablePanel<StatusBean, String>(
+        table = new ActionDataTablePanel<StatusBean, String>(
                 "resourceDatatable",
                 columns,
                 (ISortableDataProvider<StatusBean, String>) new AttributableStatusProvider(),
                 rowsPerPage,
                 pageRef) {
 
-                    private static final long serialVersionUID = 6510391461033818316L;
+            private static final long serialVersionUID = 6510391461033818316L;
 
-                    @Override
-                    public boolean isElementEnabled(final StatusBean element) {
-                        return !statusOnly || element.getStatus() != Status.OBJECT_NOT_FOUND;
-                    }
-                };
+            @Override
+            public boolean isElementEnabled(final StatusBean element) {
+                return !statusOnly || element.getStatus() != Status.OBJECT_NOT_FOUND;
+            }
+        };
+        table.setOutputMarkupId(true);
 
         final String pageId = attributableTO instanceof RoleTO ? "Roles" : "Users";
 
+        final Fragment pwdMgtFragment = new Fragment("pwdMgtFields", "pwdMgtFragment", this);
+        addOrReplace(pwdMgtFragment);
+
+        pwdMgt = new WebMarkupContainer("pwdMgt");
+        pwdMgtFragment.add(pwdMgt.setOutputMarkupId(true));
+
+        pwdMgtForm = new Form("pwdMgtForm");
+        pwdMgtForm.setVisible(false).setEnabled(false);
+        pwdMgt.add(pwdMgtForm);
+
+        password = new PasswordTextField("password", new Model<String>());
+        pwdMgtForm.add(password.setRequired(false).setEnabled(false));
+
+        confirm = new PasswordTextField("confirm", new Model<String>());
+        pwdMgtForm.add(confirm.setRequired(false).setEnabled(false));
+
+        changepwd = new AjaxCheckBoxPanel("changepwd", "changepwd", new Model<Boolean>(false));
+        pwdMgtForm.add(changepwd.setModelObject(false));
+        pwdMgtForm.add(new Label("changePwdLabel", new ResourceModel("changePwdLabel", "Password propagation")));
+
+        changepwd.getField().add(new AjaxFormComponentUpdatingBehavior(Constants.ON_CHANGE) {
+
+            private static final long serialVersionUID = -1107858522700306810L;
+
+            @Override
+            protected void onUpdate(final AjaxRequestTarget target) {
+                password.setEnabled(changepwd.getModelObject());
+                confirm.setEnabled(changepwd.getModelObject());
+                target.add(pwdMgt);
+            }
+        });
+
+        cancel = new ClearIndicatingAjaxButton("cancel", new ResourceModel("cancel"), pageRef) {
+
+            private static final long serialVersionUID = -2341391430136818026L;
+
+            @Override
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                // ignore
+                window.close(target);
+            }
+        }.feedbackPanelAutomaticReload(false);
+
+        pwdMgtForm.add(cancel);
+
+        final ClearIndicatingAjaxButton goon =
+                new ClearIndicatingAjaxButton("continue", new ResourceModel("continue"), pageRef) {
+
+            private static final long serialVersionUID = -2341391430136818027L;
+
+            @Override
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                // none
+            }
+        };
+
+        pwdMgtForm.add(goon);
+
         if (statusOnly) {
             table.addAction(new ActionLink() {
 
@@ -179,10 +311,9 @@ public class StatusModalPage<T extends A
                         }
 
                         ((BasePage) pageRef.getPage()).setModalResult(true);
-
                         window.close(target);
                     } catch (Exception e) {
-                        LOG.error("Error unlinkink resources", e);
+                        LOG.error("Error unlinking resources", e);
                         error(getString(Constants.ERROR) + ": " + e.getMessage());
                         target.add(feedbackPanel);
                     }
@@ -197,17 +328,42 @@ public class StatusModalPage<T extends A
                 public void onClick(final AjaxRequestTarget target) {
                     try {
                         if (attributableTO instanceof UserTO) {
-                            userRestClient.deprovision(
+                            userRestClient.link(
                                     attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
                         } else {
-                            roleRestClient.deprovision(
+                            roleRestClient.link(
                                     attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
                         }
 
                         ((BasePage) pageRef.getPage()).setModalResult(true);
-
                         window.close(target);
                     } catch (Exception e) {
+                        LOG.error("Error linking resources", e);
+                        error(getString(Constants.ERROR) + ": " + e.getMessage());
+                        target.add(feedbackPanel);
+                    }
+                }
+            }, ActionLink.ActionType.LINK, pageId);
+
+            table.addAction(new ActionLink() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target) {
+                    try {
+                        final BulkActionResult bulkActionResult;
+                        if (attributableTO instanceof UserTO) {
+                            bulkActionResult = userRestClient.deprovision(
+                                    attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
+                        } else {
+                            bulkActionResult = roleRestClient.deprovision(
+                                    attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
+                        }
+
+                        ((BasePage) pageRef.getPage()).setModalResult(true);
+                        loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+                    } catch (Exception e) {
                         LOG.error("Error de-provisioning user", e);
                         error(getString(Constants.ERROR) + ": " + e.getMessage());
                         target.add(feedbackPanel);
@@ -221,18 +377,44 @@ public class StatusModalPage<T extends A
 
                 @Override
                 public void onClick(final AjaxRequestTarget target) {
+
+                    if (attributableTO instanceof UserTO) {
+                        StatusModalPage.this.passwordManagement(
+                                target, ResourceAssociationActionType.PROVISION, table.getModelObject());
+                    } else {
+                        try {
+                            final BulkActionResult bulkActionResult = roleRestClient.provision(
+                                    attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
+
+                            ((BasePage) pageRef.getPage()).setModalResult(true);
+                            loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+                        } catch (Exception e) {
+                            LOG.error("Error provisioning user", e);
+                            error(getString(Constants.ERROR) + ": " + e.getMessage());
+                            target.add(feedbackPanel);
+                        }
+                    }
+                }
+            }.feedbackPanelAutomaticReload(!(attributableTO instanceof UserTO)), ActionLink.ActionType.PROVISION, pageId);
+
+            table.addAction(new ActionLink() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target) {
                     try {
+                        final BulkActionResult bulkActionResult;
                         if (attributableTO instanceof UserTO) {
-                            userRestClient.unassign(
+                            bulkActionResult = userRestClient.unassign(
                                     attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
                         } else {
-                            roleRestClient.unassign(
+                            bulkActionResult = roleRestClient.unassign(
                                     attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
                         }
 
                         ((BasePage) pageRef.getPage()).setModalResult(true);
-
-                        window.close(target);
+                        loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
                     } catch (Exception e) {
                         LOG.error("Error unassigning resources", e);
                         error(getString(Constants.ERROR) + ": " + e.getMessage());
@@ -240,10 +422,34 @@ public class StatusModalPage<T extends A
                     }
                 }
             }, ActionLink.ActionType.UNASSIGN, pageId);
+
+            table.addAction(new ActionLink() {
+
+                private static final long serialVersionUID = -3722207913631435501L;
+
+                @Override
+                public void onClick(final AjaxRequestTarget target) {
+                    if (attributableTO instanceof UserTO) {
+                        StatusModalPage.this.passwordManagement(
+                                target, ResourceAssociationActionType.ASSIGN, table.getModelObject());
+                    } else {
+                        try {
+                            final BulkActionResult bulkActionResult = roleRestClient.assign(
+                                    attributableTO.getId(), new ArrayList<StatusBean>(table.getModelObject()));
+
+                            ((BasePage) pageRef.getPage()).setModalResult(true);
+                            loadBulkActionResultPage(table.getModelObject(), bulkActionResult);
+                        } catch (Exception e) {
+                            LOG.error("Error assigning resources", e);
+                            error(getString(Constants.ERROR) + ": " + e.getMessage());
+                            target.add(feedbackPanel);
+                        }
+                    }
+                }
+            }.feedbackPanelAutomaticReload(!(attributableTO instanceof UserTO)), ActionLink.ActionType.ASSIGN, pageId);
         }
 
         table.addCancelButton(window);
-
         add(table);
     }
 
@@ -252,16 +458,32 @@ public class StatusModalPage<T extends A
         private static final long serialVersionUID = 4586969457669796621L;
 
         public AttributableStatusProvider() {
-            super("resourceName");
+            super(statusOnly ? "resourceName" : "accountLink");
         }
 
         @SuppressWarnings("unchecked")
         @Override
         public List<StatusBean> getStatusBeans() {
+            final List<String> resources = new ArrayList<String>();
+            for (ResourceTO resourceTO : resourceRestClient.getAllResources()) {
+                resources.add(resourceTO.getName());
+            }
+
             final List<ConnObjectWrapper> connObjects = statusUtils.getConnectorObjects(attributableTO);
 
             final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size() + 1);
 
+            for (ConnObjectWrapper entry : connObjects) {
+                final StatusBean statusBean = statusUtils.getStatusBean(
+                        attributableTO,
+                        entry.getResourceName(),
+                        entry.getConnObjectTO(),
+                        attributableTO instanceof RoleTO);
+
+                statusBeans.add(statusBean);
+                resources.remove(entry.getResourceName());
+            }
+
             if (statusOnly) {
                 final StatusBean syncope = new StatusBean(attributableTO, "Syncope");
 
@@ -278,19 +500,115 @@ public class StatusModalPage<T extends A
                 syncope.setStatus(syncopeStatus);
 
                 statusBeans.add(syncope);
+            } else {
+                for (String resource : resources) {
+                    final StatusBean statusBean = statusUtils.getStatusBean(
+                            attributableTO,
+                            resource,
+                            null,
+                            attributableTO instanceof RoleTO);
+
+                    statusBean.setLinked(false);
+                    statusBeans.add(statusBean);
+                }
             }
 
-            for (ConnObjectWrapper entry : connObjects) {
-                final StatusBean statusBean = statusUtils.getStatusBean(
-                        entry.getAttributable(),
-                        entry.getResourceName(),
-                        entry.getConnObjectTO(),
-                        attributableTO instanceof RoleTO);
+            return statusBeans;
+        }
+    }
 
-                statusBeans.add(statusBean);
+    private void passwordManagement(
+            final AjaxRequestTarget target,
+            final ResourceAssociationActionType type,
+            final Collection<StatusBean> selection) {
+
+        final ClearIndicatingAjaxButton goon =
+                new ClearIndicatingAjaxButton("continue", new ResourceModel("continue", "Continue"), pageRef) {
+
+            private static final long serialVersionUID = -2341391430136818027L;
+
+            @Override
+            protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
+                try {
+                    if (StringUtils.isNotBlank(password.getModelObject())
+                            && !password.getModelObject().equals(confirm.getModelObject())) {
+                        throw new Exception(getString("passwordMismatch"));
+                    }
+
+                    final BulkActionResult bulkActionResult;
+                    switch (type) {
+                        case ASSIGN:
+                            bulkActionResult = userRestClient.assign(
+                                    attributableTO.getId(),
+                                    new ArrayList<StatusBean>(selection),
+                                    changepwd.getModelObject(),
+                                    password.getModelObject());
+                            break;
+                        case PROVISION:
+                            bulkActionResult = userRestClient.provision(
+                                    attributableTO.getId(),
+                                    new ArrayList<StatusBean>(selection),
+                                    changepwd.getModelObject(),
+                                    password.getModelObject());
+                            break;
+                        default:
+                            bulkActionResult = null;
+                        // ignore
+                        }
+
+                    ((BasePage) pageRef.getPage()).setModalResult(true);
+
+                    if (bulkActionResult != null) {
+                        loadBulkActionResultPage(selection, bulkActionResult);
+                    } else {
+
+                        target.add(((BasePage) pageRef.getPage()).getFeedbackPanel());
+                        window.close(target);
+                    }
+                } catch (Exception e) {
+                    LOG.error("Error provisioning resources", e);
+                    error(getString(Constants.ERROR) + ": " + e.getMessage());
+                    target.add(feedbackPanel);
+                }
             }
+        }.feedbackPanelAutomaticReload(false);
 
-            return statusBeans;
+        pwdMgtForm.addOrReplace(goon);
+
+        table.setVisible(false);
+        pwdMgtForm.setVisible(true).setEnabled(true);
+
+        target.add(table);
+        target.add(pwdMgt);
+    }
+
+    private void loadBulkActionResultPage(
+            final Collection<StatusBean> selection, final BulkActionResult bulkActionResult) {
+        final List<String> resources = new ArrayList<String>(selection.size());
+        for (StatusBean statusBean : selection) {
+            resources.add(statusBean.getResourceName());
         }
+
+        final List<ConnObjectWrapper> connObjects =
+                statusUtils.getConnectorObjects(Collections.singletonList(attributableTO), resources);
+
+        final List<StatusBean> statusBeans = new ArrayList<StatusBean>(connObjects.size());
+
+        for (ConnObjectWrapper entry : connObjects) {
+            final StatusBean statusBean = statusUtils.getStatusBean(
+                    attributableTO,
+                    entry.getResourceName(),
+                    entry.getConnObjectTO(),
+                    attributableTO instanceof RoleTO);
+
+            statusBeans.add(statusBean);
+        }
+
+        setResponsePage(new BulkActionResultModalPage<StatusBean, String>(
+                window,
+                statusBeans,
+                columns,
+                bulkActionResult,
+                "resourceName"));
     }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ActionDataTablePanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ActionDataTablePanel.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ActionDataTablePanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/pages/panels/ActionDataTablePanel.java Sun Dec 29 15:12:11 2013
@@ -56,7 +56,7 @@ public class ActionDataTablePanel<T, S> 
 
     private final CheckGroup<T> group;
 
-    private final Form bulkActionForm;
+    private final Form<?> bulkActionForm;
 
     private final ActionLinksPanel actionPanel;
 
@@ -96,7 +96,7 @@ public class ActionDataTablePanel<T, S> 
             private static final long serialVersionUID = -151291731388673682L;
 
             @Override
-            protected void onUpdate(AjaxRequestTarget target) {
+            protected void onUpdate(final AjaxRequestTarget target) {
                 // ignore
             }
         });
@@ -168,7 +168,7 @@ public class ActionDataTablePanel<T, S> 
             protected void onSubmitInternal(final AjaxRequestTarget target, final Form<?> form) {
                 window.close(target);
             }
-        };
+        }.feedbackPanelAutomaticReload(false);
 
         cancel.setDefaultFormProcessing(false);
         bulkActionForm.addOrReplace(cancel);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/RoleRestClient.java Sun Dec 29 15:12:11 2013
@@ -32,6 +32,7 @@ import org.apache.syncope.common.wrap.Re
 import org.apache.syncope.common.to.RoleTO;
 import org.apache.syncope.common.types.AttributableType;
 import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 import org.apache.syncope.common.util.CollectionWrapper;
 import org.apache.syncope.console.commons.status.StatusBean;
 import org.apache.syncope.console.commons.status.StatusUtils;
@@ -98,22 +99,39 @@ public class RoleRestClient extends Abst
         return getService(RoleRestClient.class).bulkAction(action);
     }
 
-    public RoleTO unlink(final long roleId, final List<StatusBean> statuses) {
-        return getService(RoleService.class).associate(roleId, ResourceAssociationActionType.UNLINK,
+    public BulkActionResult unlink(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkDeassociation(roleId, ResourceDeAssociationActionType.UNLINK,
                 CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
-                readEntity(RoleTO.class);
+                readEntity(BulkActionResult.class);
     }
 
-    public RoleTO deprovision(final long roleId, final List<StatusBean> statuses) {
-        return getService(RoleService.class).associate(roleId, ResourceAssociationActionType.DEPROVISION,
+    public BulkActionResult link(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkAssociation(roleId, ResourceAssociationActionType.LINK,
                 CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
-                readEntity(RoleTO.class);
+                readEntity(BulkActionResult.class);
     }
 
-    public RoleTO unassign(final long roleId, final List<StatusBean> statuses) {
-        return getService(RoleService.class).associate(roleId, ResourceAssociationActionType.UNASSIGN,
+    public BulkActionResult deprovision(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkDeassociation(roleId, ResourceDeAssociationActionType.DEPROVISION,
                 CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
-                readEntity(RoleTO.class);
+                readEntity(BulkActionResult.class);
     }
 
+    public BulkActionResult provision(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkAssociation(roleId, ResourceAssociationActionType.PROVISION,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
+                readEntity(BulkActionResult.class);
+    }
+
+    public BulkActionResult unassign(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkDeassociation(roleId, ResourceDeAssociationActionType.UNASSIGN,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
+                readEntity(BulkActionResult.class);
+    }
+
+    public BulkActionResult assign(final long roleId, final List<StatusBean> statuses) {
+        return getService(RoleService.class).bulkAssociation(roleId, ResourceAssociationActionType.ASSIGN,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class)).
+                readEntity(BulkActionResult.class);
+    }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/rest/UserRestClient.java Sun Dec 29 15:12:11 2013
@@ -30,9 +30,11 @@ import org.apache.syncope.common.to.Conn
 import org.apache.syncope.common.wrap.ResourceName;
 import org.apache.syncope.common.to.UserTO;
 import org.apache.syncope.common.types.AttributableType;
-import org.apache.syncope.common.types.ResourceAssociationActionType;
 import org.apache.syncope.common.util.CollectionWrapper;
 import org.apache.syncope.common.SyncopeClientException;
+import org.apache.syncope.common.mod.ResourceAssociationMod;
+import org.apache.syncope.common.types.ResourceAssociationActionType;
+import org.apache.syncope.common.types.ResourceDeAssociationActionType;
 import org.apache.syncope.console.commons.status.StatusBean;
 import org.apache.syncope.console.commons.status.StatusUtils;
 import org.apache.wicket.extensions.markup.html.repeater.util.SortParam;
@@ -112,19 +114,56 @@ public class UserRestClient extends Abst
         return getService(UserService.class).bulk(action);
     }
 
-    public void unlink(final long userId, final List<StatusBean> statuses) {
-        getService(UserService.class).associate(userId, ResourceAssociationActionType.UNLINK,
-                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class));
+    public BulkActionResult unlink(final long userId, final List<StatusBean> statuses) {
+        return getService(UserService.class).bulkDeassociation(userId, ResourceDeAssociationActionType.UNLINK,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class))
+                .readEntity(BulkActionResult.class);
     }
 
-    public void deprovision(final long userId, final List<StatusBean> statuses) {
-        getService(UserService.class).associate(userId, ResourceAssociationActionType.DEPROVISION,
+    public BulkActionResult link(final long userId, final List<StatusBean> statuses) {
+        final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+        associationMod.getTargetResources().addAll(
                 CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class));
+
+        return getService(UserService.class).bulkAssociation(userId, ResourceAssociationActionType.LINK, associationMod)
+                .readEntity(BulkActionResult.class);
+    }
+
+    public BulkActionResult deprovision(final long userId, final List<StatusBean> statuses) {
+        return getService(UserService.class).bulkDeassociation(userId, ResourceDeAssociationActionType.DEPROVISION,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class))
+                .readEntity(BulkActionResult.class);
     }
 
-    public void unassign(final long userId, final List<StatusBean> statuses) {
-        getService(UserService.class).associate(userId, ResourceAssociationActionType.UNASSIGN,
+    public BulkActionResult provision(
+            final long userId, final List<StatusBean> statuses, final boolean changepwd, final String password) {
+        final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+        associationMod.getTargetResources().addAll(
                 CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class));
+        associationMod.setChangePwd(changepwd);
+        associationMod.setPassword(password);
+
+        return getService(UserService.class)
+                .bulkAssociation(userId, ResourceAssociationActionType.PROVISION, associationMod)
+                .readEntity(BulkActionResult.class);
+    }
+
+    public BulkActionResult unassign(final long userId, final List<StatusBean> statuses) {
+        return getService(UserService.class).bulkDeassociation(userId, ResourceDeAssociationActionType.UNASSIGN,
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class))
+                .readEntity(BulkActionResult.class);
     }
 
+    public BulkActionResult assign(
+            final long userId, final List<StatusBean> statuses, final boolean changepwd, final String password) {
+        final ResourceAssociationMod associationMod = new ResourceAssociationMod();
+        associationMod.getTargetResources().addAll(
+                CollectionWrapper.wrap(StatusUtils.buildStatusMod(statuses).getResourceNames(), ResourceName.class));
+        associationMod.setChangePwd(changepwd);
+        associationMod.setPassword(password);
+
+        return getService(UserService.class).bulkAssociation(userId, ResourceAssociationActionType.ASSIGN,
+                associationMod)
+                .readEntity(BulkActionResult.class);
+    }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxButton.java Sun Dec 29 15:12:11 2013
@@ -32,6 +32,8 @@ public abstract class ClearIndicatingAja
 
     private final PageReference pageRef;
 
+    private boolean reloadFeebackPanel = true;
+
     public ClearIndicatingAjaxButton(final String id, final PageReference pageRef) {
         super(id);
         this.pageRef = pageRef;
@@ -56,12 +58,17 @@ public abstract class ClearIndicatingAja
 
     protected abstract void onSubmitInternal(AjaxRequestTarget target, Form<?> form);
 
+    public ClearIndicatingAjaxButton feedbackPanelAutomaticReload(boolean reloadFeedbackPanel) {
+        this.reloadFeebackPanel = reloadFeedbackPanel;
+        return this;
+    }
+
     @Override
     protected final void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
         super.onSubmit(target, form);
 
         Page page = pageRef.getPage();
-        if (page instanceof BasePage) {
+        if (reloadFeebackPanel && page instanceof BasePage) {
             target.add(((BasePage) page).getFeedbackPanel());
         }
         onSubmitInternal(target, form);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/ajax/markup/html/ClearIndicatingAjaxLink.java Sun Dec 29 15:12:11 2013
@@ -31,6 +31,8 @@ public abstract class ClearIndicatingAja
 
     private final PageReference pageRef;
 
+    private boolean reloadFeedbackPanel = true;
+
     public ClearIndicatingAjaxLink(final String id, final PageReference pageRef) {
         super(id);
         this.pageRef = pageRef;
@@ -41,12 +43,17 @@ public abstract class ClearIndicatingAja
         this.pageRef = pageRef;
     }
 
+    public ClearIndicatingAjaxLink<T> feedbackPanelAutomaticReload(boolean reloadFeedbackPanel) {
+        this.reloadFeedbackPanel = reloadFeedbackPanel;
+        return this;
+    }
+
     protected abstract void onClickInternal(AjaxRequestTarget target);
 
     @Override
     public final void onClick(final AjaxRequestTarget target) {
         Page page = pageRef.getPage();
-        if (page instanceof BasePage) {
+        if (reloadFeedbackPanel && page instanceof BasePage) {
             target.add(((BasePage) page).getFeedbackPanel());
         }
         onClickInternal(target);

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/extensions/markup/html/repeater/data/table/ActionResultColumn.java Sun Dec 29 15:12:11 2013
@@ -20,6 +20,7 @@ package org.apache.syncope.console.wicke
 
 import java.beans.PropertyDescriptor;
 import org.apache.syncope.common.reqres.BulkActionResult;
+import org.apache.syncope.common.reqres.BulkActionResult.Status;
 import org.apache.wicket.Component;
 import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator;
 import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn;
@@ -67,7 +68,8 @@ public class ActionResultColumn<T, S> ex
             final PropertyDescriptor propDesc =
                     BeanUtils.getPropertyDescriptor(rowModel.getObject().getClass(), idFieldName);
             final Object id = propDesc.getReadMethod().invoke(rowModel.getObject(), new Object[0]);
-            item.add(new Label(componentId, results.getResultMap().get(id.toString()).toString()));
+            final Status status = id == null ? null : results.getResultMap().get(id.toString());
+            item.add(new Label(componentId, status == null ? Status.SUCCESS : status.toString()));
         } catch (Exception e) {
             LOG.error("Errore retrieving target id value", e);
         }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLink.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLink.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLink.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLink.java Sun Dec 29 15:12:11 2013
@@ -25,6 +25,8 @@ public abstract class ActionLink impleme
 
     private static final long serialVersionUID = 7031329706998320639L;
 
+    private boolean reloadFeedbackPanel = true;
+
     public enum ActionType {
 
         CREATE("create"),
@@ -44,8 +46,11 @@ public abstract class ActionLink impleme
         RELOAD("reload"),
         CHANGE_VIEW("changeView"),
         UNLINK("update"),
+        LINK("update"),
         UNASSIGN("update"),
+        ASSIGN("update"),
         DEPROVISION("update"),
+        PROVISION("update"),
         MANAGE_RESOURCES("update"),
         MANAGE_USERS("update"),
         MANAGE_ROLES("update");
@@ -65,4 +70,13 @@ public abstract class ActionLink impleme
 
     public void postClick() {
     }
+
+    public boolean feedbackPanelAutomaticReload() {
+        return reloadFeedbackPanel;
+    }
+
+    public ActionLink feedbackPanelAutomaticReload(boolean reloadFeedbackPanel) {
+        this.reloadFeedbackPanel = reloadFeedbackPanel;
+        return this;
+    }
 }

Modified: syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java (original)
+++ syncope/trunk/console/src/main/java/org/apache/syncope/console/wicket/markup/html/form/ActionLinksPanel.java Sun Dec 29 15:12:11 2013
@@ -68,8 +68,11 @@ public class ActionLinksPanel extends Pa
         super.add(new Fragment("panelReload", "emptyFragment", this));
         super.add(new Fragment("panelChangeView", "emptyFragment", this));
         super.add(new Fragment("panelUnlink", "emptyFragment", this));
+        super.add(new Fragment("panelLink", "emptyFragment", this));
         super.add(new Fragment("panelUnassign", "emptyFragment", this));
+        super.add(new Fragment("panelAssign", "emptyFragment", this));
         super.add(new Fragment("panelDeprovision", "emptyFragment", this));
+        super.add(new Fragment("panelProvision", "emptyFragment", this));
     }
 
     public void add(
@@ -114,7 +117,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case MANAGE_RESOURCES:
@@ -128,7 +131,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case MANAGE_USERS:
@@ -142,7 +145,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case MANAGE_ROLES:
@@ -156,7 +159,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case CREATE:
@@ -170,7 +173,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case EDIT:
@@ -184,7 +187,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case USER_TEMPLATE:
@@ -198,7 +201,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case ROLE_TEMPLATE:
@@ -212,7 +215,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case ENABLE:
@@ -226,7 +229,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case SEARCH:
@@ -240,7 +243,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case EXECUTE:
@@ -254,7 +257,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case DRYRUN:
@@ -268,7 +271,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case DELETE:
@@ -282,7 +285,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
 
                 break;
 
@@ -297,7 +300,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
 
                 break;
 
@@ -312,7 +315,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case SUSPEND:
@@ -326,7 +329,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case REACTIVATE:
@@ -340,7 +343,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case RELOAD:
@@ -354,7 +357,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case CHANGE_VIEW:
@@ -368,7 +371,7 @@ public class ActionLinksPanel extends Pa
                     protected void onClickInternal(final AjaxRequestTarget target) {
                         link.onClick(target);
                     }
-                });
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case UNLINK:
@@ -377,13 +380,27 @@ public class ActionLinksPanel extends Pa
                 fragment.addOrReplace(
                         new IndicatingOnConfirmAjaxLink<Void>("unlinkLink", pageRef, "confirmUnlink") {
 
-                            private static final long serialVersionUID = -6957616042924610293L;
+                    private static final long serialVersionUID = -6957616042924610293L;
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target) {
-                                link.onClick(target);
-                            }
-                        });
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+                break;
+
+            case LINK:
+                fragment = new Fragment("panelLink", "fragmentLink", this);
+
+                fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("linkLink", pageRef) {
+
+                    private static final long serialVersionUID = -6957616042924610303L;
+
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case UNASSIGN:
@@ -392,13 +409,27 @@ public class ActionLinksPanel extends Pa
                 fragment.addOrReplace(
                         new IndicatingOnConfirmAjaxLink<Void>("unassignLink", pageRef, "confirmUnassign") {
 
-                            private static final long serialVersionUID = -6957616042924610294L;
+                    private static final long serialVersionUID = -6957616042924610294L;
+
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+                break;
+
+            case ASSIGN:
+                fragment = new Fragment("panelAssign", "fragmentAssign", this);
+
+                fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("assignLink", pageRef) {
+
+                    private static final long serialVersionUID = -6957616042924610304L;
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target) {
-                                link.onClick(target);
-                            }
-                        });
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
 
             case DEPROVISION:
@@ -407,13 +438,27 @@ public class ActionLinksPanel extends Pa
                 fragment.addOrReplace(
                         new IndicatingOnConfirmAjaxLink<Void>("deprovisionLink", pageRef, "confirmDeprovision") {
 
-                            private static final long serialVersionUID = -6957616042924610295L;
+                    private static final long serialVersionUID = -6957616042924610295L;
 
-                            @Override
-                            protected void onClickInternal(final AjaxRequestTarget target) {
-                                link.onClick(target);
-                            }
-                        });
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
+                break;
+
+            case PROVISION:
+                fragment = new Fragment("panelProvision", "fragmentProvision", this);
+
+                fragment.addOrReplace(new ClearIndicatingAjaxLink<Void>("provisionLink", pageRef) {
+
+                    private static final long serialVersionUID = -6957616042924610305L;
+
+                    @Override
+                    protected void onClickInternal(final AjaxRequestTarget target) {
+                        link.onClick(target);
+                    }
+                }.feedbackPanelAutomaticReload(link.feedbackPanelAutomaticReload()));
                 break;
             default:
             // do nothink
@@ -500,13 +545,25 @@ public class ActionLinksPanel extends Pa
                 super.addOrReplace(new Fragment("panelUnlink", "emptyFragment", this));
                 break;
 
+            case LINK:
+                super.addOrReplace(new Fragment("panelLink", "emptyFragment", this));
+                break;
+
             case UNASSIGN:
                 super.addOrReplace(new Fragment("panelUnassign", "emptyFragment", this));
                 break;
 
+            case ASSIGN:
+                super.addOrReplace(new Fragment("panelAssign", "emptyFragment", this));
+                break;
+
             case DEPROVISION:
                 super.addOrReplace(new Fragment("panelDeprovision", "emptyFragment", this));
                 break;
+
+            case PROVISION:
+                super.addOrReplace(new Fragment("panelProvision", "emptyFragment", this));
+                break;
             default:
             // do nothing
         }

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication.properties?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication.properties Sun Dec 29 15:12:11 2013
@@ -30,6 +30,7 @@ confirmDelete=Do you really want to dele
 confirmUnlink=Do you really want to remove the link between the selected item(s) and the resource?
 confirmUnassign=Do you really want to remove the assignment between the selected item(s) and the resource?
 confirmDeprovision=Do you really want to de-provision the selected item(s)?
+confirmProvision=Do you really want to provision the selected item(s)?
 
 
 unauthorizedInstantiationException=Missing authorization.

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_it.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_it.properties?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_it.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_it.properties Sun Dec 29 15:12:11 2013
@@ -30,6 +30,7 @@ confirmDelete=Vuoi davvero procedere con
 confirmUnlink=Vuoi davvero procedere rimuovendo il link con la risorsa?
 confirmUnassign=Vuoi davvero procedere rimuovendo l'assegnamento sulla risorsa?
 confirmDeprovision=Vuoi davvero procedere con il de-provisioning?
+confirmProvision=Vuoi davvero procedere con il provisioning?
 
 unauthorizedInstantiationException=Autorizzazione mancante.
 accessControlException=Autorizzazione mancante durante la comunicazione con Syncope core.

Modified: syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_pt_BR.properties
URL: http://svn.apache.org/viewvc/syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_pt_BR.properties?rev=1554031&r1=1554030&r2=1554031&view=diff
==============================================================================
--- syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_pt_BR.properties (original)
+++ syncope/trunk/console/src/main/resources/org/apache/syncope/console/SyncopeApplication_pt_BR.properties Sun Dec 29 15:12:11 2013
@@ -30,6 +30,7 @@ confirmDelete=Voc\u00ea realmente deseja
 confirmUnlink=Voc\u00ea realmente deseja apagar o v\u00ednculo entre o item e de recursos?
 confirmUnassign=Voc\u00ea realmente deseja apagar a atribui\u00e7\u00e3o entre o item e de recursos?
 confirmDeprovision=Voc\u00ea realmente de-provision item?
+confirmProvision=Voc\u00ea realmente provision item?
 
 unauthorizedInstantiationException=Falta de autoriza\u00e7\u00e3o para concluir.
 accessControlException=Falta de autoriza\u00e7\u00e3o ao comunicar-se com o Syncope core.



Mime
View raw message