This is an automated email from the ASF dual-hosted git repository. ahuber pushed a commit to branch v3 in repository https://gitbox.apache.org/repos/asf/causeway.git
commit a05dbc24a515a97dd4d2ccee4c7a985fb0d06310 Merge: 6224b40b98 9960f6a2f2 Author: Andi Huber <[email protected]> AuthorDate: Fri May 24 14:47:58 2024 +0200 merge from master .../partials/_presentation-layer-spi.adoc | 7 +++ .../publishing/log/EntityPropertyChangeLogger.java | 8 ++- .../spi/EntityPropertyChangeSubscriber.java | 14 +++++ .../services/repository/RepositoryService.java | 10 ++++ .../core/config/CausewayConfiguration.java | 22 ++++++++ .../additional-spring-configuration-metadata.json | 60 ++++++++++----------- .../EntityPropertyChangePublisherDefault.java | 14 +++-- .../applib/dom/AuditTrailEntryRepository.java | 5 ++ .../dom/AuditTrailEntryRepositoryAbstract.java | 7 +++ ...ntityPropertyChangeSubscriberForAuditTrail.java | 10 ++++ .../repository/RepositoryServiceDefault.java | 33 ++++++++++-- .../testdomain/fixtures/EntityTestFixtures.java | 24 ++++++++- .../causeway/testdomain/jdo/JdoTestFixtures.java | 12 +++++ .../causeway/testdomain/jpa/JpaTestFixtures.java | 11 ++++ .../persistence/jpa/JpaBootstrappingTest.java | 2 +- .../jpa/JpaPropertyBulkPublishingTest.java | 62 +++++++++++++++++++++ .../jpa/JpaPropertySinglePublishingTest.java | 63 ++++++++++++++++++++++ 17 files changed, 324 insertions(+), 40 deletions(-) diff --cc api/applib/src/main/java/org/apache/causeway/applib/services/publishing/log/EntityPropertyChangeLogger.java index c83b735be9,1e6ebaa8c7..d6eb31069e --- a/api/applib/src/main/java/org/apache/causeway/applib/services/publishing/log/EntityPropertyChangeLogger.java +++ b/api/applib/src/main/java/org/apache/causeway/applib/services/publishing/log/EntityPropertyChangeLogger.java @@@ -18,9 -18,11 +18,11 @@@ */ package org.apache.causeway.applib.services.publishing.log; -import javax.annotation.Priority; -import javax.inject.Named; +import jakarta.annotation.Priority; +import jakarta.inject.Named; + import org.apache.causeway.commons.collections.Can; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; diff --cc extensions/security/audittrail/applib/src/main/java/org/apache/causeway/extensions/audittrail/applib/spiimpl/EntityPropertyChangeSubscriberForAuditTrail.java index 59edf85927,9434ec34ec..a7a60e6d1b --- a/extensions/security/audittrail/applib/src/main/java/org/apache/causeway/extensions/audittrail/applib/spiimpl/EntityPropertyChangeSubscriberForAuditTrail.java +++ b/extensions/security/audittrail/applib/src/main/java/org/apache/causeway/extensions/audittrail/applib/spiimpl/EntityPropertyChangeSubscriberForAuditTrail.java @@@ -20,10 -20,12 +20,12 @@@ package org.apache.causeway.extensions.audittrail.applib.spiimpl; -import javax.annotation.Priority; -import javax.inject.Inject; -import javax.inject.Named; +import jakarta.annotation.Priority; +import jakarta.inject.Inject; +import jakarta.inject.Named; + import org.apache.causeway.commons.collections.Can; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; diff --cc regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertyBulkPublishingTest.java index 0000000000,ed9b8c2189..33cf6adfcd mode 000000,100644..100644 --- a/regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertyBulkPublishingTest.java +++ b/regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertyBulkPublishingTest.java @@@ -1,0 -1,62 +1,62 @@@ + /* + * 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. + */ + package org.apache.causeway.testdomain.publishing.jpa; + -import javax.inject.Inject; ++import jakarta.inject.Inject; + + import org.springframework.boot.test.context.SpringBootTest; + import org.springframework.test.annotation.DirtiesContext; + import org.springframework.test.context.TestPropertySource; + + import org.apache.causeway.core.config.presets.CausewayPresets; + import org.apache.causeway.testdomain.conf.Configuration_usingJpa; + import org.apache.causeway.testdomain.jpa.HasPersistenceStandardJpa; + import org.apache.causeway.testdomain.publishing.PublishingTestFactoryAbstract; + import org.apache.causeway.testdomain.publishing.PublishingTestFactoryJpa; + import org.apache.causeway.testdomain.publishing.conf.Configuration_usingEntityPropertyChangePublishing; + import org.apache.causeway.testdomain.publishing.stubs.PropertyPublishingTestAbstract; + + @SpringBootTest( + classes = { + Configuration_usingJpa.class, + Configuration_usingEntityPropertyChangePublishing.class, + PublishingTestFactoryJpa.class, + //XrayEnable.class + }, + properties = { + "logging.level.org.apache.causeway.applib.services.publishing.log.EntityPropertyChangeLogger=DEBUG", + "logging.level.org.springframework.orm.jpa.*=DEBUG", + "logging.level.org.apache.causeway.testdomain.util.rest.KVStoreForTesting=DEBUG", + }) + @TestPropertySource({ + CausewayPresets.UseLog4j2Test + }) + @DirtiesContext + class JpaPropertyBulkPublishingTest + extends PropertyPublishingTestAbstract + implements HasPersistenceStandardJpa { + + @Inject private PublishingTestFactoryJpa testFactory; + + @Override + protected PublishingTestFactoryAbstract getTestFactory() { + return testFactory; + } + + } diff --cc regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertySinglePublishingTest.java index 0000000000,2a26e4835d..ea61a88e5a mode 000000,100644..100644 --- a/regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertySinglePublishingTest.java +++ b/regressiontests/publishing-jpa/src/test/java/org/apache/causeway/testdomain/publishing/jpa/JpaPropertySinglePublishingTest.java @@@ -1,0 -1,63 +1,63 @@@ + /* + * 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. + */ + package org.apache.causeway.testdomain.publishing.jpa; + -import javax.inject.Inject; ++import jakarta.inject.Inject; + + import org.springframework.boot.test.context.SpringBootTest; + import org.springframework.test.annotation.DirtiesContext; + import org.springframework.test.context.TestPropertySource; + + import org.apache.causeway.core.config.presets.CausewayPresets; + import org.apache.causeway.testdomain.conf.Configuration_usingJpa; + import org.apache.causeway.testdomain.jpa.HasPersistenceStandardJpa; + import org.apache.causeway.testdomain.publishing.PublishingTestFactoryAbstract; + import org.apache.causeway.testdomain.publishing.PublishingTestFactoryJpa; + import org.apache.causeway.testdomain.publishing.conf.Configuration_usingEntityPropertyChangePublishing; + import org.apache.causeway.testdomain.publishing.stubs.PropertyPublishingTestAbstract; + + @SpringBootTest( + classes = { + Configuration_usingJpa.class, + Configuration_usingEntityPropertyChangePublishing.class, + PublishingTestFactoryJpa.class, + //XrayEnable.class + }, + properties = { + "logging.level.org.apache.causeway.applib.services.publishing.log.EntityPropertyChangeLogger=DEBUG", + "logging.level.org.springframework.orm.jpa.*=DEBUG", + "logging.level.org.apache.causeway.testdomain.util.rest.KVStoreForTesting=DEBUG", + "causeway.core.runtime-services.entity-property-change-publisher.bulk.threshold=1000", + }) + @TestPropertySource({ + CausewayPresets.UseLog4j2Test + }) + @DirtiesContext + class JpaPropertySinglePublishingTest + extends PropertyPublishingTestAbstract + implements HasPersistenceStandardJpa { + + @Inject private PublishingTestFactoryJpa testFactory; + + @Override + protected PublishingTestFactoryAbstract getTestFactory() { + return testFactory; + } + + }
