You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/12/30 19:11:01 UTC
[isis] branch 2033-Spring_Data_Integration updated: ISIS-2033:
remove homebrew tx events
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch 2033-Spring_Data_Integration
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/2033-Spring_Data_Integration by this push:
new 9c160d1 ISIS-2033: remove homebrew tx events
9c160d1 is described below
commit 9c160d15a65b88bd2fdc9cfcbbf591361e0cef9d
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Dec 30 20:10:47 2020 +0100
ISIS-2033: remove homebrew tx events
---
.../changetracking/EntityChangeTrackerDefault.java | 2 +-
.../changetracking/PreAndPostValues.java | 2 +-
.../events}/IsisTransactionPlaceholder.java | 2 +-
.../events/TransactionAfterBeginEvent.java | 31 ------------
.../events/TransactionAfterCommitEvent.java | 30 -----------
.../events/TransactionAfterRollbackEvent.java | 30 -----------
.../events/TransactionBeforeBeginEvent.java | 31 ------------
.../events/TransactionBeforeCommitEvent.java | 30 -----------
.../events/TransactionBeforeRollbackEvent.java | 30 -----------
.../events/TransactionEventAbstract.java | 58 ----------------------
.../integration/IsisTransactionFlushException.java | 43 ----------------
.../IsisTransactionManagerException.java | 43 ----------------
.../PreAndPostValues_shouldAudit_Test.java | 4 +-
13 files changed, 5 insertions(+), 331 deletions(-)
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/EntityChangeTrackerDefault.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/EntityChangeTrackerDefault.java
index e1fa6b1..39b2889 100644
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/EntityChangeTrackerDefault.java
+++ b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/EntityChangeTrackerDefault.java
@@ -70,7 +70,7 @@ import org.apache.isis.core.metamodel.spec.ManagedObjects.EntityUtil;
import org.apache.isis.core.metamodel.spec.feature.MixedIn;
import org.apache.isis.core.metamodel.spec.feature.ObjectAssociation;
import org.apache.isis.core.metamodel.spec.feature.OneToOneAssociation;
-import org.apache.isis.core.transaction.integration.IsisTransactionPlaceholder;
+import org.apache.isis.core.transaction.changetracking.events.IsisTransactionPlaceholder;
import lombok.AccessLevel;
import lombok.Getter;
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues.java
index 6b351a6..2994850 100644
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues.java
+++ b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues.java
@@ -21,7 +21,7 @@ package org.apache.isis.core.transaction.changetracking;
import java.util.Map;
import java.util.Objects;
-import org.apache.isis.core.transaction.integration.IsisTransactionPlaceholder;
+import org.apache.isis.core.transaction.changetracking.events.IsisTransactionPlaceholder;
import lombok.val;
import lombok.experimental.PackagePrivate;
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionPlaceholder.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/events/IsisTransactionPlaceholder.java
similarity index 94%
rename from core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionPlaceholder.java
rename to core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/events/IsisTransactionPlaceholder.java
index 0c5b76a..b6839bf 100644
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionPlaceholder.java
+++ b/core/transaction/src/main/java/org/apache/isis/core/transaction/changetracking/events/IsisTransactionPlaceholder.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.isis.core.transaction.integration;
+package org.apache.isis.core.transaction.changetracking.events;
/**
*
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterBeginEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterBeginEvent.java
deleted file mode 100644
index 5d57eaa..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterBeginEvent.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionAfterBeginEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionAfterBeginEvent(final TransactionStatus source) {
- super(source, Type.AFTER_BEGIN);
- }
-
-}
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterCommitEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterCommitEvent.java
deleted file mode 100644
index c1e5470..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterCommitEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionAfterCommitEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionAfterCommitEvent(final TransactionStatus source) {
- super(source, Type.AFTER_COMMIT);
- }
-}
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterRollbackEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterRollbackEvent.java
deleted file mode 100644
index 9d9bba7..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionAfterRollbackEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionAfterRollbackEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionAfterRollbackEvent(final TransactionStatus source) {
- super(source, Type.AFTER_ROLLBACK);
- }
-}
\ No newline at end of file
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeBeginEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeBeginEvent.java
deleted file mode 100644
index 817168e..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeBeginEvent.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionBeforeBeginEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionBeforeBeginEvent(final TransactionStatus source) {
- super(source, Type.BEFORE_BEGIN);
- }
-
-}
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeCommitEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeCommitEvent.java
deleted file mode 100644
index e35fad1..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeCommitEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionBeforeCommitEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionBeforeCommitEvent(final TransactionStatus source) {
- super(source, Type.BEFORE_COMMIT);
- }
-}
\ No newline at end of file
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeRollbackEvent.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeRollbackEvent.java
deleted file mode 100644
index 6b66ecc..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionBeforeRollbackEvent.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import org.springframework.transaction.TransactionStatus;
-
-public class TransactionBeforeRollbackEvent extends TransactionEventAbstract {
-
- private static final long serialVersionUID = 1L;
-
- public TransactionBeforeRollbackEvent(final TransactionStatus source) {
- super(source, Type.BEFORE_ROLLBACK);
- }
-}
\ No newline at end of file
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionEventAbstract.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionEventAbstract.java
deleted file mode 100644
index 1c54abe..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/events/TransactionEventAbstract.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.isis.core.transaction.events;
-
-import java.util.EventObject;
-
-import org.springframework.transaction.TransactionStatus;
-
-import lombok.Getter;
-
-public abstract class TransactionEventAbstract extends EventObject {
-
- private static final long serialVersionUID = 1L;
-
- public enum Type {
- BEFORE_BEGIN,
- AFTER_BEGIN,
- BEFORE_COMMIT,
- AFTER_COMMIT,
- BEFORE_ROLLBACK,
- AFTER_ROLLBACK,
- }
-
- /**
- * Same as {@link #getSource()}.
- */
- @Getter
- private final TransactionStatus transactionStatus;
-
- @Getter
- private final Type type;
-
- public TransactionEventAbstract(
- final TransactionStatus source,
- final Type type) {
- super(source);
- this.transactionStatus = source;
- this.type = type;
- }
-
-
-}
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionFlushException.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionFlushException.java
deleted file mode 100644
index 318327a..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionFlushException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.isis.core.transaction.integration;
-
-import org.apache.isis.commons.exceptions.IsisException;
-
-public class IsisTransactionFlushException extends IsisException {
-
- private static final long serialVersionUID = 1L;
-
- public IsisTransactionFlushException() {
- }
-
- public IsisTransactionFlushException(final String message) {
- super(message);
- }
-
- public IsisTransactionFlushException(final Throwable cause) {
- super(cause);
- }
-
- public IsisTransactionFlushException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
-}
diff --git a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionManagerException.java b/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionManagerException.java
deleted file mode 100644
index aa61b3f..0000000
--- a/core/transaction/src/main/java/org/apache/isis/core/transaction/integration/IsisTransactionManagerException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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.isis.core.transaction.integration;
-
-import org.apache.isis.commons.exceptions.IsisException;
-
-public class IsisTransactionManagerException extends IsisException {
-
- private static final long serialVersionUID = 1L;
-
- public IsisTransactionManagerException() {
- }
-
- public IsisTransactionManagerException(final String message) {
- super(message);
- }
-
- public IsisTransactionManagerException(final Throwable cause) {
- super(cause);
- }
-
- public IsisTransactionManagerException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
-}
diff --git a/core/transaction/src/test/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues_shouldAudit_Test.java b/core/transaction/src/test/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues_shouldAudit_Test.java
index 92193f9..aeb748f 100644
--- a/core/transaction/src/test/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues_shouldAudit_Test.java
+++ b/core/transaction/src/test/java/org/apache/isis/core/transaction/changetracking/PreAndPostValues_shouldAudit_Test.java
@@ -20,11 +20,11 @@ package org.apache.isis.core.transaction.changetracking;
import org.junit.Test;
+import org.apache.isis.core.transaction.changetracking.events.IsisTransactionPlaceholder;
+
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import org.apache.isis.core.transaction.integration.IsisTransactionPlaceholder;
-
public class PreAndPostValues_shouldAudit_Test {
@Test