This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/causeway-app-referenceapp.git
The following commit(s) were added to refs/heads/master by this push:
new 7813d8a use ${revision} over hardcoded version (pom)
7813d8a is described below
commit 7813d8a177ff6a1ab1417f57561cbdb8533c0a9d
Author: Andi Huber <[email protected]>
AuthorDate: Wed Oct 8 15:08:43 2025 +0200
use ${revision} over hardcoded version (pom)
also val -> var
---
.../demoshowcases/value/ValueTypeGenTemplate.java | 2 +-
.../$TemplateHolder_actionReturningArray.java | 2 +-
...plateHolder_actionReturningArray~primitive.java | 2 +-
.../value/ValueTypeGenTemplateTest.java | 2 +-
.../domain/tests/DomainIntrospectionTestJdo.java | 2 +-
.../domain/tests/DomainIntrospectionTestJpa.java | 2 +-
.../HasAsciiDocDescription_sources.java | 8 +-
.../_infra/resources/AsciiDocConverterService.java | 9 +-
.../_infra/resources/AsciiDocReaderService.java | 9 +-
.../_infra/resources/MarkdownReaderService.java | 18 +-
.../dom/_infra/resources/MarkupReaderService.java | 14 +-
.../resources/MarkupVariableResolverService.java | 10 +-
.../_infra/resources/ResourceReaderService.java | 8 +-
.../demoapp/dom/_infra/samples/NameSamples.java | 4 +-
.../UrlEncodingServiceNaiveInMemory.java | 18 +-
.../dom/_infra/values/ValueHolderRepository.java | 4 +-
...yChangesSubscriberToCaptureChangesInMemory.java | 6 +-
.../ExposeCapturedChanges_recentChanges.java | 4 +-
.../dom/domain/_interactions/InteractionDtoVm.java | 10 +-
.../dom/domain/actions/Action/ActionMenu.java | 4 +-
.../actions/ActionLayout/ActionLayoutMenu.java | 4 +-
.../collections/Collection/CollectionMenu.java | 6 +-
.../CollectionLayout/CollectionLayoutMenu.java | 20 +-
.../objects/DomainObject/DomainObjectMenu.java | 3 +-
.../aliased/DomainObjectAliasedPage_lookup.java | 5 +-
...inObjectMixinMethodEntity_initialCharacter.java | 3 +-
.../DomainObjectXxxDomainEventControlStrategy.java | 30 +-
...inObjectXxxLifecycleEventPage_createEntity.java | 3 +-
.../DomainObjectXxxLifecycleEventSubscriber.java | 6 +-
.../DomainObjectLayoutBookmarking_addChildren.java | 5 +-
.../DomainObjectLayoutXxxUiEventSubscriber.java | 10 +-
.../domain/properties/Property/PropertyMenu.java | 16 +-
.../PropertySnapshotPage_takeXmlSnapshot.java | 8 +-
.../PropertyLayout/PropertyLayoutMenu.java | 10 +-
.../PropertyLayout/navigable/FileNodeVm.java | 6 +-
.../navigable/FileSystemTreeAdapter.java | 12 +-
.../navigable/FileTreeNodeService.java | 12 +-
.../ValueSemantics/ValueSemanticsMenu.java | 6 +-
...ticsDateRenderAdjustDaysPage_downloadAsXml.java | 4 +-
.../java/demoapp/dom/featured/FeaturedMenu.java | 4 +-
.../dom/featured/customui/GeoapifyClient.java | 12 +-
.../autocomplete/ActionAutoCompleteMenu.java | 4 +-
...nAutoCompletePage_selectTvCharactersByShow.java | 8 +-
.../dom/progmodel/actions/bulk/BulkActionMenu.java | 4 +-
.../actions/choices/ActionChoicesMenu.java | 4 +-
...ActionChoicesPage_selectTvCharactersByShow.java | 4 +-
.../actions/defaults/ActionDefaultsMenu.java | 4 +-
...efaultsPage_selectTvCharactersByShowAndSex.java | 6 +-
.../actions/validate/ActionValidateMenu.java | 4 +-
..._selectTvCharactersByShowAndSexUsingRecord.java | 6 +-
.../dom/progmodel/actions/veto/ActionVetoMenu.java | 4 +-
.../embeddedvalues/ComplexNumber.java | 6 +-
.../jpa/NumberConstantJpaRepository.java | 6 +-
.../mixins/CountHolder_fibonacciSequence.java | 6 +-
.../demoapp/dom/progmodel/mixins/MixinMenu.java | 4 +-
.../core/errorreportingservice/EmailTicket.java | 6 +-
.../ErrorReportingServiceForDemo.java | 10 +-
.../core/eventbusservice/EventLogEntryJpa.java | 4 +-
.../eventbusservice/EventLogEntryRepository.java | 4 +-
.../ApplicationTenancyEvaluatorForDemo.java | 20 +-
.../blobs/samples/CausewayBlobsSamples.java | 4 +-
.../clobs/samples/CausewayClobsSamples.java | 8 +-
.../causeway/treenode/FileSystemTreeAdapter.java | 12 +-
.../causeway/treenode/FileTreeNodeService.java | 12 +-
.../samples/JavaAwtBufferedImagesSamples.java | 6 +-
...rimitiveBooleanHolder_actionReturningArray.java | 4 +-
.../PrimitiveByteHolder_actionReturningArray.java | 4 +-
.../PrimitiveCharHolder_actionReturningArray.java | 4 +-
...PrimitiveDoubleHolder_actionReturningArray.java | 4 +-
.../PrimitiveFloatHolder_actionReturningArray.java | 4 +-
.../PrimitiveIntHolder_actionReturningArray.java | 4 +-
.../PrimitiveLongHolder_actionReturningArray.java | 4 +-
.../PrimitiveShortHolder_actionReturningArray.java | 4 +-
.../featured/customui/WhereInTheWorldPanel.java | 2 +-
.../resources/ResourceReaderService_Test.java | 8 +-
pom.xml | 406 +++++++++++----------
.../testing/jpa/SpinUpReferenceJpaTest.java | 4 +-
.../demoapp/web/ReferenceAppManifestCommon.java | 4 +-
.../featured/customui/WhereInTheWorldPanel.java | 28 +-
wicket/jpa/pom.xml | 1 -
80 files changed, 486 insertions(+), 478 deletions(-)
diff --git
a/codegen/src/main/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplate.java
b/codegen/src/main/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplate.java
index 7f4e755..3d5f4e9 100644
---
a/codegen/src/main/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplate.java
+++
b/codegen/src/main/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplate.java
@@ -41,7 +41,7 @@ import lombok.RequiredArgsConstructor;
import lombok.Singular;
import lombok.SneakyThrows;
import lombok.Value;
-import lombok.val;
+
@RequiredArgsConstructor
public class ValueTypeGenTemplate {
diff --git
a/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
b/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
index a33e171..65938da 100644
---
a/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
+++
b/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray.java
@@ -27,7 +27,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import /*${showcase-fully-qualified-type}*/;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import demoapp.dom.types.Samples;
diff --git
a/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
b/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
index c9fb3bc..318346d 100644
---
a/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
+++
b/codegen/src/main/resources/holder/$TemplateHolder_actionReturningArray~primitive.java
@@ -25,7 +25,7 @@ import org.apache.causeway.applib.annotation.SemanticsOf;
import org.apache.causeway.commons.functional.IndexedConsumer;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import demoapp.dom.types.Samples;
diff --git
a/codegen/src/test/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplateTest.java
b/codegen/src/test/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplateTest.java
index e9b3ed0..334ba1f 100644
---
a/codegen/src/test/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplateTest.java
+++
b/codegen/src/test/java/demoapp/codegen/demoshowcases/value/ValueTypeGenTemplateTest.java
@@ -41,7 +41,7 @@ import org.apache.causeway.commons.io.TextUtils;
import org.jspecify.annotations.NonNull;
import lombok.SneakyThrows;
-import lombok.val;
+
import lombok.extern.log4j.Log4j2;
import demoapp.codegen.demoshowcases.value.ValueShowCase;
diff --git
a/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJdo.java
b/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJdo.java
index e4aee41..5769c4b 100644
---
a/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJdo.java
+++
b/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJdo.java
@@ -38,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.fail;
import demoapp.dom.domain.tests.conf.Configuration_usingJdo;
import demoapp.dom.domain.tests.conf.MetaModelExportToConsole;
-import lombok.val;
+
@SpringBootTest(
classes = {
diff --git
a/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJpa.java
b/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJpa.java
index e79616a..acd4c93 100644
---
a/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJpa.java
+++
b/domain-tests/src/test/java/demoapp/dom/domain/tests/DomainIntrospectionTestJpa.java
@@ -38,7 +38,7 @@ import static org.junit.jupiter.api.Assertions.fail;
import demoapp.dom.domain.tests.conf.Configuration_usingJpa;
import demoapp.dom.domain.tests.conf.MetaModelExportToConsole;
-import lombok.val;
+
@SpringBootTest(
classes = {
diff --git
a/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
b/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
index 682300e..b0e6f48 100644
---
a/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
+++
b/domain/src/main/java/demoapp/dom/_infra/asciidocdesc/HasAsciiDocDescription_sources.java
@@ -28,9 +28,9 @@ import org.apache.causeway.applib.annotation.Where;
import org.apache.causeway.applib.events.domain.PropertyDomainEvent;
import org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc;
-import demoapp.dom._infra.resources.MarkupVariableResolverService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
+import demoapp.dom._infra.resources.MarkupVariableResolverService;
@Property(
snapshot = Snapshot.EXCLUDED,
@@ -47,8 +47,8 @@ public class HasAsciiDocDescription_sources {
@PropertyLayout(labelPosition = LabelPosition.NONE, hidden =
Where.ALL_TABLES,
fieldSetId = "sources", sequence = "1")
public AsciiDoc prop() {
- val packageName =
hasAsciiDocDescription.getClass().getPackage().getName();
- val sourceLocation = packageName.replace('.', '/');
+ var packageName =
hasAsciiDocDescription.getClass().getPackage().getName();
+ var sourceLocation = packageName.replace('.', '/');
return AsciiDoc.valueOf(
markupVariableResolverService.resolveVariables(
String.format("link:${SOURCES_DEMO}/%s[Sources] for
this page", sourceLocation)));
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocConverterService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocConverterService.java
index ab9e506..a97528f 100644
---
a/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocConverterService.java
+++
b/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocConverterService.java
@@ -30,9 +30,8 @@ import org.asciidoctor.SafeMode;
import org.asciidoctor.ast.Document;
import org.asciidoctor.extension.IncludeProcessor;
import org.asciidoctor.extension.PreprocessorReader;
-import org.springframework.stereotype.Service;
-import lombok.val;
+import org.springframework.stereotype.Service;
@Service
@Named("demo.AsciiDocConverterService")
@@ -71,13 +70,13 @@ public class AsciiDocConverterService {
@Override
public void process(final Document document, final
PreprocessorReader reader, final String target, final Map<String, Object>
attributes) {
- val contextClass = context.get();
- val content = resourceReaderService.readResource(contextClass,
target, attributes);
+ var contextClass = context.get();
+ var content = resourceReaderService.readResource(contextClass,
target, attributes);
reader.pushInclude(content, target, target, 1, attributes);
}
}
- val asciidoctor = Asciidoctor.Factory.create();
+ var asciidoctor = Asciidoctor.Factory.create();
asciidoctor.javaExtensionRegistry().includeProcessor(new
LocalIncludeProcessor());
return asciidoctor;
}
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocReaderService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocReaderService.java
index 3b5b300..69ccf32 100644
---
a/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocReaderService.java
+++
b/domain/src/main/java/demoapp/dom/_infra/resources/AsciiDocReaderService.java
@@ -28,7 +28,6 @@ import org.apache.causeway.core.config.CausewayConfiguration;
import org.apache.causeway.valuetypes.asciidoc.applib.value.AsciiDoc;
import lombok.RequiredArgsConstructor;
-import lombok.val;
@Service
@Named("demo.AsciiDocReaderService")
@@ -47,14 +46,14 @@ public class AsciiDocReaderService {
}
public AsciiDoc readFor(final Class<?> aClass) {
- val adocResourceName = String.format("%s.adoc",
aClass.getSimpleName());
- val adocResource = readResource(aClass, adocResourceName);
+ var adocResourceName = String.format("%s.adoc",
aClass.getSimpleName());
+ var adocResource = readResource(aClass, adocResourceName);
return toAsciiDoc(adocResource, aClass);
}
public AsciiDoc readFor(final Class<?> aClass, final String member) {
- val adocResourceName = String.format("%s-%s.%s",
aClass.getSimpleName(), member, "adoc");
- val adocResource = readResource(aClass, adocResourceName);
+ var adocResourceName = String.format("%s-%s.%s",
aClass.getSimpleName(), member, "adoc");
+ var adocResource = readResource(aClass, adocResourceName);
return toAsciiDoc(adocResource, aClass);
}
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/MarkdownReaderService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/MarkdownReaderService.java
index 9530ed5..0906736 100644
---
a/domain/src/main/java/demoapp/dom/_infra/resources/MarkdownReaderService.java
+++
b/domain/src/main/java/demoapp/dom/_infra/resources/MarkdownReaderService.java
@@ -25,29 +25,27 @@ import org.springframework.stereotype.Service;
import org.apache.causeway.valuetypes.markdown.applib.value.Markdown;
-import lombok.val;
-
@Service
@Named("demo.MarkdownReaderService")
public class MarkdownReaderService {
- public Markdown readFor(Object anObject) {
+ public Markdown readFor(final Object anObject) {
return readFor(anObject.getClass());
}
- public Markdown readFor(Object anObject, final String member) {
+ public Markdown readFor(final Object anObject, final String member) {
return readFor(anObject.getClass(), member);
}
- public Markdown readFor(Class<?> aClass) {
- val markdownResourceName = String.format("%s.md",
aClass.getSimpleName());
- val markdown = resourceReaderService.readResource(aClass,
markdownResourceName);
+ public Markdown readFor(final Class<?> aClass) {
+ var markdownResourceName = String.format("%s.md",
aClass.getSimpleName());
+ var markdown = resourceReaderService.readResource(aClass,
markdownResourceName);
return Markdown.valueOf(markdown);
}
- public Markdown readFor(Class<?> aClass, final String member) {
- val markdownResourceName = String.format("%s-%s.md",
aClass.getSimpleName(), member);
- val markdown = resourceReaderService.readResource(aClass,
markdownResourceName);
+ public Markdown readFor(final Class<?> aClass, final String member) {
+ var markdownResourceName = String.format("%s-%s.md",
aClass.getSimpleName(), member);
+ var markdown = resourceReaderService.readResource(aClass,
markdownResourceName);
return Markdown.valueOf(markdown);
}
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/MarkupReaderService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/MarkupReaderService.java
index 4f5f6ab..ce284dd 100644
--- a/domain/src/main/java/demoapp/dom/_infra/resources/MarkupReaderService.java
+++ b/domain/src/main/java/demoapp/dom/_infra/resources/MarkupReaderService.java
@@ -25,21 +25,21 @@ import org.springframework.stereotype.Service;
import org.apache.causeway.applib.value.Markup;
-import lombok.val;
+
@Service
@Named("demo.MarkupReaderService")
public class MarkupReaderService {
- public Markup readFor(Class<?> aClass) {
- val markupResourceName = String.format("%s.html",
aClass.getSimpleName());
- val html = resourceReaderService.readResource(aClass,
markupResourceName);
+ public Markup readFor(final Class<?> aClass) {
+ var markupResourceName = String.format("%s.html",
aClass.getSimpleName());
+ var html = resourceReaderService.readResource(aClass,
markupResourceName);
return new Markup(html);
}
- public Markup readFor(Class<?> aClass, final String member) {
- val markupResourceName = String.format("%s-%s.html",
aClass.getSimpleName(), member);
- val html = resourceReaderService.readResource(aClass,
markupResourceName);
+ public Markup readFor(final Class<?> aClass, final String member) {
+ var markupResourceName = String.format("%s-%s.html",
aClass.getSimpleName(), member);
+ var html = resourceReaderService.readResource(aClass,
markupResourceName);
return new Markup(html);
}
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/MarkupVariableResolverService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/MarkupVariableResolverService.java
index 984eb9d..82aaab7 100644
---
a/domain/src/main/java/demoapp/dom/_infra/resources/MarkupVariableResolverService.java
+++
b/domain/src/main/java/demoapp/dom/_infra/resources/MarkupVariableResolverService.java
@@ -34,7 +34,7 @@ import org.apache.causeway.commons.internal.base._Refs;
import org.apache.causeway.commons.internal.collections._Maps;
import org.apache.causeway.core.config.CausewayConfiguration;
-import lombok.val;
+
@Service
@Named("demo.MarkupVariableResolverService")
@@ -49,8 +49,8 @@ public class MarkupVariableResolverService {
private static Map<String, String> computeConstants(final
CausewayConfiguration configuration, final Environment environment) {
- val map = _Maps.<String,String>newLinkedHashMap();
- val orm = determineOrmProfileFrom(environment);
+ var map = _Maps.<String,String>newLinkedHashMap();
+ var orm = determineOrmProfileFrom(environment);
map.put("SOURCES_CAUSEWAY",
"https://github.com/apache/causeway/blob/master/core/applib/src/main/java");
map.put("SOURCES_DEMO",
"https://github.com/apache/causeway-app-referenceapp/tree/master/domain/src/main/java");
@@ -68,7 +68,7 @@ public class MarkupVariableResolverService {
}
private static String determineOrmProfileFrom(final Environment
environment) {
- val activeProfiles = Arrays.asList(environment.getActiveProfiles());
+ var activeProfiles = Arrays.asList(environment.getActiveProfiles());
if(activeProfiles.contains("demo-jpa")) {
return "jpa";
}
@@ -87,7 +87,7 @@ public class MarkupVariableResolverService {
* @param input
*/
public String resolveVariables(final String input) {
- val stringRef = _Refs.objectRef(input);
+ var stringRef = _Refs.objectRef(input);
constants.forEach((k, v)->{
stringRef.update(string->string.replace(var(k), v));
});
diff --git
a/domain/src/main/java/demoapp/dom/_infra/resources/ResourceReaderService.java
b/domain/src/main/java/demoapp/dom/_infra/resources/ResourceReaderService.java
index 8e60299..092ec41 100644
---
a/domain/src/main/java/demoapp/dom/_infra/resources/ResourceReaderService.java
+++
b/domain/src/main/java/demoapp/dom/_infra/resources/ResourceReaderService.java
@@ -32,7 +32,7 @@ import jakarta.inject.Named;
import org.springframework.stereotype.Service;
-import lombok.val;
+
@Service
@Named("demo.ResourceReaderService")
@@ -76,9 +76,9 @@ public class ResourceReaderService {
* @throws IOException
*/
private String read(final InputStream input, final Map<String, Object>
attributes) throws IOException {
- val in = new InputStreamReader(input);
- val tagHandler = new TagHandler(attributes);
- try (val bufferReader = new BufferedReader(in)) {
+ var in = new InputStreamReader(input);
+ var tagHandler = new TagHandler(attributes);
+ try (var bufferReader = new BufferedReader(in)) {
return bufferReader.lines()
.map(tagHandler::handle)
.filter(Objects::nonNull)
diff --git a/domain/src/main/java/demoapp/dom/_infra/samples/NameSamples.java
b/domain/src/main/java/demoapp/dom/_infra/samples/NameSamples.java
index 55bef55..46d7d3c 100644
--- a/domain/src/main/java/demoapp/dom/_infra/samples/NameSamples.java
+++ b/domain/src/main/java/demoapp/dom/_infra/samples/NameSamples.java
@@ -25,7 +25,7 @@ import java.util.stream.Stream;
import org.springframework.stereotype.Service;
import demoapp.dom.types.Samples;
-import lombok.val;
+
@Service
public class NameSamples implements Samples<String> {
@@ -40,7 +40,7 @@ public class NameSamples implements Samples<String> {
}
public String random() {
- val names = new ArrayList<String>();
+ var names = new ArrayList<String>();
stream().forEach(names::add);
Collections.shuffle(names);
return names.stream().findFirst().orElse(null);
diff --git
a/domain/src/main/java/demoapp/dom/_infra/urlencoding/UrlEncodingServiceNaiveInMemory.java
b/domain/src/main/java/demoapp/dom/_infra/urlencoding/UrlEncodingServiceNaiveInMemory.java
index d993ee8..6c3d459 100644
---
a/domain/src/main/java/demoapp/dom/_infra/urlencoding/UrlEncodingServiceNaiveInMemory.java
+++
b/domain/src/main/java/demoapp/dom/_infra/urlencoding/UrlEncodingServiceNaiveInMemory.java
@@ -40,7 +40,7 @@ import org.apache.causeway.commons.internal.hash._Hashes;
import org.apache.causeway.commons.internal.hash._Hashes.Algorithm;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
/**
* Encoding blobs for view models will exceed the length allowed for an HTTP
header;
@@ -64,18 +64,18 @@ public class UrlEncodingServiceNaiveInMemory implements
UrlEncodingService {
// web servers might have restrictions to header sizes of eg. max 4k
or 8k
// if the encodedString is reasonable small, we pass it through
- val encodedString = urlEncodingService.encode(bytes); // from the
default urlEncodingService
+ var encodedString = urlEncodingService.encode(bytes); // from the
default urlEncodingService
if(encodedString.length()<maxIdentifierSize) {
return EncodingType.PASS_THROUGH.encode(encodedString);
}
// if the encodedString is not reasonable small, we calculate a hash,
// then store the encodedString in a map using this hash as the key
- val hashBytes = _Hashes.digest(Algorithm.SHA512, bytes)
+ var hashBytes = _Hashes.digest(Algorithm.SHA512, bytes)
.orElseThrow(()->_Exceptions.unrecoverable("failed to generate
SHA-512 hash"));
// the key is exposed for web use with URLs, which requires us to
encode them base64 URL safe
- val base64Key = _Strings.ofBytes(_Bytes.asUrlBase64.apply(hashBytes),
StandardCharsets.UTF_8);
+ var base64Key = _Strings.ofBytes(_Bytes.asUrlBase64.apply(hashBytes),
StandardCharsets.UTF_8);
map.put(base64Key, encodedString);
return EncodingType.HASH_KEYED_CACHE.encode(base64Key);
@@ -83,17 +83,17 @@ public class UrlEncodingServiceNaiveInMemory implements
UrlEncodingService {
@Override
public byte[] decode(final String prefixed) {
- val encodingType = EncodingType.parse(prefixed);
- val encodedStringOrBase64Key = encodingType.decode(prefixed);
+ var encodingType = EncodingType.parse(prefixed);
+ var encodedStringOrBase64Key = encodingType.decode(prefixed);
switch (encodingType) {
case PASS_THROUGH: {
- val encodedString = encodedStringOrBase64Key;
+ var encodedString = encodedStringOrBase64Key;
return urlEncodingService.decode(encodedString);
}
case HASH_KEYED_CACHE: {
- val base64Key = encodedStringOrBase64Key;
- val encodedString = map.get(base64Key);
+ var base64Key = encodedStringOrBase64Key;
+ var encodedString = map.get(base64Key);
if(encodedString==null) {
throw new UnrecoverableException("Cache miss on view model
recreation attempt. "
+ "(This cache is specific to the Reference App.)");
diff --git
a/domain/src/main/java/demoapp/dom/_infra/values/ValueHolderRepository.java
b/domain/src/main/java/demoapp/dom/_infra/values/ValueHolderRepository.java
index 0eead0b..cc2d244 100644
--- a/domain/src/main/java/demoapp/dom/_infra/values/ValueHolderRepository.java
+++ b/domain/src/main/java/demoapp/dom/_infra/values/ValueHolderRepository.java
@@ -32,7 +32,7 @@ import demoapp.dom.types.Samples;
import lombok.AccessLevel;
import org.jspecify.annotations.NonNull;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@RequiredArgsConstructor(access = AccessLevel.PROTECTED)
public abstract class ValueHolderRepository<T, E extends ValueHolder<T>> {
@@ -75,7 +75,7 @@ public abstract class ValueHolderRepository<T, E extends
ValueHolder<T>> {
public E create(final T value) {
// emits 'created' life-cycle event
- val detachedEntity =
repositoryService.detachedEntity(newDetachedEntity(value));
+ var detachedEntity =
repositoryService.detachedEntity(newDetachedEntity(value));
// persist
return repositoryService.persistAndFlush(detachedEntity);
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/_changes/EntityChangesSubscriberToCaptureChangesInMemory.java
b/domain/src/main/java/demoapp/dom/domain/_changes/EntityChangesSubscriberToCaptureChangesInMemory.java
index be9ae85..b8d9442 100644
---
a/domain/src/main/java/demoapp/dom/domain/_changes/EntityChangesSubscriberToCaptureChangesInMemory.java
+++
b/domain/src/main/java/demoapp/dom/domain/_changes/EntityChangesSubscriberToCaptureChangesInMemory.java
@@ -28,7 +28,7 @@ import
org.apache.causeway.applib.services.publishing.spi.EntityChanges;
import
org.apache.causeway.applib.services.publishing.spi.EntityChangesSubscriber;
import org.apache.causeway.schema.chg.v2.ChangesDto;
-import lombok.val;
+
//tag::class[]
@Service
@@ -38,9 +38,9 @@ public class EntityChangesSubscriberToCaptureChangesInMemory
implements EntityCh
@Override
public void onChanging(
- EntityChanges changingEntities // <.>
+ final EntityChanges changingEntities // <.>
) {
- val dto = changingEntities.getDto();
+ var dto = changingEntities.getDto();
this.changedEntities.add(dto);
}
// ...
diff --git
a/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java
b/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java
index 833a9e9..ad0e1b1 100644
---
a/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java
+++
b/domain/src/main/java/demoapp/dom/domain/_changes/ExposeCapturedChanges_recentChanges.java
@@ -27,7 +27,7 @@ import org.apache.causeway.applib.annotation.Collection;
import org.apache.causeway.applib.annotation.MemberSupport;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Collection
@@ -42,7 +42,7 @@ public class ExposeCapturedChanges_recentChanges {
@MemberSupport
//tag::class[]
public List<ChangesVm> coll() {
- val list = new LinkedList<ChangesVm>();
+ var list = new LinkedList<ChangesVm>();
subscriber
.streamChangedEntities()
.map(ChangesVm::new)
diff --git
a/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
b/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
index ef6353a..5ca073c 100644
---
a/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
+++
b/domain/src/main/java/demoapp/dom/domain/_interactions/InteractionDtoVm.java
@@ -42,7 +42,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-import lombok.val;
+
//tag::class[]
@Named("demo.InteractionDtoVm")
@@ -57,11 +57,11 @@ public class InteractionDtoVm implements ViewModel,
HasAsciiDocDescription {
@ObjectSupport public String title() {
// nb: not thread-safe
// formats defined in
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html
- val format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
- val exec = getInteractionDto().getExecution();
- val instant =
exec.getMetrics().getTimings().getStartedAt().toGregorianCalendar().toInstant();
+ var format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ var exec = getInteractionDto().getExecution();
+ var instant =
exec.getMetrics().getTimings().getStartedAt().toGregorianCalendar().toInstant();
- val buf = new TitleBuffer();
+ var buf = new TitleBuffer();
buf.append(format.format(Date.from(instant)));
buf.append(" ").append(exec.getLogicalMemberIdentifier());
return buf.toString();
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
b/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
index 1c263ff..794e5a3 100644
--- a/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
+++ b/domain/src/main/java/demoapp/dom/domain/actions/Action/ActionMenu.java
@@ -28,7 +28,7 @@ import
org.apache.causeway.applib.annotation.PriorityPrecedence;
import org.apache.causeway.applib.annotation.SemanticsOf;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import demoapp.dom._infra.samples.NameSamples;
import demoapp.dom.domain.actions.Action.choicesFrom.ActionChoicesFromPage;
@@ -108,7 +108,7 @@ public class ActionMenu {
describedAs = "Semantic relationship between actions and other
properties or collections"
)
public ActionTypeOfPage typeOf(){
- val page = new ActionTypeOfPage();
+ var page = new ActionTypeOfPage();
samples.stream()
.map(ActionTypeOfChildVm::new)
.forEach(e -> page.getChildren().add(e));
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/ActionLayoutMenu.java
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/ActionLayoutMenu.java
index 25985c0..7554e60 100644
---
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/ActionLayoutMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/ActionLayoutMenu.java
@@ -41,7 +41,7 @@ import
demoapp.dom.domain.actions.ActionLayout.promptStyle.ActionLayoutPromptSty
import
demoapp.dom.domain.actions.ActionLayout.redirectPolicy.ActionLayoutRedirectPolicyPage;
import
demoapp.dom.domain.actions.ActionLayout.sequence.ActionLayoutSequencePage;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@DomainService
@Named("demo.ActionLayoutMenu")
@@ -61,7 +61,7 @@ public class ActionLayoutMenu {
describedAs = "Associate an action with a property or collection,
specifying its id"
)
public ActionLayoutAssociateWithPage associateWith(){
- val page = new ActionLayoutAssociateWithPage();
+ var page = new ActionLayoutAssociateWithPage();
samples.stream()
.map(ActionLayoutAssociateWithChildVm::new)
.forEach(e -> page.getChildren().add(e));
diff --git
a/domain/src/main/java/demoapp/dom/domain/collections/Collection/CollectionMenu.java
b/domain/src/main/java/demoapp/dom/domain/collections/Collection/CollectionMenu.java
index 45eafcf..02a7a53 100644
---
a/domain/src/main/java/demoapp/dom/domain/collections/Collection/CollectionMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/collections/Collection/CollectionMenu.java
@@ -34,7 +34,7 @@ import
demoapp.dom.domain.collections.Collection.domainEvent.CollectionDomainEve
import demoapp.dom.domain.collections.Collection.typeOf.CollectionTypeOfPage;
import
demoapp.dom.domain.collections.Collection.typeOf.child.CollectionTypeOfChildVm;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.CollectionMenu")
@DomainService
@@ -51,7 +51,7 @@ class CollectionMenu {
describedAs = "Class of the domain event emitted when interacting
with the collection"
)
public CollectionDomainEventPage domainEvent(){
- val page = new CollectionDomainEventPage();
+ var page = new CollectionDomainEventPage();
samples.stream()
.forEach(page::addChild);
samples.stream()
@@ -65,7 +65,7 @@ class CollectionMenu {
describedAs = "Element type of collections"
)
public CollectionTypeOfPage typeOf(){
- val page = new CollectionTypeOfPage();
+ var page = new CollectionTypeOfPage();
samples.stream()
.map(CollectionTypeOfChildVm::new)
.forEach(e -> page.getChildren().add(e));
diff --git
a/domain/src/main/java/demoapp/dom/domain/collections/CollectionLayout/CollectionLayoutMenu.java
b/domain/src/main/java/demoapp/dom/domain/collections/CollectionLayout/CollectionLayoutMenu.java
index ad5a082..749d825 100644
---
a/domain/src/main/java/demoapp/dom/domain/collections/CollectionLayout/CollectionLayoutMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/collections/CollectionLayout/CollectionLayoutMenu.java
@@ -48,7 +48,7 @@ import
demoapp.dom.domain.collections.CollectionLayout.sortedBy.child.Collection
import
demoapp.dom.domain.collections.CollectionLayout.tabledec.CollectionLayoutTableDecoratorPage;
import
demoapp.dom.domain.collections.CollectionLayout.tabledec.child.CollectionLayoutTableDecoratorChildVm;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.CollectionLayoutMenu")
@DomainService
@@ -65,7 +65,7 @@ public class CollectionLayoutMenu {
describedAs = "CSS class to wrap the UI component representing
this collection"
)
public CollectionLayoutCssClassPage cssClass(){
- val page = new CollectionLayoutCssClassPage();
+ var page = new CollectionLayoutCssClassPage();
samples.stream()
.map(CollectionLayoutCssClassChildVm::new
)
@@ -83,7 +83,7 @@ public class CollectionLayoutMenu {
describedAs = "View collection as a table, or collapsed, or some
other representation if available"
)
public CollectionLayoutDefaultViewPage defaultView(){
- val page = new CollectionLayoutDefaultViewPage();
+ var page = new CollectionLayoutDefaultViewPage();
samples.stream()
.map(CollectionLayoutDefaultViewChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -102,7 +102,7 @@ public class CollectionLayoutMenu {
describedAs = "Description of the collection, shown as a tooltip"
)
public CollectionLayoutDescribedAsPage describedAs(){
- val page = new CollectionLayoutDescribedAsPage();
+ var page = new CollectionLayoutDescribedAsPage();
samples.stream()
.map(CollectionLayoutDescribedAsChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -118,7 +118,7 @@ public class CollectionLayoutMenu {
describedAs = "Visibility of the collection in different contexts"
)
public CollectionLayoutHiddenPage hidden(){
- val page = new CollectionLayoutHiddenPage();
+ var page = new CollectionLayoutHiddenPage();
samples.stream()
.map(CollectionLayoutHiddenChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -131,7 +131,7 @@ public class CollectionLayoutMenu {
describedAs = "Custom text for the collection's label"
)
public CollectionLayoutNamedPage named(){
- val page = new CollectionLayoutNamedPage();
+ var page = new CollectionLayoutNamedPage();
samples.stream()
.map(CollectionLayoutNamedChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -144,7 +144,7 @@ public class CollectionLayoutMenu {
describedAs = "Number of domain objects per page in this
collection"
)
public CollectionLayoutPagedPage paged(){
- val page = new CollectionLayoutPagedPage();
+ var page = new CollectionLayoutPagedPage();
samples.stream()
.map(CollectionLayoutPagedChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -160,7 +160,7 @@ public class CollectionLayoutMenu {
describedAs = "Order of this member relative to other members in
the same (layout) group."
)
public CollectionLayoutSequencePage sequence(){
- val page = new CollectionLayoutSequencePage();
+ var page = new CollectionLayoutSequencePage();
samples.stream()
.map(CollectionLayoutSequenceChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -173,7 +173,7 @@ public class CollectionLayoutMenu {
describedAs = "Sort domain objects in this collection, overriding
their default comparator"
)
public CollectionLayoutSortedByPage sortedBy(){
- val page = new CollectionLayoutSortedByPage();
+ var page = new CollectionLayoutSortedByPage();
samples.stream()
.map(CollectionLayoutSortedByChildVm::new)
.forEach(e -> page.getChildren().add(e));
@@ -187,7 +187,7 @@ public class CollectionLayoutMenu {
describedAs = "Allows to specify a custom client side table
renderer."
)
public CollectionLayoutTableDecoratorPage tableDecorator(){
- val page = new CollectionLayoutTableDecoratorPage();
+ var page = new CollectionLayoutTableDecoratorPage();
samples.stream()
.map(CollectionLayoutTableDecoratorChildVm::new)
.forEach(e -> page.getChildren().add(e));
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
index dc0befe..e28843f 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/DomainObjectMenu.java
@@ -39,7 +39,6 @@ import
demoapp.dom.domain.objects.DomainObject.nature.DomainObjectNaturePage;
import
demoapp.dom.domain.objects.DomainObject.xxxDomainEvent.DomainObjectXxxDomainEventPage;
import
demoapp.dom.domain.objects.DomainObject.xxxLifecycleEvent.DomainObjectXxxLifecycleEventPage;
import lombok.RequiredArgsConstructor;
-import lombok.val;
@Named("demo.DomainObjectMenu")
@DomainService
@@ -125,7 +124,7 @@ public class DomainObjectMenu {
describedAs = "Default class of the domain event emitted when
interacting with the domain object's actions, properties or collections"
)
public DomainObjectXxxDomainEventPage domainEvents() {
- val page = new DomainObjectXxxDomainEventPage("change me");
+ var page = new DomainObjectXxxDomainEventPage("change me");
page.addChild("#1");
page.addChild("#2");
page.addChild("#3");
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/DomainObjectAliasedPage_lookup.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/DomainObjectAliasedPage_lookup.java
index 9265089..2a531e2 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/DomainObjectAliasedPage_lookup.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/aliased/DomainObjectAliasedPage_lookup.java
@@ -13,7 +13,6 @@ import org.apache.causeway.applib.services.bookmark.Bookmark;
import org.apache.causeway.applib.services.bookmark.BookmarkService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -31,8 +30,8 @@ public class DomainObjectAliasedPage_lookup {
).orElseThrow(() -> new RecoverableException("No customer exists for
that bookmark"));
}
public List<String> choices0Act() {
- val bookmarks = new ArrayList<String>();
- val aliases = repository.all();
+ var bookmarks = new ArrayList<String>();
+ var aliases = repository.all();
aliases.stream().forEach(obj -> {
bookmarks.add(obj.getBookmark()); // <.>
bookmarks.add(obj.getPreviousBookmark()); // <.>
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/DomainObjectMixinMethodEntity_initialCharacter.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/DomainObjectMixinMethodEntity_initialCharacter.java
index eb35493..773c9e4 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/DomainObjectMixinMethodEntity_initialCharacter.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/mixinMethod/DomainObjectMixinMethodEntity_initialCharacter.java
@@ -5,7 +5,6 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import org.apache.causeway.applib.annotation.Property;
import lombok.RequiredArgsConstructor;
-import lombok.val;
//tag::class[]
@DomainObject(mixinMethod = "property") // <.>
@@ -17,7 +16,7 @@ public class DomainObjectMixinMethodEntity_initialCharacter {
@MemberSupport
public Character property() { // <.>
- val charArray = mixee.getName().toCharArray();
+ var charArray = mixee.getName().toCharArray();
return charArray.length == 0 ? null : charArray[0];
}
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxDomainEvent/DomainObjectXxxDomainEventControlStrategy.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxDomainEvent/DomainObjectXxxDomainEventControlStrategy.java
index 59239df..b9073e2 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxDomainEvent/DomainObjectXxxDomainEventControlStrategy.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxDomainEvent/DomainObjectXxxDomainEventControlStrategy.java
@@ -24,14 +24,14 @@ import
org.apache.causeway.applib.events.domain.AbstractDomainEvent;
import org.apache.causeway.applib.services.message.MessageService;
import org.apache.causeway.applib.services.registry.ServiceRegistry;
-import lombok.val;
+
//tag::class[]
enum DomainObjectXxxDomainEventControlStrategy {
DO_NOTHING{
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
}
},
// ...
@@ -40,9 +40,9 @@ enum DomainObjectXxxDomainEventControlStrategy {
//tag::hide[]
HIDE {
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
if (ev instanceof AbstractDomainEvent) {
- val domainEvent = (AbstractDomainEvent<?>) ev;
+ var domainEvent = (AbstractDomainEvent<?>) ev;
switch (domainEvent.getEventPhase()) {
case HIDE:
domainEvent.hide();
@@ -55,9 +55,9 @@ enum DomainObjectXxxDomainEventControlStrategy {
//tag::disable[]
DISABLE {
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
if (ev instanceof AbstractDomainEvent) {
- val domainEvent = (AbstractDomainEvent<?>) ev;
+ var domainEvent = (AbstractDomainEvent<?>) ev;
switch (domainEvent.getEventPhase()) {
case DISABLE:
domainEvent.disable("ControlStrategy set to DISABLE");
@@ -70,9 +70,9 @@ enum DomainObjectXxxDomainEventControlStrategy {
//tag::validate[]
VALIDATE_MUST_BE_UPPER_CASE{
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
if (ev instanceof DomainObjectXxxDomainEventPage.ActionEvent) {
- val actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
+ var actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
switch (actionEvent.getEventPhase()) {
case VALIDATE:
String argument = (String)
actionEvent.getArguments().get(0);
@@ -83,7 +83,7 @@ enum DomainObjectXxxDomainEventControlStrategy {
}
}
if (ev instanceof DomainObjectXxxDomainEventPage.PropertyEvent) {
- val propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
+ var propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
switch (propertyEvent.getEventPhase()) {
case VALIDATE:
Object newValue = propertyEvent.getNewValue();
@@ -99,9 +99,9 @@ enum DomainObjectXxxDomainEventControlStrategy {
//tag::executing[]
EXECUTING_FORCE_UPPER_CASE{
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
if (ev instanceof DomainObjectXxxDomainEventPage.ActionEvent) {
- val actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
+ var actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
switch (actionEvent.getEventPhase()) {
case EXECUTING:
List<Object> arguments = actionEvent.getArguments();
@@ -111,7 +111,7 @@ enum DomainObjectXxxDomainEventControlStrategy {
}
}
if (ev instanceof DomainObjectXxxDomainEventPage.PropertyEvent) {
- val propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
+ var propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
switch (propertyEvent.getEventPhase()) {
case EXECUTING:
String newValue =
propertyEvent.getNewValue().toString().toUpperCase();
@@ -125,9 +125,9 @@ enum DomainObjectXxxDomainEventControlStrategy {
//tag::executed[]
EXECUTED_ANNOUNCE{
@Override
- void
on(DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev,
ServiceRegistry serviceRegistry) {
+ void on(final
DomainObjectXxxDomainEventPage.DomainObjectXxxDomainEventMarker ev, final
ServiceRegistry serviceRegistry) {
if (ev instanceof DomainObjectXxxDomainEventPage.ActionEvent) {
- val actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
+ var actionEvent = (DomainObjectXxxDomainEventPage.ActionEvent)
ev;
switch (actionEvent.getEventPhase()) {
case EXECUTED:
serviceRegistry
@@ -139,7 +139,7 @@ enum DomainObjectXxxDomainEventControlStrategy {
}
}
if (ev instanceof DomainObjectXxxDomainEventPage.PropertyEvent) {
- val propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
+ var propertyEvent =
(DomainObjectXxxDomainEventPage.PropertyEvent) ev;
switch (propertyEvent.getEventPhase()) {
case EXECUTED:
serviceRegistry
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventPage_createEntity.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventPage_createEntity.java
index a1192ad..a914823 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventPage_createEntity.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventPage_createEntity.java
@@ -27,7 +27,6 @@ import org.apache.causeway.applib.annotation.SemanticsOf;
import demoapp.dom._infra.values.ValueHolderRepository;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
//tag::class[]
@Action(semantics = SemanticsOf.NON_IDEMPOTENT)
@@ -37,7 +36,7 @@ public class DomainObjectXxxLifecycleEventPage_createEntity {
private final DomainObjectXxxLifecycleEventPage page;
@MemberSupport public DomainObjectXxxLifecycleEventPage act(final String
text) {
- val entity = objectRepository.create(text);
+ var entity = objectRepository.create(text);
page.setEntity(entity);
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventSubscriber.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventSubscriber.java
index bd3a705..3875032 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventSubscriber.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObject/xxxLifecycleEvent/DomainObjectXxxLifecycleEventSubscriber.java
@@ -31,7 +31,7 @@ import
org.apache.causeway.applib.services.bookmark.BookmarkService;
import org.apache.causeway.applib.services.clock.ClockService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Service
@@ -42,8 +42,8 @@ class DomainObjectXxxLifecycleEventSubscriber {
final ClockService clockService;
@EventListener(DomainObjectXxxLifecycleEventEntity.LifecycleEvent.class)
// <.>
- public void on(DomainObjectXxxLifecycleEventEntity.LifecycleEvent ev) {
// <1>
- val vm = new DomainObjectLifecycleEventVm(
+ public void on(final DomainObjectXxxLifecycleEventEntity.LifecycleEvent
ev) { // <1>
+ var vm = new DomainObjectLifecycleEventVm(
clockService.getClock().nowAsLocalDateTime(),
ev.getClass().getSimpleName(),
bookmarkService.bookmarkFor(ev.getSource()).map(Bookmark::toString).orElse(null)
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/bookmarking/DomainObjectLayoutBookmarking_addChildren.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/bookmarking/DomainObjectLayoutBookmarking_addChildren.java
index cba7d53..e2ba2f1 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/bookmarking/DomainObjectLayoutBookmarking_addChildren.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/bookmarking/DomainObjectLayoutBookmarking_addChildren.java
@@ -27,7 +27,6 @@ import org.apache.causeway.applib.annotation.MemberSupport;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
@Action
@RequiredArgsConstructor
@@ -36,8 +35,8 @@ public class DomainObjectLayoutBookmarking_addChildren {
private final DomainObjectLayoutBookmarkingEntity parent;
@MemberSupport
- public DomainObjectLayoutBookmarkingEntity act(int number) {
- val strings = samples.stream().collect(Collectors.toList());
+ public DomainObjectLayoutBookmarkingEntity act(final int number) {
+ var strings = samples.stream().collect(Collectors.toList());
for (int i = 0; i < number; i++) {
parent.addChild(parent.getName() + " - " + strings.get(i));
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/xxxUiEvent/DomainObjectLayoutXxxUiEventSubscriber.java
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/xxxUiEvent/DomainObjectLayoutXxxUiEventSubscriber.java
index 02f9173..6e388da 100644
---
a/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/xxxUiEvent/DomainObjectLayoutXxxUiEventSubscriber.java
+++
b/domain/src/main/java/demoapp/dom/domain/objects/DomainObjectLayout/xxxUiEvent/DomainObjectLayoutXxxUiEventSubscriber.java
@@ -27,7 +27,7 @@ import org.springframework.stereotype.Service;
import
org.apache.causeway.applib.annotation.ObjectSupport.ClassPathIconResource;
import org.apache.causeway.applib.services.title.TitleService;
-import lombok.val;
+
import lombok.extern.log4j.Log4j2;
//tag::class[]
@@ -42,7 +42,7 @@ public class DomainObjectLayoutXxxUiEventSubscriber {
//tag::titleUiEvent[]
@EventListener
void onTitleUiEvent(final DomainObjectLayoutXxxUiEventEntity.TitleEvent
titleUiEvent) {
- val source = titleUiEvent.getSource();
+ var source = titleUiEvent.getSource();
titleUiEvent.setTitle(
hasNameInFirstHalfOfAlphabet(source)
? source.getName().toUpperCase()
@@ -53,7 +53,7 @@ public class DomainObjectLayoutXxxUiEventSubscriber {
//tag::iconUiEvent[]
@EventListener
void onIconUiEvent(final DomainObjectLayoutXxxUiEventEntity.IconEvent
iconUiEvent) {
- val source = iconUiEvent.getSource();
+ var source = iconUiEvent.getSource();
if (hasNameInFirstHalfOfAlphabet(source)) {
iconUiEvent.setIcon(new ClassPathIconResource("signature"));
}
@@ -63,7 +63,7 @@ public class DomainObjectLayoutXxxUiEventSubscriber {
//tag::cssClassUiEvent[]
@EventListener
void onCssClassUiEvent(final
DomainObjectLayoutXxxUiEventEntity.CssClassEvent cssClassUiEvent) {
- val source = cssClassUiEvent.getSource();
+ var source = cssClassUiEvent.getSource();
cssClassUiEvent.setCssClass(hasNameInFirstHalfOfAlphabet(source)
? "custom1"
: "custom2");
@@ -73,7 +73,7 @@ public class DomainObjectLayoutXxxUiEventSubscriber {
//tag::layoutUiEvent[]
@EventListener
void onLayoutUiEvent(final DomainObjectLayoutXxxUiEventEntity.LayoutEvent
layoutUiEvent) {
- val source = layoutUiEvent.getSource();
+ var source = layoutUiEvent.getSource();
layoutUiEvent.setLayout(
hasNameInFirstHalfOfAlphabet(source)
? "alternative1"
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
b/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
index bcd3977..d5d12ed 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/Property/PropertyMenu.java
@@ -32,7 +32,7 @@ import org.apache.causeway.applib.value.Blob;
import org.apache.causeway.applib.value.Clob;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import demoapp.dom._infra.values.ValueHolderRepository;
import
demoapp.dom.domain.properties.Property.commandPublishing.PropertyCommandPublishingPage;
@@ -103,7 +103,7 @@ public class PropertyMenu {
describedAs = "Length of text fields"
)
public PropertyFileAcceptPage fileAccept(){
- val page = new PropertyFileAcceptPage();
+ var page = new PropertyFileAcceptPage();
setSampleBlob(".pdf", page::setPdfProperty);
setSampleClob(".txt", page::setTxtProperty);
return page;
@@ -115,7 +115,7 @@ public class PropertyMenu {
describedAs = "Length of text fields"
)
public PropertyMaxLengthPage maxLength(){
- val vm = new PropertyMaxLengthPage();
+ var vm = new PropertyMaxLengthPage();
vm.setName(stringSamples.single());
return vm;
}
@@ -126,7 +126,7 @@ public class PropertyMenu {
describedAs = "Regular expressions, such as email"
)
public PropertyMustSatisfyPage mustSatisfy(){
- val vm = new PropertyMustSatisfyPage();
+ var vm = new PropertyMustSatisfyPage();
vm.setCustomerAge(18);
return vm;
}
@@ -134,7 +134,7 @@ public class PropertyMenu {
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-infinity", describedAs = "Regular
expressions, such as email")
public PropertyOptionalityPage optionality(){
- val vm = new PropertyOptionalityPage();
+ var vm = new PropertyOptionalityPage();
vm.setOptionalProperty(null);
vm.setMandatoryProperty("mandatory");
vm.setNullableProperty(null);
@@ -147,10 +147,10 @@ public class PropertyMenu {
describedAs = "Regular expressions, such as email"
)
public PropertyProjectingPage projecting(){
- val vm = new PropertyProjectingPage();
+ var vm = new PropertyProjectingPage();
propertyProjectingChildEntities.all().forEach(childEntity -> {
- val childVm = new PropertyProjectingChildVm(childEntity);
+ var childVm = new PropertyProjectingChildVm(childEntity);
vm.getChildren().add(childVm);
});
@@ -163,7 +163,7 @@ public class PropertyMenu {
describedAs = "Regular expressions, such as email"
)
public PropertyRegexPatternPage regexPattern(){
- val page = new PropertyRegexPatternPage();
+ var page = new PropertyRegexPatternPage();
page.setEmailAddress("[email protected]");
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/Property/snapshot/PropertySnapshotPage_takeXmlSnapshot.java
b/domain/src/main/java/demoapp/dom/domain/properties/Property/snapshot/PropertySnapshotPage_takeXmlSnapshot.java
index 25e8a25..529998a 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/Property/snapshot/PropertySnapshotPage_takeXmlSnapshot.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/Property/snapshot/PropertySnapshotPage_takeXmlSnapshot.java
@@ -28,7 +28,7 @@ import
org.apache.causeway.applib.services.xmlsnapshot.XmlSnapshotService;
import org.apache.causeway.applib.value.Clob;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -41,10 +41,10 @@ public class PropertySnapshotPage_takeXmlSnapshot {
//tag::class[]
@MemberSupport public Clob act(final String fileName) {
- val builder = xmlSnapshotService.builderFor(page);
+ var builder = xmlSnapshotService.builderFor(page);
builder.includePath("friends"); // <.>
- val snapshot = builder.build();
- val doc = snapshot.getXmlDocument();
+ var snapshot = builder.build();
+ var doc = snapshot.getXmlDocument();
return asClob(fileName, xmlService.asString(doc));
}
//end::class[]
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/PropertyLayoutMenu.java
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/PropertyLayoutMenu.java
index 1e30212..2a4422a 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/PropertyLayoutMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/PropertyLayoutMenu.java
@@ -28,7 +28,7 @@ import
org.apache.causeway.applib.annotation.PriorityPrecedence;
import org.apache.causeway.applib.annotation.SemanticsOf;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import
demoapp.dom.domain.properties.PropertyLayout.cssClass.PropertyLayoutCssClassPage;
import
demoapp.dom.domain.properties.PropertyLayout.describedAs.PropertyLayoutDescribedAsPage;
@@ -62,7 +62,7 @@ public class PropertyLayoutMenu {
describedAs = "Description of the property, shown as a tooltip"
)
public PropertyLayoutDescribedAsPage describedAs(){
- val page = new PropertyLayoutDescribedAsPage();
+ var page = new PropertyLayoutDescribedAsPage();
page.setName("Joey");
page.setNotes("Favorite Friend");
page.setAddress("Apartment over the coffee shop\nNew York\nNew York");
@@ -93,7 +93,7 @@ public class PropertyLayoutMenu {
describedAs = "Textboxes"
)
public PropertyLayoutMultiLinePage multiLine(){
- val vm = new PropertyLayoutMultiLinePage();
+ var vm = new PropertyLayoutMultiLinePage();
vm.setPropertyUsingAnnotation(
"A multiline string\n" +
"spanning\n" +
@@ -134,7 +134,7 @@ public class PropertyLayoutMenu {
describedAs = "Performance hint for properties holding unchanging
large objects"
)
public PropertyLayoutRepaintingPage repainting(){
- val page = new PropertyLayoutRepaintingPage();
+ var page = new PropertyLayoutRepaintingPage();
return page;
}
@@ -144,7 +144,7 @@ public class PropertyLayoutMenu {
describedAs = "Length of text fields"
)
public PropertyLayoutTypicalLengthPage typicalLength(){
- val page = new PropertyLayoutTypicalLengthPage();
+ var page = new PropertyLayoutTypicalLengthPage();
page.setName("abcdefghij");
page.setNotes("abcdefghij");
return page;
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileNodeVm.java
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileNodeVm.java
index 0b8d0fb..1ea59ea 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileNodeVm.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileNodeVm.java
@@ -38,7 +38,7 @@ import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
-import lombok.val;
+
@Named("demo.FileNodeVm")
@DomainObject(nature=Nature.VIEW_MODEL)
@@ -62,7 +62,7 @@ public class FileNodeVm implements HasAsciiDocDescription {
if(this.path == null) {
return "(root)";
}
- val file = asFile();
+ var file = asFile();
return file.getName().length()!=0 ? file.getName() : file.toString();
}
//end::title[]
@@ -80,7 +80,7 @@ public class FileNodeVm implements HasAsciiDocDescription {
hidden=Where.EVERYWHERE // <.>
)
public FileNodeVm getParent() {
- val parentFile = asFile().getParentFile();
+ var parentFile = asFile().getParentFile();
return parentFile != null
? new FileNodeVm(parentFile)
: null;
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileSystemTreeAdapter.java
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileSystemTreeAdapter.java
index 71794d7..c7fb191 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileSystemTreeAdapter.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileSystemTreeAdapter.java
@@ -23,25 +23,25 @@ import java.util.stream.Stream;
import org.apache.causeway.applib.graph.tree.TreeAdapter;
-import lombok.val;
+
//tag::class[]
public class FileSystemTreeAdapter implements TreeAdapter<FileNodeVm> {
@Override
- public int childCountOf(FileNodeVm value) {
+ public int childCountOf(final FileNodeVm value) {
return (int) streamChildFiles(value).count();
}
@Override
- public Stream<FileNodeVm> childrenOf(FileNodeVm value) {
+ public Stream<FileNodeVm> childrenOf(final FileNodeVm value) {
return streamChildFiles(value)
.map(FileNodeVm::new);
}
- private static Stream<File> streamChildFiles(FileNodeVm fileNode){
- val file = fileNode.asFile();
- val childFiles = file.listFiles();
+ private static Stream<File> streamChildFiles(final FileNodeVm fileNode){
+ var file = fileNode.asFile();
+ var childFiles = file.listFiles();
return childFiles != null
? Stream.of(childFiles)
.filter(f -> !f.isHidden())
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileTreeNodeService.java
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileTreeNodeService.java
index e5f1c37..8bea773 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileTreeNodeService.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/PropertyLayout/navigable/FileTreeNodeService.java
@@ -32,7 +32,7 @@ import org.apache.causeway.applib.graph.tree.TreePath;
import org.apache.causeway.applib.services.factory.FactoryService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@SuppressWarnings("unchecked")
//tag::sessionTree[]
@@ -45,8 +45,8 @@ public class FileTreeNodeService {
final FactoryService factoryService;
public TreeNode<FileNodeVm> sessionTree() {
- val session = httpSessionProvider.get();
- val cacheKey = TreeNode.class.getName();
+ var session = httpSessionProvider.get();
+ var cacheKey = TreeNode.class.getName();
var tree = (TreeNode<FileNodeVm>) session.getAttribute(cacheKey);
if(tree == null) {
tree = newTree(factoryService);
@@ -58,10 +58,10 @@ public class FileTreeNodeService {
//end::sessionTree[]
//tag::newTree[]
- private static TreeNode<FileNodeVm> newTree(FactoryService factoryService)
{
+ private static TreeNode<FileNodeVm> newTree(final FactoryService
factoryService) {
TreeNode<FileNodeVm> tree;
- val rootFile =
FileSystems.getDefault().getRootDirectories().iterator().next().toFile();
- val rootNode = new FileNodeVm(rootFile);
+ var rootFile =
FileSystems.getDefault().getRootDirectories().iterator().next().toFile();
+ var rootNode = new FileNodeVm(rootFile);
tree = TreeNode.root(rootNode, FileSystemTreeAdapter.class,
factoryService);
tree.expand(TreePath.of(0)); // expand the root node
return tree;
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/ValueSemanticsMenu.java
b/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/ValueSemanticsMenu.java
index fcbe55f..cf391f8 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/ValueSemanticsMenu.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/ValueSemanticsMenu.java
@@ -31,7 +31,7 @@ import
org.apache.causeway.applib.annotation.PriorityPrecedence;
import org.apache.causeway.applib.annotation.SemanticsOf;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import
demoapp.dom.domain.properties.ValueSemantics.dateRenderAdjustDays.ValueSemanticsDateRenderAdjustDaysPage;
import
demoapp.dom.domain.properties.ValueSemantics.percentage.ValueSemanticsProviderPercentagePage;
@@ -47,7 +47,7 @@ public class ValueSemanticsMenu {
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-step-forward", describedAs = "Inclusive and
exclusive date ranges")
public ValueSemanticsDateRenderAdjustDaysPage dateRenderAdjustDays(){
- val page = new ValueSemanticsDateRenderAdjustDaysPage();
+ var page = new ValueSemanticsDateRenderAdjustDaysPage();
page.setStartDate(LocalDate.of(2012,1,1));
page.setEndDate(page.getStartDate().plusDays(7)); // <.>
return page;
@@ -58,7 +58,7 @@ public class ValueSemanticsMenu {
@Action(semantics = SemanticsOf.SAFE)
@ActionLayout(cssClassFa="fa-percent", describedAs = "Use a custom
ValueSemanticsProvider with meta-annotation to customise the display")
public ValueSemanticsProviderPercentagePage percentage(){
- val page = new ValueSemanticsProviderPercentagePage();
+ var page = new ValueSemanticsProviderPercentagePage();
page.setPercentage(new BigDecimal(".95"));
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/dateRenderAdjustDays/ValueSemanticsDateRenderAdjustDaysPage_downloadAsXml.java
b/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/dateRenderAdjustDays/ValueSemanticsDateRenderAdjustDaysPage_downloadAsXml.java
index 5ff6db2..bc0eb53 100644
---
a/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/dateRenderAdjustDays/ValueSemanticsDateRenderAdjustDaysPage_downloadAsXml.java
+++
b/domain/src/main/java/demoapp/dom/domain/properties/ValueSemantics/dateRenderAdjustDays/ValueSemanticsDateRenderAdjustDaysPage_downloadAsXml.java
@@ -28,7 +28,7 @@ import org.apache.causeway.applib.value.Clob;
import org.apache.causeway.applib.value.NamedWithMimeType;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(
@@ -43,7 +43,7 @@ public class
ValueSemanticsDateRenderAdjustDaysPage_downloadAsXml {
//tag::class[]
@MemberSupport public Clob act(final String fileName) {
- val xml = jaxbService.toXml(page);
+ var xml = jaxbService.toXml(page);
return Clob.of(fileName, NamedWithMimeType.CommonMimeType.XML, xml);
}
// ...
diff --git a/domain/src/main/java/demoapp/dom/featured/FeaturedMenu.java
b/domain/src/main/java/demoapp/dom/featured/FeaturedMenu.java
index c92b83b..d899bce 100644
--- a/domain/src/main/java/demoapp/dom/featured/FeaturedMenu.java
+++ b/domain/src/main/java/demoapp/dom/featured/FeaturedMenu.java
@@ -33,7 +33,7 @@ import org.apache.causeway.applib.annotation.SemanticsOf;
import org.apache.causeway.applib.services.factory.FactoryService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
import demoapp.dom.featured.customui.GeoapifyClient;
import demoapp.dom.featured.customui.WhereInTheWorldPage;
@@ -55,7 +55,7 @@ public class FeaturedMenu {
describedAs="Opens the Tooltip-Demo page."
)
public TooltipPage toolTips(){
- val demo = factoryService.viewModel(new TooltipPage());
+ var demo = factoryService.viewModel(new TooltipPage());
demo.getCollection().add(DemoItem.of("first"));
demo.getCollection().add(DemoItem.of("second"));
diff --git
a/domain/src/main/java/demoapp/dom/featured/customui/GeoapifyClient.java
b/domain/src/main/java/demoapp/dom/featured/customui/GeoapifyClient.java
index fbe2a4e..3b70014 100644
--- a/domain/src/main/java/demoapp/dom/featured/customui/GeoapifyClient.java
+++ b/domain/src/main/java/demoapp/dom/featured/customui/GeoapifyClient.java
@@ -40,7 +40,7 @@ import lombok.Builder;
import lombok.Data;
import lombok.SneakyThrows;
import lombok.Value;
-import lombok.val;
+
//tag::class[]
@Service
@@ -70,12 +70,12 @@ public class GeoapifyClient implements Serializable {
//...
//end::class[]
- val url = new URL(String.format(
+ var url = new URL(String.format(
"https://api.geoapify.com/v1/geocode/search?text=%s&apiKey=%s"
, URLEncoder.encode(address, StandardCharsets.UTF_8)
, apiKey));
- val response = objectMapper.readValue(url, Response.class);
+ var response = objectMapper.readValue(url, Response.class);
return new GeocodeResponse(
response.getFeatures().get(0).getProperties().getLat(),
@@ -108,7 +108,7 @@ public class GeoapifyClient implements Serializable {
//end::class[]
public byte[] toJpeg(final JpegRequest request) throws IOException {
- val urlStr = String.format(
+ var urlStr = String.format(
"https://maps.geoapify.com/v1/staticmap?style=osm-carto&width=%s&height=%s¢er=lonlat:%s,%s&zoom=%d&apiKey=%s"
, request.getWidth()
, request.getHeight()
@@ -116,8 +116,8 @@ public class GeoapifyClient implements Serializable {
, request.getLatitude()
, request.getZoom()
, apiKey);
- val con = (HttpURLConnection) new URL(urlStr).openConnection();
- val is = con.getInputStream();
+ var con = (HttpURLConnection) new URL(urlStr).openConnection();
+ var is = con.getInputStream();
return _Bytes.of(is);
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompleteMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompleteMenu.java
index e893d65..8165d9f 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompleteMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompleteMenu.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.applib.services.factory.FactoryService;
import demoapp.dom.progmodel.actions.TvCharacterPopulator;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.ActionAutoCompleteMenu")
@DomainService
@@ -44,7 +44,7 @@ public class ActionAutoCompleteMenu {
@Action
@ActionLayout(cssClassFa="fa-wand-magic-sparkles")
public ActionAutoCompletePage autoComplete(){
- val page = factoryService.viewModel(new ActionAutoCompletePage());
+ var page = factoryService.viewModel(new ActionAutoCompletePage());
tvCharacterPopulator.populate(page.getTvCharacters());
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompletePage_selectTvCharactersByShow.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompletePage_selectTvCharactersByShow.java
index 349e124..e80b2ee 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompletePage_selectTvCharactersByShow.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/autocomplete/ActionAutoCompletePage_selectTvCharactersByShow.java
@@ -32,7 +32,7 @@ import demoapp.dom.progmodel.actions.TvCharacter;
import demoapp.dom.progmodel.actions.TvShow;
import lombok.RequiredArgsConstructor;
import lombok.Value;
-import lombok.val;
+
import lombok.experimental.Accessors;
//tag::class[]
@@ -43,9 +43,9 @@ public class ActionAutoCompletePage_selectTvCharactersByShow {
private final ActionAutoCompletePage page;
@MemberSupport public ActionAutoCompletePage act(
- @Parameter(optionality = Optionality.MANDATORY)
+ @Parameter(optionality = Optionality.MANDATORY) final
TvShow tvShow, // <.>
- @Parameter(optionality = Optionality.MANDATORY)
+ @Parameter(optionality = Optionality.MANDATORY) final
List<TvCharacter> tvCharacters
) {
page.getSelectedTvCharacters().clear();
@@ -64,7 +64,7 @@ public class ActionAutoCompletePage_selectTvCharactersByShow {
@MinLength(1)
final String search // <.>
) {
- val tvShowSelected = params.tvShow(); // <.>
+ var tvShowSelected = params.tvShow(); // <.>
return page.getTvCharacters()
.stream()
.filter(tvCharacter -> tvShowSelected ==
tvCharacter.getTvShow())
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/bulk/BulkActionMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/bulk/BulkActionMenu.java
index bf8aedb..102c30a 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/bulk/BulkActionMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/bulk/BulkActionMenu.java
@@ -32,7 +32,7 @@ import
org.apache.causeway.applib.annotation.PriorityPrecedence;
import org.apache.causeway.applib.services.factory.FactoryService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.BulkActionMenu")
@DomainService
@@ -52,7 +52,7 @@ public class BulkActionMenu {
describedAs = "Bulk actions"
)
public BulkActionPage bulkActions() {
- val page = factoryService.viewModel(new BulkActionPage());
+ var page = factoryService.viewModel(new BulkActionPage());
repository.all()
.stream()
.filter(x -> FRIENDS_NAMES.contains(x.getName()))
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesMenu.java
index a3137aa..8b0250c 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesMenu.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.applib.services.factory.FactoryService;
import demoapp.dom.progmodel.actions.TvCharacterPopulator;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.ActionChoicesMenu")
@DomainService
@@ -44,7 +44,7 @@ public class ActionChoicesMenu {
@Action
@ActionLayout(cssClassFa="fa-list-ul")
public ActionChoicesPage choices(){
- val page = factoryService.viewModel(new ActionChoicesPage());
+ var page = factoryService.viewModel(new ActionChoicesPage());
tvCharacterPopulator.populate(page.getTvCharacters());
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesPage_selectTvCharactersByShow.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesPage_selectTvCharactersByShow.java
index c7c01b8..db1b711 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesPage_selectTvCharactersByShow.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/choices/ActionChoicesPage_selectTvCharactersByShow.java
@@ -31,7 +31,7 @@ import demoapp.dom.progmodel.actions.TvCharacter;
import demoapp.dom.progmodel.actions.TvShow;
import lombok.RequiredArgsConstructor;
import lombok.Value;
-import lombok.val;
+
import lombok.experimental.Accessors;
//tag::class[]
@@ -61,7 +61,7 @@ public class ActionChoicesPage_selectTvCharactersByShow {
@MemberSupport public List<TvCharacter> choicesTvCharacters(
final Parameters params // <2>
) {
- val tvShowSelected = params.tvShow(); // <.>
+ var tvShowSelected = params.tvShow(); // <.>
return page.getTvCharacters()
.stream()
.filter(tvCharacter -> tvShowSelected ==
tvCharacter.getTvShow())
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsMenu.java
index dcc2d37..ab84d1c 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsMenu.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.applib.services.factory.FactoryService;
import demoapp.dom.progmodel.actions.TvCharacterPopulator;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.ActionDefaultsMenu")
@DomainService
@@ -44,7 +44,7 @@ public class ActionDefaultsMenu {
@Action
@ActionLayout(cssClassFa="fa-heart")
public ActionDefaultsPage defaults(){
- val page = factoryService.viewModel(new ActionDefaultsPage());
+ var page = factoryService.viewModel(new ActionDefaultsPage());
tvCharacterPopulator.populate(page.getTvCharacters());
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsPage_selectTvCharactersByShowAndSex.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsPage_selectTvCharactersByShowAndSex.java
index d741c76..ba8a3e5 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsPage_selectTvCharactersByShowAndSex.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/defaults/ActionDefaultsPage_selectTvCharactersByShowAndSex.java
@@ -32,7 +32,7 @@ import demoapp.dom.progmodel.actions.TvCharacter;
import demoapp.dom.progmodel.actions.TvShow;
import lombok.RequiredArgsConstructor;
import lombok.Value;
-import lombok.val;
+
import lombok.experimental.Accessors;
//tag::class[]
@@ -71,8 +71,8 @@ public class
ActionDefaultsPage_selectTvCharactersByShowAndSex {
@MemberSupport public List<TvCharacter> defaultTvCharacters( // <3>
final Parameters params // <4>
) {
- val tvShowSelected = params.tvShow(); // <.>
- val sexSelected = params.sex; // <5>
+ var tvShowSelected = params.tvShow(); // <.>
+ var sexSelected = params.sex; // <5>
return choicesTvCharacters()
.stream()
.filter(tvCharacter -> tvShowSelected ==
tvCharacter.getTvShow())
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidateMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidateMenu.java
index c535873..8c3dfb6 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidateMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidateMenu.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.applib.services.factory.FactoryService;
import demoapp.dom.progmodel.actions.TvCharacterPopulator;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.ActionValidateMenu")
@DomainService
@@ -44,7 +44,7 @@ public class ActionValidateMenu {
@Action
@ActionLayout(cssClassFa="fa-circle-question")
public ActionValidatePage validate(){
- val page = factoryService.viewModel(new ActionValidatePage());
+ var page = factoryService.viewModel(new ActionValidatePage());
tvCharacterPopulator.populate(page.getTvCharacters());
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidatePage_selectTvCharactersByShowAndSexUsingRecord.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidatePage_selectTvCharactersByShowAndSexUsingRecord.java
index f32e839..1649c35 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidatePage_selectTvCharactersByShowAndSexUsingRecord.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/validate/ActionValidatePage_selectTvCharactersByShowAndSexUsingRecord.java
@@ -32,7 +32,7 @@ import demoapp.dom.progmodel.actions.TvCharacter;
import demoapp.dom.progmodel.actions.TvShow;
import lombok.RequiredArgsConstructor;
import lombok.Value;
-import lombok.val;
+
import lombok.experimental.Accessors;
//tag::class[]
@@ -83,8 +83,8 @@ public class
ActionValidatePage_selectTvCharactersByShowAndSexUsingRecord {
if (tvCharacters.isEmpty()) {
return "Must specify at least one TV character";
}
- val tvShowSelected = params.tvShow(); // <.>
- val sexSelected = params.sex; // <3>
+ var tvShowSelected = params.tvShow(); // <.>
+ var sexSelected = params.sex; // <3>
List<TvCharacter> collect = choicesTvCharacters()
.stream()
.filter(tvCharacter -> tvShowSelected == null ||
tvShowSelected == tvCharacter.getTvShow())
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/actions/veto/ActionVetoMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/actions/veto/ActionVetoMenu.java
index be19bdb..98c1830 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/actions/veto/ActionVetoMenu.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/actions/veto/ActionVetoMenu.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.applib.services.factory.FactoryService;
import demoapp.dom.progmodel.actions.TvCharacterPopulator;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@Named("demo.ActionVetoMenu")
@DomainService
@@ -44,7 +44,7 @@ public class ActionVetoMenu {
@Action
@ActionLayout(cssClassFa="fa-ban")
public ActionVetoPage veto(){
- val page = factoryService.viewModel(new ActionVetoPage());
+ var page = factoryService.viewModel(new ActionVetoPage());
tvCharacterPopulator.populate(page.getTvCharacters());
return page;
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/ComplexNumber.java
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/ComplexNumber.java
index ef01258..907bd0d 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/ComplexNumber.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/ComplexNumber.java
@@ -21,7 +21,7 @@ package demoapp.dom.progmodel.customvaluetypes.embeddedvalues;
import java.util.function.BiFunction;
import lombok.Value;
-import lombok.val;
+
public interface ComplexNumber {
@@ -50,8 +50,8 @@ public interface ComplexNumber {
}
// this is a naive implementation, just for demo
final String[] parts = complexNumberString.split("\\+|i");
- val real = Double.parseDouble(parts[0]);
- val imaginary = Double.parseDouble(parts[1]);
+ var real = Double.parseDouble(parts[0]);
+ var imaginary = Double.parseDouble(parts[1]);
return factory.apply(real, imaginary);
}
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/jpa/NumberConstantJpaRepository.java
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/jpa/NumberConstantJpaRepository.java
index a028e6c..cb7a461 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/jpa/NumberConstantJpaRepository.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/customvaluetypes/embeddedvalues/jpa/NumberConstantJpaRepository.java
@@ -23,7 +23,7 @@ import org.springframework.stereotype.Service;
import demoapp.dom._infra.values.ValueHolderRepository;
import demoapp.dom.progmodel.customvaluetypes.embeddedvalues.ComplexNumber;
-import lombok.val;
+
@Profile("demo-jpa")
@Service
@@ -35,8 +35,8 @@ extends ValueHolderRepository<ComplexNumber,
NumberConstantJpa> {
}
@Override
- protected NumberConstantJpa newDetachedEntity(ComplexNumber value) {
- val numConst = repositoryService.detachedEntity(new
NumberConstantJpa());
+ protected NumberConstantJpa newDetachedEntity(final ComplexNumber value) {
+ var numConst = repositoryService.detachedEntity(new
NumberConstantJpa());
numConst.setName(((ComplexNumber.SimpleNamedComplexNumber)value).getName());
numConst.setNumber(ComplexNumberJpa.of(value.getRe(), value.getIm()));
return numConst;
diff --git
a/domain/src/main/java/demoapp/dom/progmodel/mixins/CountHolder_fibonacciSequence.java
b/domain/src/main/java/demoapp/dom/progmodel/mixins/CountHolder_fibonacciSequence.java
index 4b1f5f5..76a3065 100644
---
a/domain/src/main/java/demoapp/dom/progmodel/mixins/CountHolder_fibonacciSequence.java
+++
b/domain/src/main/java/demoapp/dom/progmodel/mixins/CountHolder_fibonacciSequence.java
@@ -25,7 +25,7 @@ import org.apache.causeway.applib.annotation.Collection;
import org.apache.causeway.applib.annotation.CollectionLayout;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Collection // <.>
@@ -36,7 +36,7 @@ public class CountHolder_fibonacciSequence {
private final CountHolder holder; // <.>
public List<FibonacciNumberVm> coll() {
- val collection = new ArrayList<FibonacciNumberVm>();
+ var collection = new ArrayList<FibonacciNumberVm>();
final int count = holder.getCount();
for (int i = 0; i < count; i++) {
@@ -46,7 +46,7 @@ public class CountHolder_fibonacciSequence {
return collection;
}
- private static int fibonacciFor(int n) {
+ private static int fibonacciFor(final int n) {
// ...
//end::class[]
if(n <= 1) {
diff --git a/domain/src/main/java/demoapp/dom/progmodel/mixins/MixinMenu.java
b/domain/src/main/java/demoapp/dom/progmodel/mixins/MixinMenu.java
index 3707668..b213ff3 100644
--- a/domain/src/main/java/demoapp/dom/progmodel/mixins/MixinMenu.java
+++ b/domain/src/main/java/demoapp/dom/progmodel/mixins/MixinMenu.java
@@ -25,7 +25,7 @@ import org.apache.causeway.applib.annotation.ActionLayout;
import org.apache.causeway.applib.annotation.DomainService;
import org.apache.causeway.applib.annotation.PriorityPrecedence;
-import lombok.val;
+
@Named("demo.MixinMenu")
@DomainService
@@ -38,7 +38,7 @@ public class MixinMenu {
describedAs="Contribute behaviour to domain objects"
)
public MixinPage mixins(){
- val vm = new MixinPage();
+ var vm = new MixinPage();
vm.setCount(10);
return vm;
}
diff --git
a/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/EmailTicket.java
b/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/EmailTicket.java
index 21671ce..d24340f 100644
---
a/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/EmailTicket.java
+++
b/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/EmailTicket.java
@@ -31,7 +31,7 @@ import org.apache.causeway.commons.internal.base._Strings;
import static org.apache.causeway.commons.internal.base._NullSafe.stream;
import lombok.Builder;
-import lombok.val;
+
/**
* Response from the {@link ErrorReportingService}, containing information to
show to the end-user.
@@ -67,7 +67,7 @@ public class EmailTicket extends SimpleTicket {
//tag::mailTo[]
public String toHtmlLink() {
- val messageProperties = Map.<String, Object>of(
+ var messageProperties = Map.<String, Object>of(
"receiver", receiver,
"subject", htmlEscape(subject),
"body", htmlEscape(
@@ -118,7 +118,7 @@ public class EmailTicket extends SimpleTicket {
//tag::markup[]
@Override
public String getMarkup() {
- val messageProperties = Map.<String, Object>of(
+ var messageProperties = Map.<String, Object>of(
"title", ifPresentMap(getDetails(), details->
String.format("<h3>%s</h3>", htmlEscape(details))),
"img", ifPresentMap(getKittenUrl(), kittenUrl->
String.format("<img src=\"%s\"></img>", kittenUrl)),
"para", String.format("<p><h4>Please report this error:
<span>%s</span></h4></p>", mailTo.toHtmlLink()));
diff --git
a/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/ErrorReportingServiceForDemo.java
b/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/ErrorReportingServiceForDemo.java
index 2efea40..ae6802e 100644
---
a/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/ErrorReportingServiceForDemo.java
+++
b/domain/src/main/java/demoapp/dom/services/core/errorreportingservice/ErrorReportingServiceForDemo.java
@@ -28,7 +28,7 @@ import
org.apache.causeway.applib.services.error.ErrorReportingService;
import org.apache.causeway.applib.services.error.Ticket;
import org.apache.causeway.applib.services.error.Ticket.StackTracePolicy;
-import lombok.val;
+
//tag::class[]
@Service
@@ -39,11 +39,11 @@ public class ErrorReportingServiceForDemo implements
ErrorReportingService {
@Override
public Ticket reportError(final ErrorDetails errorDetails) {
- val reference = "#0"; // <.>
- val userMessage = errorDetails.mainMessage();
- val details = "Apologies!";
+ var reference = "#0"; // <.>
+ var userMessage = errorDetails.mainMessage();
+ var details = "Apologies!";
- val mailTo = EmailTicket.MailTo.builder()
+ var mailTo = EmailTicket.MailTo.builder()
.receiver("[email protected]")
.subject("[Demo-App] Unexpected Error (" + reference + ")")
.body(EmailTicket.MailTo.mailBodyOf(errorDetails))
diff --git
a/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryJpa.java
b/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryJpa.java
index a2e65dd..45fd6bc 100644
---
a/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryJpa.java
+++
b/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryJpa.java
@@ -38,7 +38,7 @@ import org.apache.causeway.applib.annotation.Property;
import
demoapp.dom.services.core.eventbusservice.EventBusServiceDemoPage.UiButtonEvent;
import lombok.Getter;
import lombok.Setter;
-import lombok.val;
+
@Profile("demo-jpa")
@Entity
@@ -54,7 +54,7 @@ extends EventLogEntry {
// -- FACTORY
public static EventLogEntryJpa of(final UiButtonEvent even) {
- val x = new EventLogEntryJpa();
+ var x = new EventLogEntryJpa();
x.setEvent("Button clicked " +
LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_TIME));
return x;
}
diff --git
a/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryRepository.java
b/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryRepository.java
index eccefc8..c83ad10 100644
---
a/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryRepository.java
+++
b/domain/src/main/java/demoapp/dom/services/core/eventbusservice/EventLogEntryRepository.java
@@ -21,7 +21,7 @@ package demoapp.dom.services.core.eventbusservice;
import java.util.List;
import
demoapp.dom.services.core.eventbusservice.EventBusServiceDemoPage.UiButtonEvent;
-import lombok.val;
+
//tag::class[]
public interface EventLogEntryRepository<T extends EventLogEntry> {
@@ -35,7 +35,7 @@ public interface EventLogEntryRepository<T extends
EventLogEntry> {
//tag::class[]
default void storeEvent(final UiButtonEvent event) {
- val entry = newEntityFor(event);
+ var entry = newEntityFor(event);
add(entry);
}
}
diff --git
a/domain/src/main/java/demoapp/dom/services/extensions/secman/apptenancy/ApplicationTenancyEvaluatorForDemo.java
b/domain/src/main/java/demoapp/dom/services/extensions/secman/apptenancy/ApplicationTenancyEvaluatorForDemo.java
index 4d89664..a033d29 100644
---
a/domain/src/main/java/demoapp/dom/services/extensions/secman/apptenancy/ApplicationTenancyEvaluatorForDemo.java
+++
b/domain/src/main/java/demoapp/dom/services/extensions/secman/apptenancy/ApplicationTenancyEvaluatorForDemo.java
@@ -27,7 +27,7 @@ import
org.apache.causeway.extensions.secman.applib.user.dom.ApplicationUser;
import
demoapp.dom.services.extensions.secman.apptenancy.persistence.TenantedEntity;
import lombok.Getter;
-import lombok.val;
+
//tag::class[]
@Service
@@ -35,18 +35,18 @@ public class ApplicationTenancyEvaluatorForDemo
implements ApplicationTenancyEvaluator {
// <.>
@Override
- public boolean handles(Class<?> cls) {
// <.>
+ public boolean handles(final Class<?> cls) {
// <.>
return TenantedEntity.class.isAssignableFrom(cls);
}
private Pattern hidePattern;
// <.>
@Override
- public String hides(Object domainObject, ApplicationUser applicationUser)
{ // <.>
+ public String hides(final Object domainObject, final ApplicationUser
applicationUser) { // <.>
if(hidePattern == null) {
return null;
}
- val tenantedEntity = (TenantedEntity) domainObject;
- val name = tenantedEntity.getName();
+ var tenantedEntity = (TenantedEntity) domainObject;
+ var name = tenantedEntity.getName();
return hidePattern.matcher(name).matches()
? "any non-null value will hide"
@@ -55,12 +55,12 @@ public class ApplicationTenancyEvaluatorForDemo
private Pattern disablePattern;
// <3>
@Override
- public String disables(Object domainObject, ApplicationUser
applicationUser) { // <.>
+ public String disables(final Object domainObject, final ApplicationUser
applicationUser) { // <.>
if(disablePattern == null) {
return null;
}
- val tenantedEntity = (TenantedEntity) domainObject;
- val name = tenantedEntity.getName();
+ var tenantedEntity = (TenantedEntity) domainObject;
+ var name = tenantedEntity.getName();
return disablePattern.matcher(name).matches()
? String.format("disabled, because name matches '%s'",
disablePattern)
@@ -72,7 +72,7 @@ public class ApplicationTenancyEvaluatorForDemo
//tag::hideRegex[]
@Getter
private String hideRegex;
- public void setHideRegex(String hideRegex) {
+ public void setHideRegex(final String hideRegex) {
this.hideRegex = hideRegex;
this.hidePattern = hideRegex != null
? Pattern.compile(hideRegex)
@@ -82,7 +82,7 @@ public class ApplicationTenancyEvaluatorForDemo
@Getter
private String disableRegex;
- public void setDisableRegex(String disableRegex) {
+ public void setDisableRegex(final String disableRegex) {
this.disableRegex = disableRegex;
this.disablePattern = disableRegex != null
? Pattern.compile(disableRegex)
diff --git
a/domain/src/main/java/demoapp/dom/types/causeway/blobs/samples/CausewayBlobsSamples.java
b/domain/src/main/java/demoapp/dom/types/causeway/blobs/samples/CausewayBlobsSamples.java
index bb2e18d..8fedd86 100644
---
a/domain/src/main/java/demoapp/dom/types/causeway/blobs/samples/CausewayBlobsSamples.java
+++
b/domain/src/main/java/demoapp/dom/types/causeway/blobs/samples/CausewayBlobsSamples.java
@@ -31,7 +31,7 @@ import
org.apache.causeway.commons.internal.resources._Resources;
import demoapp.dom.types.Samples;
import lombok.Getter;
import lombok.SneakyThrows;
-import lombok.val;
+
@Service
public class CausewayBlobsSamples implements Samples<Blob> {
@@ -52,7 +52,7 @@ public class CausewayBlobsSamples implements Samples<Blob> {
@SneakyThrows
private Blob loadBlob(final String name) {
- val bytes = _Bytes.of(_Resources.load(CausewayBlobsSamples.class,
name));
+ var bytes = _Bytes.of(_Resources.load(CausewayBlobsSamples.class,
name));
return Blob.of(name, mimeTypeFor(name), bytes);
}
diff --git
a/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/CausewayClobsSamples.java
b/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/CausewayClobsSamples.java
index 50dad66..00ee90d 100644
---
a/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/CausewayClobsSamples.java
+++
b/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/CausewayClobsSamples.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.commons.internal.resources._Resources;
import demoapp.dom.types.Samples;
import lombok.SneakyThrows;
-import lombok.val;
+
@Service
public class CausewayClobsSamples implements Samples<Clob> {
@@ -43,12 +43,12 @@ public class CausewayClobsSamples implements Samples<Clob> {
}
@SneakyThrows
- private Clob loadClob(String name) {
- val text = _Strings.read(_Resources.load(CausewayClobsSamples.class,
name), StandardCharsets.UTF_8);
+ private Clob loadClob(final String name) {
+ var text = _Strings.read(_Resources.load(CausewayClobsSamples.class,
name), StandardCharsets.UTF_8);
return Clob.of(name, mimeTypeFor(name), text);
}
- private static NamedWithMimeType.CommonMimeType mimeTypeFor(String name) {
+ private static NamedWithMimeType.CommonMimeType mimeTypeFor(final String
name) {
if (name.endsWith(".txt")) return NamedWithMimeType.CommonMimeType.TXT;
if (name.endsWith(".rtf")) return NamedWithMimeType.CommonMimeType.RTF;
if (name.endsWith(".xml")) return NamedWithMimeType.CommonMimeType.XML;
diff --git
a/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileSystemTreeAdapter.java
b/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileSystemTreeAdapter.java
index 1775f53..3adbf4e 100644
---
a/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileSystemTreeAdapter.java
+++
b/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileSystemTreeAdapter.java
@@ -23,29 +23,29 @@ import java.util.stream.Stream;
import org.apache.causeway.applib.graph.tree.TreeAdapter;
-import lombok.val;
+
//tag::class[]
public class FileSystemTreeAdapter implements TreeAdapter<FileNodeVm> {
@Override
- public int childCountOf(FileNodeVm value) {
+ public int childCountOf(final FileNodeVm value) {
return (int) streamChildFiles(value).count();
}
@Override
- public Stream<FileNodeVm> childrenOf(FileNodeVm value) {
+ public Stream<FileNodeVm> childrenOf(final FileNodeVm value) {
return streamChildFiles(value)
.map(FileNodeVm::new);
}
- private static Stream<File> streamChildFiles(FileNodeVm fileNode){
+ private static Stream<File> streamChildFiles(final FileNodeVm fileNode){
String path = fileNode.getPath();
if (path == null) {
return Stream.empty();
}
- val file = new File(path);
- val childFiles = file.listFiles();
+ var file = new File(path);
+ var childFiles = file.listFiles();
return childFiles != null
? Stream.of(childFiles)
.filter(f -> !f.isHidden())
diff --git
a/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileTreeNodeService.java
b/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileTreeNodeService.java
index c720b3c..84bf703 100644
---
a/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileTreeNodeService.java
+++
b/domain/src/main/java/demoapp/dom/types/causeway/treenode/FileTreeNodeService.java
@@ -32,7 +32,7 @@ import org.apache.causeway.applib.graph.tree.TreePath;
import org.apache.causeway.applib.services.factory.FactoryService;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
@SuppressWarnings("unchecked")
//tag::sessionTree[]
@@ -45,8 +45,8 @@ public class FileTreeNodeService {
final FactoryService factoryService;
public TreeNode<FileNodeVm> sessionTree() {
- val session = httpSessionProvider.get();
- val cacheKey = TreeNode.class.getName();
+ var session = httpSessionProvider.get();
+ var cacheKey = TreeNode.class.getName();
var tree = (TreeNode<FileNodeVm>) session.getAttribute(cacheKey);
if(tree == null) {
tree = newTree(factoryService);
@@ -58,10 +58,10 @@ public class FileTreeNodeService {
//end::sessionTree[]
//tag::newTree[]
- private static TreeNode<FileNodeVm> newTree(FactoryService factoryService)
{
+ private static TreeNode<FileNodeVm> newTree(final FactoryService
factoryService) {
TreeNode<FileNodeVm> tree;
- val rootFile =
FileSystems.getDefault().getRootDirectories().iterator().next().toFile();
- val rootNode = new FileNodeVm(rootFile);
+ var rootFile =
FileSystems.getDefault().getRootDirectories().iterator().next().toFile();
+ var rootNode = new FileNodeVm(rootFile);
tree = TreeNode.root(rootNode, FileSystemTreeAdapter.class,
factoryService);
tree.expand(TreePath.of(0)); // expand the root node
return tree;
diff --git
a/domain/src/main/java/demoapp/dom/types/javaawt/images/samples/JavaAwtBufferedImagesSamples.java
b/domain/src/main/java/demoapp/dom/types/javaawt/images/samples/JavaAwtBufferedImagesSamples.java
index a007442..88c878c 100644
---
a/domain/src/main/java/demoapp/dom/types/javaawt/images/samples/JavaAwtBufferedImagesSamples.java
+++
b/domain/src/main/java/demoapp/dom/types/javaawt/images/samples/JavaAwtBufferedImagesSamples.java
@@ -30,7 +30,7 @@ import
org.apache.causeway.commons.internal.resources._Resources;
import demoapp.dom.types.Samples;
import lombok.SneakyThrows;
-import lombok.val;
+
@Service
public class JavaAwtBufferedImagesSamples implements Samples<BufferedImage> {
@@ -44,8 +44,8 @@ public class JavaAwtBufferedImagesSamples implements
Samples<BufferedImage> {
}
@SneakyThrows
- private BufferedImage loadImage(String name) {
- val bytes =
_Bytes.of(_Resources.load(JavaAwtBufferedImagesSamples.class, name ));
+ private BufferedImage loadImage(final String name) {
+ var bytes =
_Bytes.of(_Resources.load(JavaAwtBufferedImagesSamples.class, name ));
return javaAwtBufferedImageService.bytesToJavaAwtBufferedImage(bytes);
}
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder_actionReturningArray.java
index 9d19a51..8d290a0 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/booleans/holder/PrimitiveBooleanHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveBooleanHolder_actionReturningArray {
private final PrimitiveBooleanHolder holder;
public boolean[] act() {
- val array = new boolean[(int)samples.stream().count()];
+ var array = new boolean[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/bytes/holder/PrimitiveByteHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/bytes/holder/PrimitiveByteHolder_actionReturningArray.java
index b331c43..c286e8f 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/bytes/holder/PrimitiveByteHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/bytes/holder/PrimitiveByteHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveByteHolder_actionReturningArray {
private final PrimitiveByteHolder holder;
public byte[] act() {
- val array = new byte[(int)samples.stream().count()];
+ var array = new byte[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturningArray.java
index 3b93fae..7761537 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/chars/holder/PrimitiveCharHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveCharHolder_actionReturningArray {
private final PrimitiveCharHolder holder;
public char[] act() {
- val array = new char[(int)samples.stream().count()];
+ var array = new char[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/doubles/holder/PrimitiveDoubleHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/doubles/holder/PrimitiveDoubleHolder_actionReturningArray.java
index bcd91ad..0ec8c4f 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/doubles/holder/PrimitiveDoubleHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/doubles/holder/PrimitiveDoubleHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveDoubleHolder_actionReturningArray {
private final PrimitiveDoubleHolder holder;
public double[] act() {
- val array = new double[(int)samples.stream().count()];
+ var array = new double[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/floats/holder/PrimitiveFloatHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/floats/holder/PrimitiveFloatHolder_actionReturningArray.java
index 980e1eb..0650317 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/floats/holder/PrimitiveFloatHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/floats/holder/PrimitiveFloatHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveFloatHolder_actionReturningArray {
private final PrimitiveFloatHolder holder;
public float[] act() {
- val array = new float[(int)samples.stream().count()];
+ var array = new float[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/ints/holder/PrimitiveIntHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/ints/holder/PrimitiveIntHolder_actionReturningArray.java
index 59438ee..79ac11b 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/ints/holder/PrimitiveIntHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/ints/holder/PrimitiveIntHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveIntHolder_actionReturningArray {
private final PrimitiveIntHolder holder;
public int[] act() {
- val array = new int[(int)samples.stream().count()];
+ var array = new int[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/longs/holder/PrimitiveLongHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/longs/holder/PrimitiveLongHolder_actionReturningArray.java
index 56a421d..f3a07f1 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/longs/holder/PrimitiveLongHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/longs/holder/PrimitiveLongHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveLongHolder_actionReturningArray {
private final PrimitiveLongHolder holder;
public long[] act() {
- val array = new long[(int)samples.stream().count()];
+ var array = new long[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/java/demoapp/dom/types/primitive/shorts/holder/PrimitiveShortHolder_actionReturningArray.java
b/domain/src/main/java/demoapp/dom/types/primitive/shorts/holder/PrimitiveShortHolder_actionReturningArray.java
index 2dcb4f1..3e361b9 100644
---
a/domain/src/main/java/demoapp/dom/types/primitive/shorts/holder/PrimitiveShortHolder_actionReturningArray.java
+++
b/domain/src/main/java/demoapp/dom/types/primitive/shorts/holder/PrimitiveShortHolder_actionReturningArray.java
@@ -26,7 +26,7 @@ import org.apache.causeway.commons.functional.IndexedConsumer;
import demoapp.dom.types.Samples;
import lombok.RequiredArgsConstructor;
-import lombok.val;
+
//tag::class[]
@Action(semantics = SemanticsOf.SAFE)
@@ -36,7 +36,7 @@ public class PrimitiveShortHolder_actionReturningArray {
private final PrimitiveShortHolder holder;
public short[] act() {
- val array = new short[(int)samples.stream().count()];
+ var array = new short[(int)samples.stream().count()];
samples.stream()
.forEach(IndexedConsumer.zeroBased((index, value)->array[index] =
value));
return array;
diff --git
a/domain/src/main/resources/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
b/domain/src/main/resources/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
index dbf83dd..46fbd69 100644
---
a/domain/src/main/resources/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
+++
b/domain/src/main/resources/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
@@ -32,7 +32,7 @@ import
org.apache.causeway.viewer.wicket.model.models.UiObjectWkt;
import org.apache.causeway.viewer.wicket.ui.panels.PanelAbstract;
import lombok.SneakyThrows;
-import lombok.val;
+
import demoapp.dom.featured.customui.GeoapifyClient;
import demoapp.dom.featured.customui.WhereInTheWorldPage;
diff --git
a/domain/src/test/java/demoapp/dom/_infra/resources/ResourceReaderService_Test.java
b/domain/src/test/java/demoapp/dom/_infra/resources/ResourceReaderService_Test.java
index 1ca9814..e349965 100644
---
a/domain/src/test/java/demoapp/dom/_infra/resources/ResourceReaderService_Test.java
+++
b/domain/src/test/java/demoapp/dom/_infra/resources/ResourceReaderService_Test.java
@@ -35,7 +35,7 @@ import org.springframework.mock.env.MockEnvironment;
import org.apache.causeway.core.config.CausewayConfiguration;
import org.apache.causeway.core.config.CausewayModuleCoreConfig;
-import lombok.val;
+
class ResourceReaderService_Test {
@@ -69,7 +69,7 @@ class ResourceReaderService_Test {
void read_with_tags() {
// given
- val attributes = new HashMap<String, Object>();
+ var attributes = new HashMap<String, Object>();
attributes.put("tags", "class");
// when
@@ -84,7 +84,7 @@ class ResourceReaderService_Test {
void read_missing_tags() {
// given
- val attributes = new HashMap<String, Object>();
+ var attributes = new HashMap<String, Object>();
attributes.put("tags", "other");
// when
@@ -99,7 +99,7 @@ class ResourceReaderService_Test {
void read_subdir_with_tags() {
// given
- val attributes = new HashMap<String, Object>();
+ var attributes = new HashMap<String, Object>();
attributes.put("tags", "class");
// when
diff --git a/pom.xml b/pom.xml
index a558b96..0babf93 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more
contributor
- license agreements. See the NOTICE file distributed with this work for
additional
+<!-- 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
@@ -10,205 +12,221 @@
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.causeway.app</groupId>
- <artifactId>causeway-app-starter-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
+ <groupId>org.apache.causeway.examples.apps</groupId>
+ <artifactId>reference-app-parent</artifactId>
+ <version>${revision}</version>
- <groupId>org.apache.causeway.examples.apps</groupId>
- <artifactId>reference-app-parent</artifactId>
- <version>${revision}</version>
+ <name>Reference App - Parent</name>
- <name>Reference App - Parent</name>
+ <packaging>pom</packaging>
- <packaging>pom</packaging>
-
- <properties>
- <revision>4.0.0-SNAPSHOT</revision> <!-- can be overidden like mvn
+ <properties>
+ <revision>4.0.0-SNAPSHOT</revision> <!-- can be overidden like mvn
-Drevision=2.7.8 -->
<causeway.version>4.0.0-SNAPSHOT</causeway.version>
<maven.compiler.release>21</maven.compiler.release>
- <sonar.skip>true</sonar.skip>
- </properties>
-
- <build>
- <resources>
- <resource>
- <filtering>false</filtering>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <filtering>false</filtering>
- <directory>src/main/java</directory>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
-
- <plugins>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <delimiters>
- <delimiter>${*}</delimiter>
- <delimiter>@</delimiter>
- <delimiter>#</delimiter>
- </delimiters>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
-
<addDefaultLicenseMatchers>true</addDefaultLicenseMatchers>
-
<excludeSubProjects>true</excludeSubProjects>
- <excludes>
- <exclude>**/target/**</exclude>
-
<exclude>**/target-ide/**</exclude>
-
-
<exclude>**/node_modules/**</exclude>
- <exclude>**/node/npm</exclude>
-
<exclude>**/node/npm.cmd</exclude>
-
- <exclude>**/*.project</exclude>
- <exclude>**/.classpath</exclude>
-
<exclude>**/.settings/**</exclude>
- <exclude>**/*.launch</exclude>
-
- <exclude>**/*.iml</exclude>
-
<exclude>**/webpack.generated.js</exclude>
-
-
<exclude>**/CREDITS.TXT</exclude>
-
<exclude>**/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/**</exclude>
-
<exclude>**/domain/src/main/java/demoapp/dom/types/causeway/markups/samples/**</exclude>
-
<exclude>**/domain/src/main/java/demoapp/dom/types/causewayext/asciidocs/samples/**</exclude>
-
<exclude>**/domain/src/main/java/demoapp/dom/types/causewayext/markdowns/samples/**</exclude>
-
<exclude>**/domain/src/main/resources/banner.txt</exclude>
-
<exclude>**/domain/src/main/resources/static/**</exclude>
-
<exclude>**/domain/src/test/resources/demoapp/dom/_infra/resources/</exclude>
-
<exclude>**/wicket/src/test/e2e/cypress-scaffolding/integration/examples/*.spec.js</exclude>
-
<exclude>**/wicket/src/test/e2e/cypress-scaffolding/integration/typescript/basic.ts</exclude>
-
- <exclude>**/*.gitkeep</exclude>
- <exclude>**/*.pdn</exclude>
- <exclude>**/*.svg</exclude>
- <exclude>**/*.rtf</exclude>
- <exclude>**/*.json</exclude>
- <exclude>**/*.min.js</exclude>
-
-
<exclude>**/module-nav.adoc</exclude>
-
<exclude>**/component-nav.adoc</exclude>
-
-
<exclude>**/MANIFEST.MF</exclude>
- <exclude>**/*.ucd</exclude>
- <exclude>**/*.ucls</exclude>
-
-
<exclude>**/datanucleus.log</exclude>
-
<exclude>**/gradle/wrapper/gradle-wrapper.properties</exclude>
- <exclude>**/gradlew</exclude>
-
<exclude>**/gradlew.bat</exclude>
-
-
<exclude>**/intellij/launch/*.xml</exclude>
-
-
<exclude>**/META-INF/services/**</exclude>
-
- <exclude>**/samples/**</exclude>
-
<exclude>**/src/main/resources/banner.txt</exclude>
-
<exclude>**/src/main/resources/static/**</exclude>
-
<exclude>**/src/test/resources/demoapp/dom/_infra/resources/**</exclude>
-
<exclude>**/src/test/e2e/cypress-scaffolding/integration/**</exclude>
-
- <exclude>CREDITS.TXT</exclude>
- </excludes>
- <licenses>
- <license
-
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
-
<licenseFamilyCategory>AL2</licenseFamilyCategory>
-
<licenseFamilyName>Apache License 2.0</licenseFamilyName>
- <notes />
- <patterns>
-
<pattern>Licensed to the Apache Software Foundation (ASF) under
-
one</pattern>
- </patterns>
- </license>
- </licenses>
- <licenseFamilies>
- <licenseFamily
-
implementation="org.apache.rat.license.SimpleLicenseFamily">
- <familyName>Apache
License 2.0</familyName>
- </licenseFamily>
- </licenseFamilies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencyManagement>
- <dependencies>
-
- <dependency>
-
<groupId>org.apache.causeway.extensions</groupId>
- <artifactId>causeway-extensions</artifactId>
- <version>${causeway.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
-
<groupId>org.apache.causeway.valuetypes</groupId>
- <artifactId>causeway-valuetypes</artifactId>
- <version>${causeway.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <dependency>
-
<groupId>org.apache.causeway.examples.apps</groupId>
- <artifactId>reference-app-domain</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
-
<groupId>org.apache.causeway.examples.apps</groupId>
- <artifactId>reference-app-web</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
-
<groupId>org.apache.causeway.examples.apps</groupId>
-
<artifactId>reference-app-wicket-common</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
-
<groupId>org.apache.causeway.examples.apps</groupId>
-
<artifactId>reference-app-wicket-jpa</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.projectlombok</groupId>
- <artifactId>lombok</artifactId>
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ <sonar.skip>true</sonar.skip>
+ </properties>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <filtering>false</filtering>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <inherited>true</inherited>
+ <configuration>
+ <delimiters>
+ <delimiter>${*}</delimiter>
+ <delimiter>@</delimiter>
+ <delimiter>#</delimiter>
+ </delimiters>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <configuration>
+ <addDefaultLicenseMatchers>true</addDefaultLicenseMatchers>
+ <excludeSubProjects>true</excludeSubProjects>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ <exclude>**/target-ide/**</exclude>
+
+ <exclude>**/node_modules/**</exclude>
+ <exclude>**/node/npm</exclude>
+ <exclude>**/node/npm.cmd</exclude>
+
+ <exclude>**/*.project</exclude>
+ <exclude>**/.classpath</exclude>
+ <exclude>**/.settings/**</exclude>
+ <exclude>**/*.launch</exclude>
+
+ <exclude>**/*.iml</exclude>
+ <exclude>**/webpack.generated.js</exclude>
+
+ <exclude>**/CREDITS.TXT</exclude>
+ <exclude>
+
**/domain/src/main/java/demoapp/dom/types/causeway/clobs/samples/**</exclude>
+ <exclude>
+
**/domain/src/main/java/demoapp/dom/types/causeway/markups/samples/**</exclude>
+ <exclude>
+
**/domain/src/main/java/demoapp/dom/types/causewayext/asciidocs/samples/**</exclude>
+ <exclude>
+
**/domain/src/main/java/demoapp/dom/types/causewayext/markdowns/samples/**</exclude>
+
<exclude>**/domain/src/main/resources/banner.txt</exclude>
+
<exclude>**/domain/src/main/resources/static/**</exclude>
+ <exclude>
+
**/domain/src/test/resources/demoapp/dom/_infra/resources/</exclude>
+ <exclude>
+
**/wicket/src/test/e2e/cypress-scaffolding/integration/examples/*.spec.js</exclude>
+ <exclude>
+
**/wicket/src/test/e2e/cypress-scaffolding/integration/typescript/basic.ts</exclude>
+
+ <exclude>**/*.gitkeep</exclude>
+ <exclude>**/*.pdn</exclude>
+ <exclude>**/*.svg</exclude>
+ <exclude>**/*.rtf</exclude>
+ <exclude>**/*.json</exclude>
+ <exclude>**/*.min.js</exclude>
+
+ <exclude>**/module-nav.adoc</exclude>
+ <exclude>**/component-nav.adoc</exclude>
+
+ <exclude>**/MANIFEST.MF</exclude>
+ <exclude>**/*.ucd</exclude>
+ <exclude>**/*.ucls</exclude>
+
+ <exclude>**/datanucleus.log</exclude>
+
<exclude>**/gradle/wrapper/gradle-wrapper.properties</exclude>
+ <exclude>**/gradlew</exclude>
+ <exclude>**/gradlew.bat</exclude>
+
+ <exclude>**/intellij/launch/*.xml</exclude>
+
+ <exclude>**/META-INF/services/**</exclude>
+
+ <exclude>**/samples/**</exclude>
+ <exclude>**/src/main/resources/banner.txt</exclude>
+ <exclude>**/src/main/resources/static/**</exclude>
+ <exclude>
+
**/src/test/resources/demoapp/dom/_infra/resources/**</exclude>
+ <exclude>
+
**/src/test/e2e/cypress-scaffolding/integration/**</exclude>
+
+ <exclude>CREDITS.TXT</exclude>
+ </excludes>
+ <licenses>
+ <license
+
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
+ <licenseFamilyCategory>AL2</licenseFamilyCategory>
+ <licenseFamilyName>Apache License
2.0</licenseFamilyName>
+ <notes />
+ <patterns>
+ <pattern>Licensed to the Apache Software
+ Foundation (ASF) under
+ one</pattern>
+ </patterns>
+ </license>
+ </licenses>
+ <licenseFamilies>
+ <licenseFamily
+
implementation="org.apache.rat.license.SimpleLicenseFamily">
+ <familyName>Apache License 2.0</familyName>
+ </licenseFamily>
+ </licenseFamilies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- SUB MODULES -->
+
+ <dependency>
+ <groupId>org.apache.causeway.examples.apps</groupId>
+ <artifactId>reference-app-domain</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.examples.apps</groupId>
+ <artifactId>reference-app-web</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.examples.apps</groupId>
+ <artifactId>reference-app-wicket-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.examples.apps</groupId>
+ <artifactId>reference-app-wicket-jpa</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!-- APACHE CAUSEWAY -->
+
+ <dependency>
+ <groupId>org.apache.causeway</groupId>
+ <artifactId>causeway-bom</artifactId>
+ <version>${causeway.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.extensions</groupId>
+ <artifactId>causeway-extensions</artifactId>
+ <version>${causeway.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.causeway.valuetypes</groupId>
+ <artifactId>causeway-valuetypes</artifactId>
+ <version>${causeway.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
<modules>
<module>domain</module>
diff --git
a/testing/jpa/src/test/java/demoapp/testing/jpa/SpinUpReferenceJpaTest.java
b/testing/jpa/src/test/java/demoapp/testing/jpa/SpinUpReferenceJpaTest.java
index d3efc8b..a746e7d 100644
--- a/testing/jpa/src/test/java/demoapp/testing/jpa/SpinUpReferenceJpaTest.java
+++ b/testing/jpa/src/test/java/demoapp/testing/jpa/SpinUpReferenceJpaTest.java
@@ -33,7 +33,7 @@ import
org.apache.causeway.core.metamodel.context.MetaModelContext;
import org.apache.causeway.core.metamodel.object.MmSpecUtils;
import org.apache.causeway.testing.unittestsupport.applib.util.ApprovalUtils;
-import lombok.val;
+
@SpringBootTest(
classes = {
@@ -59,7 +59,7 @@ class SpinUpReferenceJpaTest {
@UseReporter(DiffReporter.class)
void verify() {
- val specificationsBySortAsYaml =
+ var specificationsBySortAsYaml =
MmSpecUtils.specificationsBySortAsYaml(mmc.getSpecificationLoader());
//debug
diff --git a/web/src/main/java/demoapp/web/ReferenceAppManifestCommon.java
b/web/src/main/java/demoapp/web/ReferenceAppManifestCommon.java
index 0d6c5b8..2f1ad1f 100644
--- a/web/src/main/java/demoapp/web/ReferenceAppManifestCommon.java
+++ b/web/src/main/java/demoapp/web/ReferenceAppManifestCommon.java
@@ -33,7 +33,7 @@ import
org.apache.causeway.extensions.secman.integration.authenticator.Authentic
import
org.apache.causeway.testing.h2console.ui.CausewayModuleTestingH2ConsoleUi;
import
org.apache.causeway.viewer.restfulobjects.viewer.CausewayModuleViewerRestfulObjectsViewer;
-import lombok.val;
+
import lombok.extern.log4j.Log4j2;
import demoapp.dom._infra.fixtures.DemoFixtureScript;
@@ -78,7 +78,7 @@ public class ReferenceAppManifestCommon {
@Bean
public WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>
webServerFactoryCustomizer() {
return factory -> {
- val contextPath = Optional
+ var contextPath = Optional
.ofNullable(System.getProperty("ContextPath"))
.orElse(System.getenv("ContextPath")); // fallback
if(contextPath!=null) {
diff --git
a/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
b/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
index fb17e55..32aae0a 100644
---
a/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
+++
b/wicket/common/src/main/java/demoapp/webapp/wicket/common/featured/customui/WhereInTheWorldPanel.java
@@ -32,7 +32,7 @@ import
org.apache.causeway.viewer.wicket.model.models.UiObjectWkt;
import org.apache.causeway.viewer.wicket.ui.panels.PanelAbstract;
import lombok.SneakyThrows;
-import lombok.val;
+
import demoapp.dom.featured.customui.GeoapifyClient;
import demoapp.dom.featured.customui.WhereInTheWorldPage;
@@ -66,17 +66,17 @@ extends PanelAbstract<ManagedObject, UiObjectWkt> {
public void onInitialize() {
super.onInitialize();
- val managedObject = getModel().getObject(); //
<.>
- val customUiVm = (WhereInTheWorldPage) managedObject.getPojo(); //
<.>
+ var managedObject = getModel().getObject(); //
<.>
+ var customUiVm = (WhereInTheWorldPage) managedObject.getPojo(); //
<.>
- val latitude = new Label("latitude", customUiVm.getLatitude()); //
<.>
- val longitude = new Label("longitude", customUiVm.getLongitude()); //
<.>
- val address = new Label("address", customUiVm.getAddress()); //
<.>
+ var latitude = new Label("latitude", customUiVm.getLatitude()); //
<.>
+ var longitude = new Label("longitude", customUiVm.getLongitude()); //
<.>
+ var address = new Label("address", customUiVm.getAddress()); //
<.>
- val map = createMapComponent("map", customUiVm); //
<.>
+ var map = createMapComponent("map", customUiVm); //
<.>
- val sourcesComponent = createPropertyComponent("sources"); //
<.>
- val descriptionComponent = createPropertyComponent("description"); //
<.>
+ var sourcesComponent = createPropertyComponent("sources"); //
<.>
+ var descriptionComponent = createPropertyComponent("description"); //
<.>
addOrReplace(
latitude, longitude, address, map,
@@ -87,7 +87,7 @@ extends PanelAbstract<ManagedObject, UiObjectWkt> {
//tag::createMapComponent[]
@SneakyThrows
private Image createMapComponent(final String id, final
WhereInTheWorldPage vm) {
- val bytes = geoapifyClient.toJpeg(
+ var bytes = geoapifyClient.toJpeg(
vm.getLatitude(), vm.getLongitude(), vm.getZoom());
// <.>
return new Image(id, new ByteArrayResource("image/jpeg", bytes)); //
<.>
}
@@ -95,11 +95,11 @@ extends PanelAbstract<ManagedObject, UiObjectWkt> {
//tag::createPropertyComponent[]
private Component createPropertyComponent(final String propertyId) {
- val managedObject = getModel().getManagedObject();
- val spec = managedObject.objSpec();
// <.>
- val property = spec.getPropertyElseFail(propertyId);
// <.>
+ var managedObject = getModel().getManagedObject();
+ var spec = managedObject.objSpec();
// <.>
+ var property = spec.getPropertyElseFail(propertyId);
// <.>
- val scalarModel =
+ var scalarModel =
getModel().getPropertyModel(
// <.>
property, ViewOrEditMode.VIEWING,
RenderingHint.REGULAR);
diff --git a/wicket/jpa/pom.xml b/wicket/jpa/pom.xml
index d679159..2ceb19d 100644
--- a/wicket/jpa/pom.xml
+++ b/wicket/jpa/pom.xml
@@ -108,7 +108,6 @@
</build>
</profile>
-
<profile>
<id>deploy-to-docker-io</id>
<activation>