Repository: syncope
Updated Branches:
  refs/heads/master f171ed2ae -> 4e781f4a7


http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
index 58ff78d..d25d0f0 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/PlainAttrs.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 import org.apache.commons.collections4.ListUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.commons.SchemaUtils;
@@ -151,16 +152,12 @@ public class PlainAttrs extends 
AbstractAttrs<PlainSchemaTO> {
 
     @Override
     protected List<AttrTO> getAttrsFromTO() {
-        final List<AttrTO> res = new ArrayList<>(anyTO.getPlainAttrs());
-        Collections.sort(res, new AttrComparator());
-        return res;
+        return 
anyTO.getPlainAttrs().stream().sorted(attrComparator).collect(Collectors.toList());
     }
 
     @Override
     protected List<AttrTO> getAttrsFromTO(final MembershipTO membershipTO) {
-        final List<AttrTO> res = new ArrayList<>(membershipTO.getPlainAttrs());
-        Collections.sort(res, new AttrComparator());
-        return res;
+        return 
membershipTO.getPlainAttrs().stream().sorted(attrComparator).collect(Collectors.toList());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
index 4f408e8..4db79bf 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java
@@ -54,7 +54,7 @@ public class UserWizardBuilder extends 
AnyWizardBuilder<UserTO> implements UserF
     }
 
     /**
-     * Constructor to be used for Approval details only.
+     * Constructor to be used for Approval and Remediation details only.
      *
      * @param previousUserTO previous user status.
      * @param userTO new user status to be approved.

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
index d3d4a82..ebea4b7 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/any/VirAttrs.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.syncope.client.console.wicket.ajax.markup.html.LabelInfo;
@@ -108,16 +109,12 @@ public class VirAttrs extends AbstractAttrs<VirSchemaTO> {
 
     @Override
     protected List<AttrTO> getAttrsFromTO() {
-        final List<AttrTO> res = new ArrayList<>(anyTO.getVirAttrs());
-        Collections.sort(res, new AttrComparator());
-        return res;
+        return 
anyTO.getVirAttrs().stream().sorted(attrComparator).collect(Collectors.toList());
     }
 
     @Override
     protected List<AttrTO> getAttrsFromTO(final MembershipTO membershipTO) {
-        final List<AttrTO> res = new ArrayList<>(membershipTO.getVirAttrs());
-        Collections.sort(res, new AttrComparator());
-        return res;
+        return 
membershipTO.getVirAttrs().stream().sorted(attrComparator).collect(Collectors.toList());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java
 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java
index de9191f..4976641 100644
--- 
a/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java
+++ 
b/client/console/src/main/java/org/apache/syncope/client/console/wizards/resources/ResourceProvisionPanel.java
@@ -304,8 +304,8 @@ public class ResourceProvisionPanel extends 
AbstractModalPanel<Serializable> {
     }
 
     private void sortProvisions() {
-        Collections.sort(provisions, (o1, o2)
-                -> new 
AnyTypeRestClient.AnyTypeKeyComparator().compare(o1.getAnyType(), 
o2.getAnyType()));
+        Collections.sort(provisions,
+                (o1, o2) -> 
AnyTypeRestClient.KEY_COMPARATOR.compare(o1.getAnyType(), o2.getAnyType()));
     }
 
     private LoadableDetachableModel<List<String>> getAnyTypes() {
@@ -322,7 +322,7 @@ public class ResourceProvisionPanel extends 
AbstractModalPanel<Serializable> {
                     anyTypes.add(SyncopeConstants.REALM_ANYTYPE);
                 }
 
-                Collections.sort(anyTypes, new 
AnyTypeRestClient.AnyTypeKeyComparator());
+                Collections.sort(anyTypes, AnyTypeRestClient.KEY_COMPARATOR);
                 return anyTypes;
             }
         };

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal.html
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal.html
 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal.html
index 790398a..5d5d129 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal.html
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal.html
@@ -17,10 +17,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 <html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org";>
-  <head><title></title></head>
-  <body>
-    <wicket:panel>
-      <span wicket:id="approval">[APPROVAL]</span>
-    </wicket:panel>
-  </body>
+  <wicket:panel>
+    <span wicket:id="approval">[APPROVAL]</span>
+  </wicket:panel>
 </html>

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_it.properties
new file mode 100644
index 0000000..941c896
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_it.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+approval.details=Approval details

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_pt_BR.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_pt_BR.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_pt_BR.properties
new file mode 100644
index 0000000..941c896
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_pt_BR.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+approval.details=Approval details

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_ru.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_ru.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_ru.properties
new file mode 100644
index 0000000..941c896
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/approvals/ApprovalModal_ru.properties
@@ -0,0 +1,17 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+approval.details=Approval details

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
index c23ace8..7b8e4e1 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/BasePage.html
@@ -60,6 +60,10 @@ under the License.
             <ul class="nav navbar-nav">
 
               <li class="dropdown tasks-menu">
+                <span wicket:id="remediationWidget"/>
+              </li>
+
+              <li class="dropdown tasks-menu">
                 <span wicket:id="approvalsWidget"/>
               </li>
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.html
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.html
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.html
new file mode 100644
index 0000000..24934ce
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.html
@@ -0,0 +1,35 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org";>
+  <wicket:extend>
+    <section class="content-header">
+      <h1>&nbsp;</h1>
+      <ol class="breadcrumb">
+        <li><a wicket:id="dashboardBr"><i class="fa fa-dashboard"></i> 
<wicket:message key="dashboard">[DASHBOARD]</wicket:message></a></li>
+        <li class="active"><wicket:message key="remediations"/></li>
+      </ol>
+    </section>
+
+    <section class="content" wicket:id="content">
+      <div class="box">
+        <div class="box-body" wicket:id="remediations"/>
+      </div>
+    </section>
+  </wicket:extend>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.properties
new file mode 100644
index 0000000..5225dbb
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+remediations=Remediations
+anyType=Type
+operation=Operation
+remoteName=Remote name
+resource=Resource
+instant=Instant
+remedy=Remedy
+view_details.title=view error
+close.title=remedy
+edit.title=remedy
+any.edit=Remedy

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_it.properties
new file mode 100644
index 0000000..7cb14e6
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_it.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+remediations=Bonifiche
+anyType=Tipo
+operation=Operazione
+remoteName=Nome remoto
+resource=Risorsa
+instant=Istante
+remedy=Bonifica
+view_details.title=vedi errore
+close.title=bonifica
+edit.title=bonifica
+any.edit=Bonifica

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ja.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ja.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ja.properties
new file mode 100644
index 0000000..5225dbb
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ja.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+remediations=Remediations
+anyType=Type
+operation=Operation
+remoteName=Remote name
+resource=Resource
+instant=Instant
+remedy=Remedy
+view_details.title=view error
+close.title=remedy
+edit.title=remedy
+any.edit=Remedy

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_pt_BR.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_pt_BR.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_pt_BR.properties
new file mode 100644
index 0000000..5225dbb
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_pt_BR.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+remediations=Remediations
+anyType=Type
+operation=Operation
+remoteName=Remote name
+resource=Resource
+instant=Instant
+remedy=Remedy
+view_details.title=view error
+close.title=remedy
+edit.title=remedy
+any.edit=Remedy

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ru.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ru.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ru.properties
new file mode 100644
index 0000000..5225dbb
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Remediations_ru.properties
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+remediations=Remediations
+anyType=Type
+operation=Operation
+remoteName=Remote name
+resource=Resource
+instant=Instant
+remedy=Remedy
+view_details.title=view error
+close.title=remedy
+edit.title=remedy
+any.edit=Remedy

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_it.properties
index 6295415..1b03294 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_it.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_it.properties
@@ -15,5 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 any.edit=Modifica ${anyTO.type} ${anyTO.username}
-any.propagation.tasks=Task di propagazione per ${type} ${name}
+any.propagation.tasks=Task di propagazione per ${type} ${username}
 any.notification.tasks=Task di notifica per ${type} ${username}

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_pt_BR.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_pt_BR.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_pt_BR.properties
index 9ef0ad9..9498b19 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_pt_BR.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/panels/UserDirectoryPanel_pt_BR.properties
@@ -15,5 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 any.edit=Alterar ${anyTO.type} ${anyTO.username}
-any.propagation.tasks=Propagation tasks for ${type} ${name}
+any.propagation.tasks=Propagation tasks for ${type} ${username}
 any.notification.tasks=Notification tasks for ${type} ${username}

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
index 7e8d0c2..e3903e1 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_it.properties
@@ -99,7 +99,7 @@ not_found.title=not found
 not_found.alt=not found icon
 
 view.class=fa fa-eye
-view.title=view
+view.title=vedi
 view.alt=view icon
 
 view_executions.class=fa fa-eye
@@ -107,7 +107,7 @@ view_executions.title=view executions
 view_executions.alt=view executions icon
 
 view_details.class=fa fa-info-circle
-view_details.title=view details
+view_details.title=dettagli
 view_details.alt=view details icon
 
 members.class=fa fa-users

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
index d363d25..db15243 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/wicket/markup/html/form/ActionPanel_ru.properties
@@ -99,7 +99,7 @@ not_found.title=non trovato
 not_found.alt=not found icon
 
 view.class=fa fa-eye
-view.title=vedi
+view.title=view
 view.alt=view icon
 
 view_executions.class=fa fa-eye

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
index bdf7ec7..dd5b98f 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=View All approvals
+alerts.view.all=View all approvals
 duedate=Due date
 owner=Owner
 createApproval=Create Approval

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
index ca41eeb..7b2287e 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_it.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=Tutti le approvazioni
+alerts.view.all=Tutte le approvazioni
 duedate=Scadenza
 owner=Assegnato
 createApproval=Approvazione Creazione

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
index 4ded669..c24f3d8 100644
--- 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/ApprovalsWidget_pt_BR.properties
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-alerts.view.all=View All Approvals
+alerts.view.all=View all Approvals
 duedate=Due date
 owner=Owner
 createApproval=Create Approval

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget$InnerPanel.html
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget$InnerPanel.html
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget$InnerPanel.html
new file mode 100644
index 0000000..3ffaa88
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget$InnerPanel.html
@@ -0,0 +1,26 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:wicket="http://wicket.apache.org";>
+  <wicket:panel>
+    <a href="#" wicket:id="remediation" style="cursor: not-allowed;">
+      <h3><small class="pull-right" wicket:id="resource"/> <p 
wicket:id="label"/></h3>
+      <small><i class="fa fa-clock-o"></i> <p wicket:id="instant"/></small>
+    </a>
+  </wicket:panel>
+</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget.properties
new file mode 100644
index 0000000..86459d6
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+alerts.view.all=View all remediations
+summary=${number} pending remediation(s)

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_it.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_it.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_it.properties
new file mode 100644
index 0000000..8e2ad5c
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_it.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+alerts.view.all=Tutte le bonifiche
+summary=${number} bonifiche da gestire

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ja.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ja.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ja.properties
new file mode 100644
index 0000000..86459d6
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ja.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+alerts.view.all=View all remediations
+summary=${number} pending remediation(s)

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_pt_BR.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_pt_BR.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_pt_BR.properties
new file mode 100644
index 0000000..e1dcb2f
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_pt_BR.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+alerts.view.all=View all remediations
+summary=${number} pending approval(s)

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ru.properties
----------------------------------------------------------------------
diff --git 
a/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ru.properties
 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ru.properties
new file mode 100644
index 0000000..4005512
--- /dev/null
+++ 
b/client/console/src/main/resources/org/apache/syncope/client/console/widgets/RemediationsWidget_ru.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+alerts.view.all=View all remediations
+summary=${number} pending remediation(s)

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RemediationTO.java
----------------------------------------------------------------------
diff --git 
a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RemediationTO.java 
b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RemediationTO.java
index 0b971cd..7561bb1 100644
--- 
a/common/lib/src/main/java/org/apache/syncope/common/lib/to/RemediationTO.java
+++ 
b/common/lib/src/main/java/org/apache/syncope/common/lib/to/RemediationTO.java
@@ -25,7 +25,6 @@ import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlType;
 import org.apache.syncope.common.lib.AbstractBaseBean;
 import org.apache.syncope.common.lib.patch.AnyPatch;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ResourceOperation;
 
 @XmlRootElement(name = "remediation")
@@ -36,7 +35,7 @@ public class RemediationTO extends AbstractBaseBean 
implements EntityTO {
 
     private String key;
 
-    private AnyTypeKind anyTypeKind;
+    private String anyType;
 
     private ResourceOperation operation;
 
@@ -68,12 +67,12 @@ public class RemediationTO extends AbstractBaseBean 
implements EntityTO {
     }
 
     @Schema(accessMode = Schema.AccessMode.READ_ONLY)
-    public AnyTypeKind getAnyTypeKind() {
-        return anyTypeKind;
+    public String getAnyType() {
+        return anyType;
     }
 
-    public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
-        this.anyTypeKind = anyTypeKind;
+    public void setAnyType(final String anyType) {
+        this.anyType = anyType;
     }
 
     @Schema(accessMode = Schema.AccessMode.READ_ONLY)

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/logic/src/main/java/org/apache/syncope/core/logic/RemediationLogic.java
----------------------------------------------------------------------
diff --git 
a/core/logic/src/main/java/org/apache/syncope/core/logic/RemediationLogic.java 
b/core/logic/src/main/java/org/apache/syncope/core/logic/RemediationLogic.java
index 1fb93e0..67257cf 100644
--- 
a/core/logic/src/main/java/org/apache/syncope/core/logic/RemediationLogic.java
+++ 
b/core/logic/src/main/java/org/apache/syncope/core/logic/RemediationLogic.java
@@ -102,7 +102,7 @@ public class RemediationLogic extends 
AbstractTransactionalLogic<RemediationTO>
         }
 
         ProvisioningResult<?> result;
-        switch (remediation.getAnyTypeKind()) {
+        switch (remediation.getAnyType().getKind()) {
             case USER:
             default:
                 result = userLogic.create((UserTO) anyTO, true, 
nullPriorityAsync);
@@ -131,7 +131,7 @@ public class RemediationLogic extends 
AbstractTransactionalLogic<RemediationTO>
         }
 
         ProvisioningResult<?> result;
-        switch (remediation.getAnyTypeKind()) {
+        switch (remediation.getAnyType().getKind()) {
             case USER:
             default:
                 result = userLogic.update((UserPatch) anyPatch, 
nullPriorityAsync);
@@ -160,7 +160,7 @@ public class RemediationLogic extends 
AbstractTransactionalLogic<RemediationTO>
         }
 
         ProvisioningResult<?> result;
-        switch (remediation.getAnyTypeKind()) {
+        switch (remediation.getAnyType().getKind()) {
             case USER:
             default:
                 result = userLogic.delete(anyKey, nullPriorityAsync);

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/RemediationDAO.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/RemediationDAO.java
 
b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/RemediationDAO.java
index f00cb8a..368f427 100644
--- 
a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/RemediationDAO.java
+++ 
b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/dao/RemediationDAO.java
@@ -19,6 +19,7 @@
 package org.apache.syncope.core.persistence.api.dao;
 
 import java.util.List;
+import org.apache.syncope.core.persistence.api.entity.AnyType;
 import org.apache.syncope.core.persistence.api.entity.Remediation;
 import org.apache.syncope.core.persistence.api.entity.task.PullTask;
 
@@ -26,6 +27,8 @@ public interface RemediationDAO extends DAO<Remediation> {
 
     Remediation find(String key);
 
+    List<Remediation> findByAnyType(AnyType anyType);
+
     List<Remediation> findByPullTask(PullTask pullTask);
 
     List<Remediation> findAll();

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Remediation.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Remediation.java
 
b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Remediation.java
index 1278241..d46cb21 100644
--- 
a/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Remediation.java
+++ 
b/core/persistence-api/src/main/java/org/apache/syncope/core/persistence/api/entity/Remediation.java
@@ -21,15 +21,14 @@ package org.apache.syncope.core.persistence.api.entity;
 import java.util.Date;
 import org.apache.syncope.common.lib.patch.AnyPatch;
 import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ResourceOperation;
 import org.apache.syncope.core.persistence.api.entity.task.PullTask;
 
 public interface Remediation extends Entity {
 
-    AnyTypeKind getAnyTypeKind();
+    AnyType getAnyType();
 
-    void setAnyTypeKind(AnyTypeKind anyTypeKind);
+    void setAnyType(AnyType anyType);
 
     ResourceOperation getOperation();
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAnyTypeDAO.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAnyTypeDAO.java
 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAnyTypeDAO.java
index 477b655..ea26550 100644
--- 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAnyTypeDAO.java
+++ 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAAnyTypeDAO.java
@@ -22,15 +22,20 @@ import java.util.List;
 import javax.persistence.TypedQuery;
 import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
+import org.apache.syncope.core.persistence.api.dao.RemediationDAO;
 import org.apache.syncope.core.persistence.api.entity.AnyType;
 import org.apache.syncope.core.persistence.api.entity.AnyTypeClass;
 import org.apache.syncope.core.persistence.jpa.entity.JPAAnyType;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Repository;
 import org.springframework.transaction.annotation.Transactional;
 
 @Repository
 public class JPAAnyTypeDAO extends AbstractDAO<AnyType> implements AnyTypeDAO {
 
+    @Autowired
+    private RemediationDAO remediationDAO;
+
     @Transactional(readOnly = true)
     @Override
     public AnyType find(final String key) {
@@ -82,6 +87,11 @@ public class JPAAnyTypeDAO extends AbstractDAO<AnyType> 
implements AnyTypeDAO {
             throw new IllegalArgumentException(key + " cannot be deleted");
         }
 
+        remediationDAO.findByAnyType(anyType).forEach(remediation -> {
+            remediation.setAnyType(null);
+            remediationDAO.delete(remediation);
+        });
+
         entityManager().remove(anyType);
     }
 

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARemediationDAO.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARemediationDAO.java
 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARemediationDAO.java
index b78c425..fa7a044 100644
--- 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARemediationDAO.java
+++ 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPARemediationDAO.java
@@ -21,6 +21,7 @@ package org.apache.syncope.core.persistence.jpa.dao;
 import java.util.List;
 import javax.persistence.TypedQuery;
 import org.apache.syncope.core.persistence.api.dao.RemediationDAO;
+import org.apache.syncope.core.persistence.api.entity.AnyType;
 import org.apache.syncope.core.persistence.api.entity.Remediation;
 import org.apache.syncope.core.persistence.api.entity.task.PullTask;
 import org.apache.syncope.core.persistence.jpa.entity.JPARemediation;
@@ -35,6 +36,15 @@ public class JPARemediationDAO extends 
AbstractDAO<Remediation> implements Remed
     }
 
     @Override
+    public List<Remediation> findByAnyType(final AnyType anyType) {
+        TypedQuery<Remediation> query = entityManager().createQuery(
+                "SELECT e FROM " + JPARemediation.class.getSimpleName() + " e 
WHERE e.anyType=:anyType",
+                Remediation.class);
+        query.setParameter("anyType", anyType);
+        return query.getResultList();
+    }
+
+    @Override
     public List<Remediation> findByPullTask(final PullTask pullTask) {
         TypedQuery<Remediation> query = entityManager().createQuery(
                 "SELECT e FROM " + JPARemediation.class.getSimpleName() + " e 
WHERE e.pullTask=:pullTask",

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARemediation.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARemediation.java
 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARemediation.java
index 6f31cc9..fab22bb 100644
--- 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARemediation.java
+++ 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/JPARemediation.java
@@ -30,8 +30,8 @@ import javax.persistence.TemporalType;
 import javax.validation.constraints.NotNull;
 import org.apache.syncope.common.lib.patch.AnyPatch;
 import org.apache.syncope.common.lib.to.AnyTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.ResourceOperation;
+import org.apache.syncope.core.persistence.api.entity.AnyType;
 import org.apache.syncope.core.persistence.api.entity.Remediation;
 import org.apache.syncope.core.persistence.api.entity.task.PullTask;
 import org.apache.syncope.core.persistence.jpa.entity.task.JPAPullTask;
@@ -47,9 +47,8 @@ public class JPARemediation extends 
AbstractGeneratedKeyEntity implements Remedi
 
     public static final String TABLE = "Remediation";
 
-    @NotNull
-    @Enumerated(EnumType.STRING)
-    private AnyTypeKind anyTypeKind;
+    @ManyToOne
+    private JPAAnyType anyType;
 
     @NotNull
     @Enumerated(EnumType.STRING)
@@ -74,13 +73,14 @@ public class JPARemediation extends 
AbstractGeneratedKeyEntity implements Remedi
     private String remoteName;
 
     @Override
-    public AnyTypeKind getAnyTypeKind() {
-        return anyTypeKind;
+    public AnyType getAnyType() {
+        return anyType;
     }
 
     @Override
-    public void setAnyTypeKind(final AnyTypeKind anyTypeKind) {
-        this.anyTypeKind = anyTypeKind;
+    public void setAnyType(final AnyType anyType) {
+        checkType(anyType, JPAAnyType.class);
+        this.anyType = (JPAAnyType) anyType;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RemediationValidator.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RemediationValidator.java
 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RemediationValidator.java
index 25f9fb2..e9eff97 100644
--- 
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RemediationValidator.java
+++ 
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/validation/entity/RemediationValidator.java
@@ -31,11 +31,11 @@ public class RemediationValidator extends 
AbstractValidator<RemediationCheck, Re
 
         switch (remediation.getOperation()) {
             case CREATE:
-                if 
(remediation.getPayloadAsTO(remediation.getAnyTypeKind().getTOClass()) == null) 
{
+                if 
(remediation.getPayloadAsTO(remediation.getAnyType().getKind().getTOClass()) == 
null) {
                     context.disableDefaultConstraintViolation();
                     context.buildConstraintViolationWithTemplate(
                             getTemplate(EntityViolationType.InvalidRemediation,
-                                    "Expected " + 
remediation.getAnyTypeKind().getTOClass().getName())).
+                                    "Expected " + 
remediation.getAnyType().getKind().getTOClass().getName())).
                             
addPropertyNode("payload").addConstraintViolation();
 
                     isValid = false;
@@ -43,11 +43,11 @@ public class RemediationValidator extends 
AbstractValidator<RemediationCheck, Re
                 break;
 
             case UPDATE:
-                if 
(remediation.getPayloadAsPatch(remediation.getAnyTypeKind().getPatchClass()) == 
null) {
+                if 
(remediation.getPayloadAsPatch(remediation.getAnyType().getKind().getPatchClass())
 == null) {
                     context.disableDefaultConstraintViolation();
                     context.buildConstraintViolationWithTemplate(
                             getTemplate(EntityViolationType.InvalidRemediation,
-                                    "Expected " + 
remediation.getAnyTypeKind().getPatchClass().getName())).
+                                    "Expected " + 
remediation.getAnyType().getKind().getPatchClass().getName())).
                             
addPropertyNode("payload").addConstraintViolation();
 
                     isValid = false;

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RemediationTest.java
----------------------------------------------------------------------
diff --git 
a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RemediationTest.java
 
b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RemediationTest.java
index 02315fa..34b26eb 100644
--- 
a/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RemediationTest.java
+++ 
b/core/persistence-jpa/src/test/java/org/apache/syncope/core/persistence/jpa/inner/RemediationTest.java
@@ -28,10 +28,10 @@ import java.util.Date;
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
 import org.apache.syncope.common.lib.types.EntityViolationType;
 import org.apache.syncope.common.lib.types.ResourceOperation;
 import 
org.apache.syncope.core.persistence.api.attrvalue.validation.InvalidEntityException;
+import org.apache.syncope.core.persistence.api.dao.AnyTypeDAO;
 import org.apache.syncope.core.persistence.api.dao.RemediationDAO;
 import org.apache.syncope.core.persistence.api.dao.TaskDAO;
 import org.apache.syncope.core.persistence.api.entity.Remediation;
@@ -47,6 +47,9 @@ public class RemediationTest extends AbstractTest {
     private RemediationDAO remediationDAO;
 
     @Autowired
+    private AnyTypeDAO anyTypeDAO;
+
+    @Autowired
     private TaskDAO taskDAO;
 
     @Test
@@ -58,7 +61,7 @@ public class RemediationTest extends AbstractTest {
     @Test
     public void create() {
         Remediation remediation = entityFactory.newEntity(Remediation.class);
-        remediation.setAnyTypeKind(AnyTypeKind.ANY_OBJECT);
+        remediation.setAnyType(anyTypeDAO.find("PRINTER"));
         remediation.setOperation(ResourceOperation.CREATE);
         remediation.setError("Error");
         remediation.setInstant(new Date());

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RemediationDataBinderImpl.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RemediationDataBinderImpl.java
 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RemediationDataBinderImpl.java
index d95f866..36bac89 100644
--- 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RemediationDataBinderImpl.java
+++ 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/data/RemediationDataBinderImpl.java
@@ -28,7 +28,7 @@ import org.springframework.stereotype.Component;
 public class RemediationDataBinderImpl implements RemediationDataBinder {
 
     private static final String[] IGNORE_PROPERTIES = {
-        "payload", "anyTOPayload", "anyPatchPayload", "keyPayload", "pullTask" 
};
+        "anyType", "payload", "anyTOPayload", "anyPatchPayload", "keyPayload", 
"pullTask" };
 
     @Override
     public RemediationTO getRemediationTO(final Remediation remediation) {
@@ -39,12 +39,12 @@ public class RemediationDataBinderImpl implements 
RemediationDataBinder {
         switch (remediation.getOperation()) {
             case CREATE:
                 remediationTO.setAnyTOPayload(
-                        
remediation.getPayloadAsTO(remediation.getAnyTypeKind().getTOClass()));
+                        
remediation.getPayloadAsTO(remediation.getAnyType().getKind().getTOClass()));
                 break;
 
             case UPDATE:
                 remediationTO.setAnyPatchPayload(
-                        
remediation.getPayloadAsPatch(remediation.getAnyTypeKind().getPatchClass()));
+                        
remediation.getPayloadAsPatch(remediation.getAnyType().getKind().getPatchClass()));
                 break;
 
             case DELETE:
@@ -54,6 +54,8 @@ public class RemediationDataBinderImpl implements 
RemediationDataBinder {
             default:
         }
 
+        remediationTO.setAnyType(remediation.getAnyType().getKey());
+
         if (remediation.getPullTask() != null) {
             remediationTO.setPullTask(remediation.getPullTask().getKey());
             
remediationTO.setResource(remediation.getPullTask().getResource().getKey());

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
----------------------------------------------------------------------
diff --git 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
index 5efe18c..3abbd84 100644
--- 
a/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
+++ 
b/core/provisioning-java/src/main/java/org/apache/syncope/core/provisioning/java/pushpull/AbstractPullResultHandler.java
@@ -217,7 +217,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
                 action.beforeAssign(profile, delta, anyTO);
             }
 
-            create(anyTO, delta, 
UnmatchingRule.toEventName(UnmatchingRule.ASSIGN), result);
+            create(anyTO, delta, 
UnmatchingRule.toEventName(UnmatchingRule.ASSIGN), provision, result);
         }
 
         return Collections.singletonList(result);
@@ -249,7 +249,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
                 action.beforeProvision(profile, delta, anyTO);
             }
 
-            create(anyTO, delta, 
UnmatchingRule.toEventName(UnmatchingRule.PROVISION), result);
+            create(anyTO, delta, 
UnmatchingRule.toEventName(UnmatchingRule.PROVISION), provision, result);
         }
 
         return Collections.singletonList(result);
@@ -277,6 +277,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
             final AnyTO anyTO,
             final SyncDelta delta,
             final String operation,
+            final Provision provision,
             final ProvisioningReport result)
             throws JobExecutionException {
 
@@ -312,7 +313,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
 
             if (profile.getTask().isRemediation()) {
                 Remediation entity = 
entityFactory.newEntity(Remediation.class);
-                entity.setAnyTypeKind(getAnyUtils().getAnyTypeKind());
+                entity.setAnyType(provision.getAnyType());
                 entity.setOperation(ResourceOperation.CREATE);
                 entity.setPayload(anyTO);
                 entity.setError(result.getMessage());
@@ -411,7 +412,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
 
                         if (profile.getTask().isRemediation()) {
                             Remediation entity = 
entityFactory.newEntity(Remediation.class);
-                            
entity.setAnyTypeKind(provision.getAnyType().getKind());
+                            entity.setAnyType(provision.getAnyType());
                             entity.setOperation(ResourceOperation.UPDATE);
                             entity.setPayload(anyPatch);
                             entity.setError(result.getMessage());
@@ -699,7 +700,7 @@ public abstract class AbstractPullResultHandler extends 
AbstractSyncopeResultHan
 
                         if (profile.getTask().isRemediation()) {
                             Remediation entity = 
entityFactory.newEntity(Remediation.class);
-                            
entity.setAnyTypeKind(provision.getAnyType().getKind());
+                            entity.setAnyType(provision.getAnyType());
                             entity.setOperation(ResourceOperation.DELETE);
                             entity.setPayload(key);
                             entity.setError(result.getMessage());

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RemediationServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RemediationServiceImpl.java
 
b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RemediationServiceImpl.java
index 201bb48..91340b1 100644
--- 
a/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RemediationServiceImpl.java
+++ 
b/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/RemediationServiceImpl.java
@@ -76,23 +76,22 @@ public class RemediationServiceImpl extends 
AbstractServiceImpl implements Remed
         RemediationTO remediation = logic.read(key);
 
         AnyDAO<?> anyDAO;
-        switch (remediation.getAnyTypeKind()) {
-            case USER:
-            default:
+        switch (remediation.getAnyType()) {
+            case "USER":
                 anyDAO = userDAO;
                 break;
 
-            case GROUP:
+            case "GROUP":
                 anyDAO = groupDAO;
                 break;
 
-            case ANY_OBJECT:
+            default:
                 anyDAO = anyObjectDAO;
         }
 
         Date etagDate = anyDAO.findLastChange(anyKey);
         if (etagDate == null) {
-            throw new NotFoundException(remediation.getAnyTypeKind().name() + 
" for " + key);
+            throw new NotFoundException(remediation.getAnyType() + " for " + 
key);
         }
         checkETag(String.valueOf(etagDate.getTime()));
     }

http://git-wip-us.apache.org/repos/asf/syncope/blob/4e781f4a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
----------------------------------------------------------------------
diff --git 
a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
 
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
index 68f9d89..4edb57e 100644
--- 
a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
+++ 
b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/PullTaskITCase.java
@@ -709,7 +709,7 @@ public class PullTaskITCase extends AbstractTaskITCase {
                     filter(r -> 
"uid=pullFromLDAP,ou=People,o=isp".equalsIgnoreCase(r.getRemoteName())).
                     findFirst();
             assertTrue(remediation.isPresent());
-            assertEquals(AnyTypeKind.USER, remediation.get().getAnyTypeKind());
+            assertEquals(AnyTypeKind.USER.name(), 
remediation.get().getAnyType());
             assertEquals(ResourceOperation.CREATE, 
remediation.get().getOperation());
             assertNotNull(remediation.get().getAnyTOPayload());
             assertNull(remediation.get().getAnyPatchPayload());

Reply via email to