This is an automated email from the ASF dual-hosted git repository.
ilgrosso pushed a commit to branch 3_0_X
in repository https://gitbox.apache.org/repos/asf/syncope.git
The following commit(s) were added to refs/heads/3_0_X by this push:
new c1ac697885 Cleanup
c1ac697885 is described below
commit c1ac697885a11e25717d10393990df39651a14bb
Author: Francesco Chicchiriccò <[email protected]>
AuthorDate: Mon Jan 15 15:01:17 2024 +0100
Cleanup
---
.../client-api/src/main/resources/defaultContent.xml | 15 ++++++++++++---
.../src/main/resources/myjson/indexes.xml | 1 -
.../src/main/resources/ojson/indexes.xml | 1 -
.../src/main/resources/pgjsonb/indexes.xml | 1 -
.../syncope/core/persistence/jpa/dao/JPAGroupDAO.java | 8 --------
.../src/main/resources/domains/MasterContent.xml | 3 +--
core/persistence-jpa/src/main/resources/indexes.xml | 1 -
.../persistence-jpa/src/main/resources/oracle_indexes.xml | 1 -
.../src/test/resources/domains/TwoContent.xml | 13 +++++++++++--
9 files changed, 24 insertions(+), 20 deletions(-)
diff --git a/common/keymaster/client-api/src/main/resources/defaultContent.xml
b/common/keymaster/client-api/src/main/resources/defaultContent.xml
index 6c16e24f57..bd53f4c2f8 100644
--- a/common/keymaster/client-api/src/main/resources/defaultContent.xml
+++ b/common/keymaster/client-api/src/main/resources/defaultContent.xml
@@ -25,8 +25,7 @@ under the License.
<AnyType_AnyTypeClass anyType_id="USER" anyTypeClass_id="BaseUser"/>
<AnyType id="GROUP" kind="GROUP"/>
-
- <!-- Actual plain schemas -->
+
<Implementation id="EmailAddressValidator" type="VALIDATOR" engine="JAVA"
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/>
<SyncopeSchema id="email"/>
@@ -34,6 +33,12 @@ under the License.
mandatoryCondition="false" multivalue="0" uniqueConstraint="0"
readonly="0"
validator_id="EmailAddressValidator"/>
+ <Implementation id="BinaryValidator" type="VALIDATOR" engine="JAVA"
+
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.BinaryValidator"/>
+
+ <Implementation id="MacroRunJobDelegate" type="TASKJOB_DELEGATE"
engine="JAVA"
+
body="org.apache.syncope.core.logic.job.MacroRunJobDelegate"/>
+
<Implementation id="PullJobDelegate" type="TASKJOB_DELEGATE" engine="JAVA"
body="org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate"/>
<Implementation id="PushJobDelegate" type="TASKJOB_DELEGATE" engine="JAVA"
@@ -43,7 +48,11 @@ under the License.
body="org.apache.syncope.core.provisioning.java.job.ExpiredAccessTokenCleanup"/>
<SchedTask id="89de5014-e3f5-4462-84d8-d97575740baf" name="Access Token
Cleanup Task" active="1"
jobDelegate_id="ExpiredAccessTokenCleanup" cronExpression="0 0/5
* * * ?"/>
-
+ <Implementation id="ExpiredBatchCleanup" type="TASKJOB_DELEGATE"
engine="JAVA"
+
body="org.apache.syncope.core.provisioning.java.job.ExpiredBatchCleanup"/>
+ <SchedTask id="8ea0ea51-ce08-4fe3-a0c8-c281b31b5893" name="Expired Batch
Operations Cleanup Task" active="1"
+ jobDelegate_id="ExpiredBatchCleanup" cronExpression="0 0/5 * * *
?"/>
+
<!-- Password reset notifications -->
<MailTemplate id="requestPasswordReset"
textTemplate="Hi,
diff --git a/core/persistence-jpa-json/src/main/resources/myjson/indexes.xml
b/core/persistence-jpa-json/src/main/resources/myjson/indexes.xml
index 2dc39c44c9..8bc611e0ae 100644
--- a/core/persistence-jpa-json/src/main/resources/myjson/indexes.xml
+++ b/core/persistence-jpa-json/src/main/resources/myjson/indexes.xml
@@ -22,7 +22,6 @@ under the License.
<comment>Additional indexes (in respect to JPA's)</comment>
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON
Realm(parent_id)</entry>
- <entry key="Realm_fullPath">CREATE INDEX Realm_fullPath ON
Realm(fullPath)</entry>
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON
SyncopeUser(realm_id)</entry>
<entry key="SyncopeUser_username">CREATE UNIQUE INDEX SyncopeUser_username
ON SyncopeUser(username)</entry>
diff --git a/core/persistence-jpa-json/src/main/resources/ojson/indexes.xml
b/core/persistence-jpa-json/src/main/resources/ojson/indexes.xml
index c123fb7d41..ab9484c423 100644
--- a/core/persistence-jpa-json/src/main/resources/ojson/indexes.xml
+++ b/core/persistence-jpa-json/src/main/resources/ojson/indexes.xml
@@ -22,7 +22,6 @@ under the License.
<comment>Additional indexes (in respect to JPA's)</comment>
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON
Realm(parent_id)</entry>
- <entry key="Realm_fullPath">CREATE INDEX Realm_fullPath ON
Realm(fullPath)</entry>
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON
SyncopeUser(realm_id)</entry>
<entry key="SyncopeUser_lower_username">CREATE INDEX
SyncopeUser_lower_username ON SyncopeUser(LOWER(username))</entry>
diff --git a/core/persistence-jpa-json/src/main/resources/pgjsonb/indexes.xml
b/core/persistence-jpa-json/src/main/resources/pgjsonb/indexes.xml
index dc9981f4d8..ee2ca34ea4 100644
--- a/core/persistence-jpa-json/src/main/resources/pgjsonb/indexes.xml
+++ b/core/persistence-jpa-json/src/main/resources/pgjsonb/indexes.xml
@@ -22,7 +22,6 @@ under the License.
<comment>Additional indexes (in respect to JPA's)</comment>
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON
Realm(parent_id)</entry>
- <entry key="Realm_fullPath">CREATE INDEX Realm_fullPath ON
Realm(fullPath)</entry>
<entry key="Realm_fullPath_startsWith">CREATE INDEX
Realm_fullPath_startsWith ON Realm USING GIN (to_tsvector('english',
fullPath))</entry>
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON
SyncopeUser(realm_id)</entry>
diff --git
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAGroupDAO.java
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAGroupDAO.java
index 088d58fc42..8e2c6c6ea7 100644
---
a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAGroupDAO.java
+++
b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/dao/JPAGroupDAO.java
@@ -546,10 +546,6 @@ public class JPAGroupDAO extends AbstractAnyDAO<Group>
implements GroupDAO {
@Transactional
@Override
public Pair<Set<String>, Set<String>> refreshDynMemberships(final
AnyObject anyObject) {
- Query query = entityManager().createNativeQuery(
- "SELECT group_id FROM " + JPAGroupDAO.ADYNMEMB_TABLE + " WHERE
any_id=?");
- query.setParameter(1, anyObject.getKey());
-
Set<String> before = new HashSet<>();
Set<String> after = new HashSet<>();
findWithADynMemberships(anyObject.getType()).forEach(memb -> {
@@ -645,10 +641,6 @@ public class JPAGroupDAO extends AbstractAnyDAO<Group>
implements GroupDAO {
@Transactional
@Override
public Pair<Set<String>, Set<String>> refreshDynMemberships(final User
user) {
- Query query = entityManager().createNativeQuery(
- "SELECT group_id FROM " + JPAGroupDAO.UDYNMEMB_TABLE + " WHERE
any_id=?");
- query.setParameter(1, user.getKey());
-
Set<String> before = new HashSet<>();
Set<String> after = new HashSet<>();
findWithUDynMemberships().forEach(memb -> {
diff --git a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml
b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml
index 68ef918311..d34c640b3e 100644
--- a/core/persistence-jpa/src/main/resources/domains/MasterContent.xml
+++ b/core/persistence-jpa/src/main/resources/domains/MasterContent.xml
@@ -28,14 +28,13 @@ under the License.
<AnyTypeClass id="BaseGroup"/>
<AnyType_AnyTypeClass anyType_id="GROUP" anyTypeClass_id="BaseGroup"/>
- <!-- Actual plain schemas -->
<Implementation id="EmailAddressValidator" type="VALIDATOR" engine="JAVA"
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/>
<SyncopeSchema id="email"/>
<PlainSchema id="email" type="String" anyTypeClass_id="BaseUser"
mandatoryCondition="false" multivalue="0" uniqueConstraint="0"
readonly="0"
validator_id="EmailAddressValidator"/>
-
+
<Implementation id="BinaryValidator" type="VALIDATOR" engine="JAVA"
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.BinaryValidator"/>
diff --git a/core/persistence-jpa/src/main/resources/indexes.xml
b/core/persistence-jpa/src/main/resources/indexes.xml
index e864514038..496730805d 100644
--- a/core/persistence-jpa/src/main/resources/indexes.xml
+++ b/core/persistence-jpa/src/main/resources/indexes.xml
@@ -22,7 +22,6 @@ under the License.
<comment>Additional indexes (in respect to JPA's)</comment>
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON
Realm(parent_id)</entry>
- <entry key="Realm_fullPath">CREATE INDEX Realm_fullPath ON
Realm(fullPath)</entry>
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON
SyncopeUser(realm_id)</entry>
<entry key="SyncopeUser_username">CREATE UNIQUE INDEX SyncopeUser_username
ON SyncopeUser(username)</entry>
diff --git a/core/persistence-jpa/src/main/resources/oracle_indexes.xml
b/core/persistence-jpa/src/main/resources/oracle_indexes.xml
index bb2d4d4499..91b43e4467 100644
--- a/core/persistence-jpa/src/main/resources/oracle_indexes.xml
+++ b/core/persistence-jpa/src/main/resources/oracle_indexes.xml
@@ -22,7 +22,6 @@ under the License.
<comment>Additional indexes (in respect to JPA's)</comment>
<entry key="Realm_parent_id">CREATE INDEX Realm_parent_id ON
Realm(parent_id)</entry>
- <entry key="Realm_fullPath">CREATE INDEX Realm_fullPath ON
Realm(fullPath)</entry>
<entry key="SyncopeUser_realm_id">CREATE INDEX SyncopeUser_realm_id ON
SyncopeUser(realm_id)</entry>
<entry key="SyncopeUser_lower_username">CREATE INDEX
SyncopeUser_lower_username ON SyncopeUser(LOWER(username))</entry>
diff --git a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
index 43c75da1dd..872380a4fc 100644
--- a/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
+++ b/core/persistence-jpa/src/test/resources/domains/TwoContent.xml
@@ -26,7 +26,6 @@ under the License.
<AnyType id="GROUP" kind="GROUP"/>
- <!-- Actual plain schemas -->
<Implementation id="EmailAddressValidator" type="VALIDATOR" engine="JAVA"
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator"/>
<SyncopeSchema id="email"/>
@@ -34,6 +33,12 @@ under the License.
mandatoryCondition="false" multivalue="0" uniqueConstraint="0"
readonly="0"
validator_id="EmailAddressValidator"/>
+ <Implementation id="BinaryValidator" type="VALIDATOR" engine="JAVA"
+
body="org.apache.syncope.core.persistence.jpa.attrvalue.validation.BinaryValidator"/>
+
+ <Implementation id="MacroRunJobDelegate" type="TASKJOB_DELEGATE"
engine="JAVA"
+
body="org.apache.syncope.core.logic.job.MacroRunJobDelegate"/>
+
<Implementation id="PullJobDelegate" type="TASKJOB_DELEGATE" engine="JAVA"
body="org.apache.syncope.core.provisioning.java.pushpull.PullJobDelegate"/>
<Implementation id="PushJobDelegate" type="TASKJOB_DELEGATE" engine="JAVA"
@@ -43,7 +48,11 @@ under the License.
body="org.apache.syncope.core.provisioning.java.job.ExpiredAccessTokenCleanup"/>
<SchedTask id="89de5014-e3f5-4462-84d8-d97575740baf" name="Access Token
Cleanup Task" active="1"
jobDelegate_id="ExpiredAccessTokenCleanup" cronExpression="0 0/5
* * * ?"/>
-
+ <Implementation id="ExpiredBatchCleanup" type="TASKJOB_DELEGATE"
engine="JAVA"
+
body="org.apache.syncope.core.provisioning.java.job.ExpiredBatchCleanup"/>
+ <SchedTask id="8ea0ea51-ce08-4fe3-a0c8-c281b31b5893" name="Expired Batch
Operations Cleanup Task" active="1"
+ jobDelegate_id="ExpiredBatchCleanup" cronExpression="0 0/5 * * *
?"/>
+
<!-- Password reset notifications -->
<MailTemplate id="requestPasswordReset"
textTemplate="Hi,