You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/01/17 12:46:29 UTC
[isis] 02/03: ISIS-1569: adds CommandService2 as an extension
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-1569-replay-commands
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 1b43c93fb03159eafe1100b5dc40c50d69699d4a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 17 12:45:34 2018 +0000
ISIS-1569: adds CommandService2 as an extension
---
.../services/command/spi/CommandService2.java | 55 ++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
new file mode 100644
index 0000000..c745bdd
--- /dev/null
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/command/spi/CommandService2.java
@@ -0,0 +1,55 @@
+/**
+ * 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.applib.services.command.spi;
+
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.services.command.Command;
+
+public interface CommandService2 extends CommandService {
+
+ public static class NotFoundException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ private final String transactionId;
+
+ public NotFoundException(final String transactionId) {
+ this.transactionId = transactionId;
+ }
+
+ public String getTransactionId() {
+ return transactionId;
+ }
+ }
+
+ /**
+ * Finds all {@link Command}s created since the specified command (identified by its transaction Id).
+ *
+ * @param transactionId
+ * @param maxNumber
+ * @return
+ */
+ @Programmatic
+ List<Command> findSince(
+ final UUID transactionId,
+ int maxNumber)
+ throws NotFoundException;
+
+}
--
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.