This is an automated email from the ASF dual-hosted git repository. ahuber pushed a commit to branch spring6 in repository https://gitbox.apache.org/repos/asf/causeway-app-referenceapp.git
commit 28bc4d12f0fdff1d29e3f7436677bd0df140bcbc Author: Andi Huber <[email protected]> AuthorDate: Tue Jan 9 07:45:45 2024 +0100 Merge remote-tracking branch 'origin/master' into spring6 --- .../domain/_commands/ExposePersistedCommands.java | 60 ---------------------- .../ExposePersistedCommands_commands.java | 48 ----------------- 2 files changed, 108 deletions(-) diff --git a/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands.java b/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands.java deleted file mode 100644 index 07b3f80..0000000 --- a/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands.java +++ /dev/null @@ -1,60 +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 demoapp.dom.domain._commands; - -import java.util.Arrays; -import java.util.List; - -import org.springframework.stereotype.Service; - -import org.apache.causeway.applib.annotation.PriorityPrecedence; -import org.apache.causeway.applib.services.tablecol.TableColumnOrderForCollectionTypeAbstract; -import org.apache.causeway.extensions.commandlog.applib.dom.CommandLogEntry; - -/** - * Marker interface for mixins to contribute to. - */ -//tag::class[] -public interface ExposePersistedCommands { - - @Service - @jakarta.annotation.Priority(PriorityPrecedence.EARLY) - public static class TableColumnOrderDefault extends TableColumnOrderForCollectionTypeAbstract<CommandLogEntry> { - - public TableColumnOrderDefault() { super(CommandLogEntry.class); } - - @Override - protected List<String> orderParented(Object parent, String collectionId, List<String> propertyIds) { - return ordered(propertyIds); - } - - @Override - protected List<String> orderStandalone(List<String> propertyIds) { - return ordered(propertyIds); - } - - private List<String> ordered(List<String> propertyIds) { - return Arrays.asList( - "timestamp", "commandDto", "username", "complete", "resultSummary" - ); - } - } - -} -//end::class[] diff --git a/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands_commands.java b/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands_commands.java deleted file mode 100644 index 18cf21f..0000000 --- a/domain/src/main/java/demoapp/dom/domain/_commands/ExposePersistedCommands_commands.java +++ /dev/null @@ -1,48 +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 demoapp.dom.domain._commands; - -import java.util.List; - -import jakarta.inject.Inject; - -import org.apache.causeway.applib.annotation.Collection; -import org.apache.causeway.applib.annotation.CollectionLayout; -import org.apache.causeway.extensions.commandlog.applib.dom.CommandLogEntry; -import org.apache.causeway.extensions.commandlog.applib.dom.CommandLogEntryRepository; - -import lombok.RequiredArgsConstructor; - -//tag::class[] -@Collection -@CollectionLayout(defaultView = "table") -@RequiredArgsConstructor -public class ExposePersistedCommands_commands { - // ... -//end::class[] - private final ExposePersistedCommands exposePersistedCommands; - - //tag::class[] - public List<? extends CommandLogEntry> coll() { - return commandModelRepository.findCompleted(); - } - - @Inject CommandLogEntryRepository<? extends CommandLogEntry> commandModelRepository; -} -//end::class[]
