You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2022/04/12 17:41:47 UTC
[isis] 09/12: ISIS-2999: deletes subdomains/base
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 0a786621279983a39a3fe60ebc36c71a2cbf8abe
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Apr 12 17:56:09 2022 +0100
ISIS-2999: deletes subdomains/base
---
antora/playbooks/site-subdomains.yml | 3 -
antora/playbooks/site.yml | 3 -
subdomains/base/adoc/antora.yml | 19 --
subdomains/base/adoc/modules/base/nav.adoc | 4 -
subdomains/base/adoc/modules/base/pages/about.adoc | 151 ---------
.../adoc/modules/base/partials/module-nav.adoc | 6 -
subdomains/base/applib/pom.xml | 70 ----
.../isis/subdomains/base/applib/Chained.java | 57 ----
.../apache/isis/subdomains/base/applib/Dflt.java | 41 ---
.../applib/IsisModuleSubdomainsBaseApplib.java | 28 --
.../isis/subdomains/base/applib/PowerType.java | 33 --
.../apache/isis/subdomains/base/applib/Titled.java | 26 --
.../isis/subdomains/base/applib/TitledEnum.java | 31 --
.../base/applib/services/BaseServicesModule.java | 34 --
.../applib/services/calendar/CalendarService.java | 46 ---
.../services/calendar/CalendarServiceDefault.java | 66 ----
.../subdomains/base/applib/types/AddressLine.java | 73 -----
.../subdomains/base/applib/types/Description.java | 81 -----
.../isis/subdomains/base/applib/types/Email.java | 95 ------
.../isis/subdomains/base/applib/types/Fqcn.java | 73 -----
.../base/applib/types/LogicalTypeName.java | 80 -----
.../isis/subdomains/base/applib/types/Money.java | 76 -----
.../isis/subdomains/base/applib/types/Name.java | 73 -----
.../isis/subdomains/base/applib/types/Notes.java | 81 -----
.../base/applib/types/ObjectIdentifier.java | 78 -----
.../subdomains/base/applib/types/Percentage.java | 75 -----
.../subdomains/base/applib/types/PhoneNumber.java | 89 ------
.../subdomains/base/applib/types/PostalCode.java | 73 -----
.../subdomains/base/applib/types/ProperName.java | 73 -----
.../subdomains/base/applib/types/Reference.java | 89 ------
.../isis/subdomains/base/applib/types/Title.java | 73 -----
.../subdomains/base/applib/types/UrlTemplate.java | 73 -----
.../subdomains/base/applib/types/Username.java | 73 -----
.../subdomains/base/applib/utils/ClassUtils.java | 42 ---
.../base/applib/utils/JodaPeriodUtils.java | 89 ------
.../subdomains/base/applib/utils/MathUtils.java | 81 -----
.../subdomains/base/applib/utils/MessageUtils.java | 45 ---
.../subdomains/base/applib/utils/StringUtils.java | 91 ------
.../subdomains/base/applib/utils/TitleBuilder.java | 112 -------
.../base/applib/valuetypes/AbstractInterval.java | 260 ---------------
.../base/applib/valuetypes/LocalDateInterval.java | 145 ---------
.../isis/subdomains/base/applib/valuetypes/VT.java | 155 ---------
.../base/applib/with/WithCodeComparable.java | 26 --
.../base/applib/with/WithCodeGetter.java | 51 ---
.../base/applib/with/WithCodeUnique.java | 26 --
.../applib/with/WithDescriptionComparable.java | 27 --
.../base/applib/with/WithDescriptionGetter.java | 52 ---
.../base/applib/with/WithDescriptionUnique.java | 26 --
.../subdomains/base/applib/with/WithInterval.java | 157 ---------
.../base/applib/with/WithIntervalContiguous.java | 286 -----------------
.../base/applib/with/WithIntervalMutable.java | 90 ------
.../base/applib/with/WithNameComparable.java | 26 --
.../base/applib/with/WithNameGetter.java | 52 ---
.../base/applib/with/WithNameUnique.java | 26 --
.../base/applib/with/WithReferenceComparable.java | 27 --
.../base/applib/with/WithReferenceGetter.java | 52 ---
.../base/applib/with/WithReferenceUnique.java | 26 --
.../subdomains/base/applib/with/WithSequence.java | 29 --
.../subdomains/base/applib/with/WithStartDate.java | 35 --
.../base/applib/with/WithTitleComparable.java | 26 --
.../base/applib/with/WithTitleGetter.java | 52 ---
.../base/applib/with/WithTitleUnique.java | 26 --
.../base/applib/matchers/IsisMatchers.java | 353 ---------------------
.../CalendarServiceTest_beginningOfMonth.java | 78 -----
.../CalendarServiceTest_beginningOfQuarter.java | 92 ------
.../applib/testing/PrivateConstructorTester.java | 37 ---
.../TitledEnumContractTestAbstract_title.java | 51 ---
.../applib/titled/TitledEnumContractTester.java | 50 ---
.../base/applib/utils/ClassUtilsTest.java | 75 -----
.../base/applib/utils/JodaPeriodUtilsTest.java | 69 ----
.../base/applib/utils/MathUtilsTest.java | 79 -----
.../base/applib/utils/MessageUtils_Test.java | 75 -----
.../base/applib/utils/StringUtilsTest.java | 155 ---------
.../base/applib/utils/TitleBuilderTest.java | 49 ---
.../applib/valuetypes/LocalDateIntervalTest.java | 243 --------------
...arableByCodeContractTestAbstract_compareTo.java | 66 ----
.../with/ComparableByCodeContractTester.java | 80 -----
...yDescriptionContractTestAbstract_compareTo.java | 65 ----
.../ComparableByDescriptionContractTester.java | 79 -----
...arableByNameContractTestAbstract_compareTo.java | 65 ----
.../with/ComparableByNameContractTester.java | 81 -----
...eByReferenceContractTestAbstract_compareTo.java | 65 ----
.../with/ComparableByReferenceContractTester.java | 81 -----
...rableByTitleContractTestAbstract_compareTo.java | 65 ----
.../with/ComparableByTitleContractTester.java | 81 -----
...lperClassesContractTest_privateConstructor.java | 39 ---
.../WithFieldUniqueContractTestAllAbstract.java | 103 ------
...valMutableContractTestAbstract_changeDates.java | 84 -----
subdomains/base/pom.xml | 42 ---
subdomains/pom.xml | 6 -
90 files changed, 6492 deletions(-)
diff --git a/antora/playbooks/site-subdomains.yml b/antora/playbooks/site-subdomains.yml
index c6c08e7a3e..7468441c87 100644
--- a/antora/playbooks/site-subdomains.yml
+++ b/antora/playbooks/site-subdomains.yml
@@ -46,9 +46,6 @@ content:
- url: .
start_path: subdomains/adoc # subdomains
branches: HEAD
- - url: .
- start_path: subdomains/base/adoc # subdomains
- branches: HEAD
- url: .
start_path: subdomains/excel/adoc # subdomains
branches: HEAD
diff --git a/antora/playbooks/site.yml b/antora/playbooks/site.yml
index 52207930d1..0a413c31df 100644
--- a/antora/playbooks/site.yml
+++ b/antora/playbooks/site.yml
@@ -223,9 +223,6 @@ content:
- url: .
start_path: subdomains/adoc # subdomains
branches: HEAD
- - url: .
- start_path: subdomains/base/adoc # subdomains
- branches: HEAD
- url: .
start_path: subdomains/excel/adoc # subdomains
branches: HEAD
diff --git a/subdomains/base/adoc/antora.yml b/subdomains/base/adoc/antora.yml
deleted file mode 100644
index 1044dbbd29..0000000000
--- a/subdomains/base/adoc/antora.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-name: subdomains
-version: latest
diff --git a/subdomains/base/adoc/modules/base/nav.adoc b/subdomains/base/adoc/modules/base/nav.adoc
deleted file mode 100644
index dbad73b19b..0000000000
--- a/subdomains/base/adoc/modules/base/nav.adoc
+++ /dev/null
@@ -1,4 +0,0 @@
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-
-include::subdomains:ROOT:partial$component-nav.adoc[]
diff --git a/subdomains/base/adoc/modules/base/pages/about.adoc b/subdomains/base/adoc/modules/base/pages/about.adoc
deleted file mode 100644
index 08c0c6b217..0000000000
--- a/subdomains/base/adoc/modules/base/pages/about.adoc
+++ /dev/null
@@ -1,151 +0,0 @@
-= Base subdomain
-
-:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or ag [...]
-
-This module provides a base library of utility classes.
-
-include::docs:mavendeps:partial$setup-and-configure-dependencyManagement.adoc[leveloffset=+1]
-
-In addition, add a section for the BOM of all subdomains:
-
-[source,xml,subs="attributes+"]
-.pom.xml
-----
-<dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.subdomains</groupId>
- <artifactId>isis-subdomains</artifactId>
- <scope>import</scope>
- <type>pom</type>
- <version>{page-isisrel}</version>
- </dependency>
- </dependencies>
-</dependencyManagement>
-----
-
-[#dependencies]
-== Dependencies
-
-In the domain module(s) of your application, add the following dependency:
-
-[source,xml]
-.pom.xml
-----
-<dependencies>
- <dependency>
- <groupId>org.apache.isis.subdomains</groupId>
- <artifactId>isis-subdomains-base-applib</artifactId>
- </dependency>
-</dependencies>
-----
-
-
-== Usage
-
-Details:
-
-* xref:refguide:subdomains:index/base/applib/services/calendar/CalendarService.adoc[CalendarService]
-+
-to look up beginning of months and quarters based on a date.
-+
-To use, `@Import` the xref:refguide:subdomains:index/base/applib/services/BaseServicesModule.adoc[BaseServicesModule] into your app's _AppManifest_.
-
-* Meta-annotations for types:
-+
-@xref:refguide:subdomains:index/base/applib/types/Description.adoc[Description],
-@xref:refguide:subdomains:index/base/applib/types/Fqcn.adoc[Fqcn],
-@xref:refguide:subdomains:index/base/applib/types/Money.adoc[Money],
-@xref:refguide:subdomains:index/base/applib/types/Name.adoc[Name],
-@xref:refguide:subdomains:index/base/applib/types/Notes.adoc[Notes],
-@xref:refguide:subdomains:index/base/applib/types/ObjectIdentifier.adoc[ObjectIdentifier],
-@xref:refguide:subdomains:index/base/applib/types/Percentage.adoc[Percentage],
-@xref:refguide:subdomains:index/base/applib/types/ProperName.adoc[ProperName],
-@xref:refguide:subdomains:index/base/applib/types/Reference.adoc[Reference],
-@xref:refguide:subdomains:index/base/applib/types/Title.adoc[Title],
-@xref:refguide:subdomains:index/base/applib/types/UrlTemplate.adoc[UrlTemplate]
-
-* Various utility classes:
-+
-xref:refguide:subdomains:index/base/applib/utils/ClassUtils.adoc[],
-xref:refguide:subdomains:index/base/applib/utils/JodaPeriodUtils.adoc[],
-xref:refguide:subdomains:index/base/applib/utils/MathUtils.adoc[],
-xref:refguide:subdomains:index/base/applib/utils/MessageUtils.adoc[],
-xref:refguide:subdomains:index/base/applib/utils/StringUtils.adoc[],
-xref:refguide:subdomains:index/base/applib/utils/TitleBuilder.adoc[]
-
-* value types:
-+
-xref:refguide:subdomains:index/base/applib/valuetypes/LocalDateInterval.adoc[] (a specialization of
-xref:refguide:subdomains:index/base/applib/valuetypes/AbstractInterval.adoc[])
-
-* value type factory (useful for tests):
-+
-xref:refguide:subdomains:index/base/applib/valuetypes/VT.adoc[]
-
-* "with" interfaces (useful to write contract tests against):
-+
-[cols="1a,^2a,^2a,^2a",options="header"]
-|===
-|With
-| Getter
-| Comparable
-| Unique
-
-| Code
-| xref:refguide:subdomains:index/base/applib/with/WithCodeGetter.adoc[WithCodeGetter]
-| xref:refguide:subdomains:index/base/applib/with/WithCodeComparable.adoc[WithCodeComparable]
-| xref:refguide:subdomains:index/base/applib/with/WithCodeUnique.adoc[WithCodeUnique]
-
-| Description
-| xref:refguide:subdomains:index/base/applib/with/WithDescriptionGetter.adoc[WithDescriptionGetter]
-| xref:refguide:subdomains:index/base/applib/with/WithDescriptionComparable.adoc[WithDescriptionComparable]
-| xref:refguide:subdomains:index/base/applib/with/WithDescriptionUnique.adoc[WithDescriptionUnique]
-
-| Name
-| xref:refguide:subdomains:index/base/applib/with/WithNameGetter.adoc[WithNameGetter]
-| xref:refguide:subdomains:index/base/applib/with/WithNameComparable.adoc[WithNameComparable]
-| xref:refguide:subdomains:index/base/applib/with/WithNameUnique.adoc[WithNameUnique]
-
-| Reference
-| xref:refguide:subdomains:index/base/applib/with/WithReferenceGetter.adoc[WithReferenceGetter]
-| xref:refguide:subdomains:index/base/applib/with/WithReferenceComparable.adoc[WithReferenceComparable]
-| xref:refguide:subdomains:index/base/applib/with/WithReferenceUnique.adoc[WithReferenceUnique]
-
-| Title
-| xref:refguide:subdomains:index/base/applib/with/WithTitleGetter.adoc[WithTitleGetter]
-| xref:refguide:subdomains:index/base/applib/with/WithTitleComparable.adoc[WithTitleComparable]
-| xref:refguide:subdomains:index/base/applib/with/WithTitleUnique.adoc[WithTitleUnique]
-
-
-|===
-
-** also:
-xref:refguide:subdomains:index/base/applib/with/WithInterval.adoc[WithInterval],
-xref:refguide:subdomains:index/base/applib/with/WithIntervalContiguous.adoc[WithIntervalContiguous],
-xref:refguide:subdomains:index/base/applib/with/WithIntervalMutable.adoc[WithIntervalMutable]
-
-** also:
-xref:refguide:subdomains:index/base/applib/with/WithSequence.adoc[WithSequence]
-
-** also:
-xref:refguide:subdomains:index/base/applib/with/WithStartDate.adoc[WithStartDate]
-
-** also:
-xref:refguide:subdomains:index/base/applib/Chained.adoc[Chained] - declares the objects are linked together with next and previous
-
-* titles:
-
-** xref:refguide:subdomains:index/base/applib/Titled.adoc[Titled] - require an object explicitly implement the `title()` method
-
-** xref:refguide:subdomains:index/base/applib/TitledEnum.adoc[TitledEnum] - require an enum explicitly implement the `title()` method.
-Used by xref:refguide:subdomains:index/base/applib/utils/StringUtils.adoc[StringUtils]
-
-* misc:
-
-** xref:refguide:subdomains:index/base/applib/Dflt.adoc[Dflt] - useful for obtaining a default from a list of choices
-
-** xref:refguide:subdomains:index/base/applib/PowerType.adoc[PowerType] - for enums that act as factories of a subtype
-
-
-
diff --git a/subdomains/base/adoc/modules/base/partials/module-nav.adoc b/subdomains/base/adoc/modules/base/partials/module-nav.adoc
deleted file mode 100644
index 2a243cad8e..0000000000
--- a/subdomains/base/adoc/modules/base/partials/module-nav.adoc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-* xref:subdomains:base:about.adoc[Base Library]
-
-
diff --git a/subdomains/base/applib/pom.xml b/subdomains/base/applib/pom.xml
deleted file mode 100644
index 6fc3911f15..0000000000
--- a/subdomains/base/applib/pom.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?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 information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.subdomains</groupId>
- <artifactId>isis-subdomains-base</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-subdomains-base-applib</artifactId>
-
- <name>Apache Isis Sub - Base (applib)</name>
-
- <properties>
- <jar-plugin.automaticModuleName>org.apache.isis.subdomains.base.applib</jar-plugin.automaticModuleName>
- <git-plugin.propertiesDir>org/apache/isis/subdomains/base/applib</git-plugin.propertiesDir>
- </properties>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-applib</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.commons</groupId>
- <artifactId>isis-commons</artifactId>
- </dependency>
-
- <!-- test -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-metamodel</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>javax.jdo</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.testing</groupId>
- <artifactId>isis-testing-unittestsupport-applib</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-
-</project>
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Chained.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Chained.java
deleted file mode 100644
index 5893a74e8c..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Chained.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.subdomains.base.applib.with.WithInterval;
-import org.apache.isis.subdomains.base.applib.with.WithIntervalContiguous;
-
-/**
- * @since 2.0 {@index}
- */
-public interface Chained<T extends Chained<T>> {
-
-
- /**
- * The object (usually an {@link WithInterval}, but not necessarily) that precedes this one, if any (not
- * necessarily contiguously)..
- *
- * <p>
- * Implementations where successive intervals are contiguous should instead implement
- * {@link WithIntervalContiguous}.
- */
- @Property(editing = Editing.DISABLED, hidden=Where.ALL_TABLES, optionality = Optionality.OPTIONAL)
- public T getPrevious();
-
- /**
- * The object (usually an {@link WithInterval}, but not necessarily) that succeeds this one, if any (not
- * necessarily contiguously).
- *
- * <p>
- * Implementations where successive intervals are contiguous should instead implement
- * {@link WithIntervalContiguous}.
- */
- @Property(editing = Editing.DISABLED, hidden=Where.ALL_TABLES, optionality = Optionality.OPTIONAL)
- public T getNext();
-
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Dflt.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Dflt.java
deleted file mode 100644
index d4f1ac9f00..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Dflt.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-import java.util.Collection;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-/**
- * @since 2.0 {@index}
- */
-public class Dflt {
-
- private Dflt(){}
-
- @Programmatic
- public static <T> T of(final Collection<T> choices) {
- switch(choices.size()) {
- case 0: return null;
- case 1: return choices.iterator().next();
- default: return null;
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/IsisModuleSubdomainsBaseApplib.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/IsisModuleSubdomainsBaseApplib.java
deleted file mode 100644
index 252db1e55d..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/IsisModuleSubdomainsBaseApplib.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-import org.springframework.context.annotation.Configuration;
-
-/**
- * @since 2.0 {@index}
- */
-@Configuration
-public class IsisModuleSubdomainsBaseApplib {
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/PowerType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/PowerType.java
deleted file mode 100644
index 420cb89e62..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/PowerType.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-import org.apache.isis.applib.services.factory.FactoryService;
-
-/**
- * For <tt>enum</tt>s that act as powertypes, in other words acting as a factory
- * for subtypes of some inheritance hierarchy.
- *
- * @since 2.0 {@index}
- */
-public interface PowerType<T> {
-
- T create(FactoryService factoryService);
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Titled.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Titled.java
deleted file mode 100644
index c49a2f1134..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/Titled.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-/**
- * @since 2.0 {@index}
- */
-public interface Titled {
- String title();
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/TitledEnum.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/TitledEnum.java
deleted file mode 100644
index 6eb5d665b5..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/TitledEnum.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib;
-
-import org.apache.isis.subdomains.base.applib.utils.StringUtils;
-
-/**
- * An enum that implements {@link Titled} and moreover its {@link #title()}
- * is derived according to the {@link StringUtils#enumTitle(String)} algorithm.
- *
- * @since 2.0 {@index}
- */
-public interface TitledEnum extends Titled {
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/BaseServicesModule.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/BaseServicesModule.java
deleted file mode 100644
index 86ff7ea493..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/BaseServicesModule.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.services;
-
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Import;
-
-import org.apache.isis.subdomains.base.applib.services.calendar.CalendarServiceDefault;
-
-/**
- * @since 2.0 {@index}
- */
-@Configuration
-@Import({
- CalendarServiceDefault.class
-})
-public class BaseServicesModule {
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarService.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarService.java
deleted file mode 100644
index fc0fe75232..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarService.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.isis.subdomains.base.applib.services.calendar;
-
-import java.time.LocalDate;
-
-/**
- * @since 2.0 {@index}
- */
-public interface CalendarService {
-
- /**
- * Returns the date corresponding to the beginning of the current month.
- */
- LocalDate beginningOfMonth();
-
- static LocalDate beginningOfMonth(final LocalDate date) {
- final long dayOfMonth = date.getDayOfMonth();
- return date.minusDays(dayOfMonth-1L);
- }
-
- /**
- * Returns the date corresponding to the beginning of the current quarter (typically: January, April, July or October).
- *
- * @see #beginningOfQuarter(LocalDate)
- * @see #beginningOfNextQuarter()
- */
- LocalDate beginningOfQuarter();
-
- /**
- * Returns the date corresponding to the beginning of the quarter following this one.
- *
- * @see #beginningOfQuarter()
- */
- LocalDate beginningOfNextQuarter();
-
- static LocalDate beginningOfQuarter(final LocalDate date) {
- final int MONTHS_IN_QUARTER = 3;
- final LocalDate beginningOfMonth = beginningOfMonth(date);
- final int monthOfYear = beginningOfMonth.getMonthValue();
- final int quarter = (monthOfYear-1)/MONTHS_IN_QUARTER; // 0, 1, 2, 3
- final int monthStartOfQuarter = quarter*MONTHS_IN_QUARTER+1;
- final long deltaMonth = (long)monthOfYear - monthStartOfQuarter;
- return beginningOfMonth.minusMonths(deltaMonth);
- }
-
-
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceDefault.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceDefault.java
deleted file mode 100644
index 28b93804ce..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceDefault.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.services.calendar;
-
-import java.time.LocalDate;
-import java.time.ZoneId;
-
-import javax.annotation.Priority;
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.springframework.beans.factory.annotation.Qualifier;
-import org.springframework.stereotype.Service;
-
-import org.apache.isis.applib.annotation.PriorityPrecedence;
-import org.apache.isis.applib.services.clock.ClockService;
-
-import lombok.RequiredArgsConstructor;
-
-@Service
-@Named("isis.sub.base.CalendarServiceDefault")
-@Priority(PriorityPrecedence.MIDPOINT)
-@Qualifier("Default")
-@RequiredArgsConstructor(onConstructor_ = {@Inject})
-public class CalendarServiceDefault implements CalendarService {
-
- private final ClockService clockService;
-
- @Override
- public LocalDate beginningOfMonth() {
- return CalendarService.beginningOfMonth(nowAsLocalDate());
- }
-
- @Override
- public LocalDate beginningOfQuarter() {
- return CalendarService.beginningOfQuarter(nowAsLocalDate());
- }
-
- @Override
- public LocalDate beginningOfNextQuarter() {
- return CalendarService.beginningOfQuarter(nowAsLocalDate().plusMonths(3));
- }
-
- // -- HELPER
-
- private LocalDate nowAsLocalDate() {
- return clockService.getClock().nowAsLocalDate(ZoneId.systemDefault());
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/AddressLine.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/AddressLine.java
deleted file mode 100644
index f483e995f9..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/AddressLine.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a line of an address.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = AddressLine.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = AddressLine.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = AddressLine.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface AddressLine {
-
- int MAX_LENGTH = 100;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java
deleted file mode 100644
index f40b7581a3..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link String} property or parameter representing a
- * description of some sort.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Description.MAX_LENGTH,
- optionality = Optionality.OPTIONAL
-)
-@PropertyLayout(
- multiLine = Description.MULTI_LINE
-)
-@Parameter(
- maxLength = Description.MAX_LENGTH,
- optionality = Optionality.OPTIONAL
-)
-@ParameterLayout(
- multiLine = Description.MULTI_LINE
-)
-//@javax.jdo.annotations.Column(length = Description.MAX_LENGTH, allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Description {
-
- int MAX_LENGTH = 254;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
- int MULTI_LINE = 1;
- @AliasFor( annotation = PropertyLayout.class, attribute = "multiLine")
- int propertyLayoutMultiLine() default MULTI_LINE;
- @AliasFor( annotation = ParameterLayout.class, attribute = "multiLine")
- int parameterLayoutMultiLine() default MULTI_LINE;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Email.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Email.java
deleted file mode 100644
index 440e6908f8..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Email.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link String} property or parameter representing an
- * email address.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Email.MAX_LENGTH,
- optionality = Optionality.OPTIONAL,
- regexPattern = Email.REGEX_PATTERN,
- regexPatternReplacement = Email.REGEX_PATTERN_REPLACEMENT
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Email.MAX_LENGTH,
- optionality = Optionality.OPTIONAL,
- regexPattern = Email.REGEX_PATTERN,
- regexPatternReplacement = Email.REGEX_PATTERN_REPLACEMENT
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Email.MAX_LENGTH, allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Email {
-
- /**
- * See <a href="http://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address">maximum length of an email address</a>.
- */
- int MAX_LENGTH = 254;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
- /**
- * as per http://emailregex.com/
- */
- String REGEX_PATTERN = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f]) [...]
- @AliasFor( annotation = Property.class, attribute = "regexPattern")
- String propertyRegexPattern() default REGEX_PATTERN;
- @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
- String parameterRegexPattern() default REGEX_PATTERN;
-
- String REGEX_PATTERN_REPLACEMENT = "Email address is badly formed";
- @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
- String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
- @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
- String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java
deleted file mode 100644
index ffe9074b12..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a {@link String} property or parameter representing a
- * fully qualified class name
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Fqcn.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Fqcn.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Fqcn.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Fqcn {
-
- int MAX_LENGTH = 254;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/LogicalTypeName.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/LogicalTypeName.java
deleted file mode 100644
index db65c0e7f9..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/LogicalTypeName.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * logical type name of a domain object (as per @{@link DomainObject#logicalTypeName() DomainObject#logicalTypeName}
- * or @{@link DomainService#logicalTypeName() DomainObject#logicalTypeName}).
- *
- * @see DomainObject
- * @see DomainService
- * @see ObjectIdentifier
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = LogicalTypeName.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = LogicalTypeName.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = LogicalTypeName.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface LogicalTypeName {
-
- int MAX_LENGTH = 254;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java
deleted file mode 100644
index 6fc3504a39..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link java.math.BigDecimal} property or parameter
- * representing a monetary amount.
- *
- * @since 2.0 {@index}
- */
-@Property(
- optionality = Optionality.OPTIONAL
-)
-@PropertyLayout(
-)
-@Parameter(
- optionality = Optionality.OPTIONAL
-)
-@ParameterLayout(
-)
-@javax.validation.constraints.Digits(
- integer = Money.INTEGER,
- fraction = Money.FRACTION
-)
-//@javax.jdo.annotations.Column(allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Money {
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-
- int INTEGER = 10;
- @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "integer")
- int digitsInteger() default Money.INTEGER;
-
- int FRACTION = 2;
- @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "fraction")
- int digitsFraction() default Money.FRACTION;
-
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java
deleted file mode 100644
index 2bfbc6d9e2..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * name of some sort.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Name.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Name.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Name.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Name {
-
- int MAX_LENGTH = 50;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java
deleted file mode 100644
index 3d384bba43..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link String} property or parameter representing a
- * notes or comments about some object.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Notes.MAX_LENGTH,
- optionality = Optionality.OPTIONAL
-)
-@PropertyLayout(
- multiLine = Notes.MULTI_LINE
-)
-@Parameter(
- maxLength = Notes.MAX_LENGTH,
- optionality = Optionality.OPTIONAL
-)
-@ParameterLayout(
- multiLine = Notes.MULTI_LINE
-)
-//@javax.jdo.annotations.Column(length = Notes.MAX_LENGTH, allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Notes {
-
- int MAX_LENGTH = 4000;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
- int MULTI_LINE = 10;
- @AliasFor( annotation = PropertyLayout.class, attribute = "multiLine")
- int propertyLayoutMultiLine() default MULTI_LINE;
- @AliasFor( annotation = ParameterLayout.class, attribute = "multiLine")
- int parameterLayoutMultiLine() default MULTI_LINE;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java
deleted file mode 100644
index ea1489188e..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * the identity of a domain object (with respect to its logical type, as per @{@link DomainObject#logicalTypeName() DomainObject#logicalTypeName}
- * or @{@link DomainService#logicalTypeName() DomainObject#logicalTypeName}).
- *
- * @see LogicalTypeName
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = ObjectIdentifier.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = ObjectIdentifier.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = ObjectIdentifier.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ObjectIdentifier {
-
- int MAX_LENGTH = 50;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java
deleted file mode 100644
index 0342937859..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link java.math.BigDecimal} property or parameter
- * representing a percentage amount.
- *
- * @since 2.0 {@index}
- */
-@Property(
- optionality = Optionality.OPTIONAL
-)
-@PropertyLayout(
-)
-@Parameter(
- optionality = Optionality.OPTIONAL
-)
-@ParameterLayout(
-)
-@javax.validation.constraints.Digits(
- integer = Percentage.INTEGER,
- fraction = Percentage.FRACTION
-)
-//@javax.jdo.annotations.Column(allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Percentage {
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-
- int INTEGER = 3;
- @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "integer")
- int digitsInteger() default Money.INTEGER;
-
- int FRACTION = 2;
- @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "fraction")
- int digitsFraction() default Money.FRACTION;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PhoneNumber.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PhoneNumber.java
deleted file mode 100644
index 7010204c4a..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PhoneNumber.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for an optional {@link String} property or parameter representing a
- * phone number.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = PhoneNumber.MAX_LENGTH,
- optionality = Optionality.OPTIONAL,
- regexPattern = PhoneNumber.REGEX_PATTERN,
- regexPatternReplacement = PhoneNumber.REGEX_PATTERN_REPLACEMENT
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = PhoneNumber.MAX_LENGTH,
- optionality = Optionality.OPTIONAL,
- regexPattern = PhoneNumber.REGEX_PATTERN,
- regexPatternReplacement = PhoneNumber.REGEX_PATTERN_REPLACEMENT
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = PhoneNumber.MAX_LENGTH, allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PhoneNumber {
-
- int MAX_LENGTH = 20;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
- String REGEX_PATTERN = "[+]?[0-9 -]*";
- @AliasFor( annotation = Property.class, attribute = "regexPattern")
- String propertyRegexPattern() default REGEX_PATTERN;
- @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
- String parameterRegexPattern() default REGEX_PATTERN;
-
- String REGEX_PATTERN_REPLACEMENT = "Only numbers and two symbols being \"-\" and \"+\" are allowed ";
- @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
- String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
- @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
- String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "true";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PostalCode.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PostalCode.java
deleted file mode 100644
index c8eef46115..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PostalCode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * postal code or zip code.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = PostalCode.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = PostalCode.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = PostalCode.MAX_LENGTH, allowsNull = "true")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface PostalCode {
-
- int MAX_LENGTH = 12;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java
deleted file mode 100644
index e0cf60eaaa..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing the
- * "proper" (or formal) name of some sort.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = ProperName.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = ProperName.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = ProperName.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface ProperName {
-
- int MAX_LENGTH = 50;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Reference.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Reference.java
deleted file mode 100644
index 0ea7001b13..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Reference.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing A
- * unique reference code of some sort, restricted to capitals, numbers and '_', '/' and '-'.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Reference.MAX_LENGTH,
- optionality = Optionality.MANDATORY,
- regexPattern = Reference.REGEX_PATTERN,
- regexPatternReplacement = Reference.REGEX_PATTERN_REPLACEMENT
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Reference.MAX_LENGTH,
- optionality = Optionality.MANDATORY,
- regexPattern = Reference.REGEX_PATTERN,
- regexPatternReplacement = Reference.REGEX_PATTERN_REPLACEMENT
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Reference.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Reference {
-
- int MAX_LENGTH = 24;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.OPTIONAL;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.OPTIONAL;
-
- String REGEX_PATTERN = "[ -/_A-Z0-9]+";
- @AliasFor( annotation = Property.class, attribute = "regexPattern")
- String propertyRegexPattern() default REGEX_PATTERN;
- @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
- String parameterRegexPattern() default REGEX_PATTERN;
-
- String REGEX_PATTERN_REPLACEMENT = "Only capital letters, numbers and 3 symbols being: \"_\" , \"-\" and \"/\" are allowed";
- @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
- String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
- @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
- String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java
deleted file mode 100644
index 1c45950a79..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * title (or perhaps label) of some sort.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Title.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Title.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Title.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Title {
-
- int MAX_LENGTH = 50;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java
deleted file mode 100644
index 15efefd522..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing a
- * URL template, for example for an entity that holds configuration data to access external systems.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = UrlTemplate.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = UrlTemplate.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = UrlTemplate.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface UrlTemplate {
-
- int MAX_LENGTH = 254;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java
deleted file mode 100644
index 445762fa99..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.types;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-import org.springframework.core.annotation.AliasFor;
-
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.ParameterLayout;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.PropertyLayout;
-
-/**
- * Meta-annotation for a mandatory {@link String} property or parameter representing the
- * unique username (or login name) of a user of the system.
- *
- * @since 2.0 {@index}
- */
-@Property(
- maxLength = Username.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@PropertyLayout(
-)
-@Parameter(
- maxLength = Username.MAX_LENGTH,
- optionality = Optionality.MANDATORY
-)
-@ParameterLayout(
-)
-//@javax.jdo.annotations.Column(length = Username.MAX_LENGTH, allowsNull = "false")
-@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-public @interface Username {
-
- int MAX_LENGTH = 120;
- @AliasFor( annotation = Property.class, attribute = "maxLength")
- int propertyMaxLength() default MAX_LENGTH;
- @AliasFor( annotation = Parameter.class, attribute = "maxLength")
- int parameterMaxLength() default MAX_LENGTH;
-
- @AliasFor( annotation = Property.class, attribute = "optionality")
- Optionality propertyOptionality() default Optionality.MANDATORY;
- @AliasFor( annotation = Parameter.class, attribute = "optionality")
- Optionality parameterOptionality() default Optionality.MANDATORY;
-
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
-// String columnAllowsNull() default "false";
-// @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
-// int columnLength() default MAX_LENGTH;
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/ClassUtils.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/ClassUtils.java
deleted file mode 100644
index 102926d107..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/ClassUtils.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-/**
- * @since 2.0 {@index}
- */
-public final class ClassUtils {
-
- private ClassUtils(){}
-
- @SuppressWarnings("unchecked")
- public static <T> Class<? extends T> load(final String clsName, final Class<T> cls) {
- Class<?> clsx;
- try {
- clsx = Thread.currentThread().getContextClassLoader().loadClass(clsName);
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException("Class '" + clsName + "' not found");
- }
- if (!cls.isAssignableFrom(clsx)) {
- throw new IllegalArgumentException("Class '" + clsName + "' not a subclass of " + cls.getName());
- }
- return (Class<? extends T>) clsx;
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtils.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtils.java
deleted file mode 100644
index e3d426a7cd..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtils.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import org.joda.time.Period;
-import org.joda.time.format.PeriodFormatter;
-import org.joda.time.format.PeriodFormatterBuilder;
-
-/**
- * Utilities for manipulating parsing JODA {@link Period}s.
- *
- * @since 2.0 {@index}
- */
-public final class JodaPeriodUtils {
-
- private JodaPeriodUtils() {
- }
-
- public static Period asPeriod(final String inputStr) {
- if (inputStr == null) {
- return null;
- }
- final String inputStrNormalized = inputStr.replaceAll(" ", "").toLowerCase();
- PeriodFormatter formatter = simpleFormatter();
- try {
- return formatter.parsePeriod(inputStrNormalized);
- } catch (Exception e) {
- return null;
- }
- }
-
- public static String asString(final Period period) {
-
- PeriodFormatter formatter = complexFormatter();
- return formatter.print(period).trim();
-
- }
-
- public static String asSimpleString(final Period period) {
-
- PeriodFormatter formatter = simpleFormatter();
- return formatter.print(period).trim();
-
- }
-
- private static PeriodFormatter simpleFormatter() {
- PeriodFormatter formatter = new PeriodFormatterBuilder().
- appendYears().appendSuffix("y").
- appendMonths().appendSuffix("m").
- appendDays().appendSuffix("d").
- appendHours().appendSuffix("h").
- appendMinutes().appendSuffix("min").
- toFormatter();
- return formatter;
- }
-
- private static PeriodFormatter complexFormatter() {
- PeriodFormatter formatter = new PeriodFormatterBuilder().
- appendYears().appendSuffix(" year", " years").
- appendSeparator(", ", " & ").
- appendMonths().appendSuffix(" month", " months").
- appendSeparator(", ", " & ").
- appendDays().appendSuffix(" day", " days").
- appendSeparator(", ", " & ").
- appendHours().appendSuffix(" hours", "hours").
- appendSeparator(", ", " & ").
- appendMinutes().appendSuffix(" minute", " minutes").
- appendSeparator(", ", " & ").
- appendSeconds().appendSuffix(" second", " seconds").
- toFormatter();
- return formatter;
- }
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MathUtils.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MathUtils.java
deleted file mode 100644
index d307a325d7..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MathUtils.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.math.BigDecimal;
-import java.math.MathContext;
-
-/**
- * General-purpose math utilities.
- *
- * @since 2.0 {@index}
- */
-public final class MathUtils {
-
- private MathUtils() {}
-
- public static BigDecimal round(final BigDecimal input, final int precision) {
- final MathContext mc = new MathContext(precision+1);
- return input.round(mc);
- }
-
- public static boolean isZeroOrNull(final BigDecimal input) {
- return input == null ? true : input.compareTo(BigDecimal.ZERO) == 0;
- }
-
- public static boolean isNotZeroOrNull(final BigDecimal input) {
- return !isZeroOrNull(input);
- }
-
- public static BigDecimal firstNonZero(final BigDecimal... values) {
- for (BigDecimal value : values) {
- if (value != null && value.compareTo(BigDecimal.ZERO) != 0) {
- return value;
- }
- }
- return BigDecimal.ZERO;
- }
-
- public static BigDecimal max(BigDecimal... input){
- BigDecimal max = BigDecimal.ZERO;
- for (BigDecimal value : input){
- if (value != null){
- max = max.max(value);
- }
- }
- return max;
- }
-
- public static BigDecimal maxUsingFirstSignum(final BigDecimal... values) {
- BigDecimal max = BigDecimal.ZERO;
- boolean signumDetected = false;
- BigDecimal signum = BigDecimal.ONE;
- for (BigDecimal value : values){
- if (value != null && value.compareTo(BigDecimal.ZERO) != 0){
- if (!signumDetected) {
- signum = BigDecimal.valueOf(value.signum() == -1 ? -1 : 1);
- signumDetected = true;
- }
- max = max.max(value.multiply(signum));
- }
- }
- return max.multiply(signum);
-
- }
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils.java
deleted file mode 100644
index 285d68b23b..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.isis.commons.internal.base._Strings;
-
-/**
- * @since 2.0 {@index}
- */
-public final class MessageUtils {
-
- private MessageUtils(){}
- private static final Pattern pattern = Pattern.compile(".*Reason: (.+?)[ ]*Identifier:.*");
-
- public static String normalize(final Exception ex) {
- if(ex == null || _Strings.isNullOrEmpty(ex.getMessage())) {
- return null;
- }
- String message = ex.getMessage();
- final Matcher matcher = pattern.matcher(message);
- if(matcher.matches()) {
- return matcher.group(1);
- }
- return message;
- }
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/StringUtils.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/StringUtils.java
deleted file mode 100644
index 5c9a402420..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/StringUtils.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.util.function.UnaryOperator;
-import java.util.stream.Collectors;
-
-import org.apache.isis.commons.internal.base._Strings;
-
-/**
- * @since 2.0 {@index}
- */
-public final class StringUtils {
-
- private StringUtils() {
- }
-
- private static UnaryOperator<String> LOWER_CASE_THEN_CAPITALIZE = (final String input) -> {
- return input != null
- ? StringUtils.capitalize(input.toLowerCase())
- : null;
- };
-
- private static UnaryOperator<String> UPPER_CASE = (final String input) -> {
- return input != null
- ? StringUtils.capitalize(input.toUpperCase())
- : null;
- };
-
-
- public static String enumTitle(final String string) {
- if(string == null) {
- return null;
- }
-
- return _Strings.splitThenStream(string, "_")
- .map(LOWER_CASE_THEN_CAPITALIZE)
- .collect(Collectors.joining(" "));
- }
-
- public static String enumDeTitle(final String string) {
- if(string == null) {
- return null;
- }
- return _Strings.splitThenStream(string, " ")
- .map(UPPER_CASE)
- .collect(Collectors.joining("_"));
- }
-
- public static String wildcardToCaseInsensitiveRegex(final String pattern) {
- if(pattern == null) {
- return null;
- }
- return "(?i)".concat(wildcardToRegex(pattern));
- }
-
- public static String wildcardToRegex(final String pattern) {
- if(pattern == null) {
- return null;
- }
- return pattern.replace("*", ".*").replace("?", ".");
- }
-
- public static String capitalize(final String str) {
- if (str == null || str.length() == 0) {
- return str;
- }
- if (str.length() == 1) {
- return str.toUpperCase();
- }
- return Character.toUpperCase(str.charAt(0)) + str.substring(1);
- }
-
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilder.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilder.java
deleted file mode 100644
index 9a88fa6113..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilder.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-
-import org.apache.isis.applib.util.TitleBufferException;
-
-/**
- * @since 2.0 {@index}
- */
-public class TitleBuilder {
-
- private static final String SPACE = " ";
- private static final String DELIMITER = "[]";
- private static final String PARENT_SEPARATOR = " > ";
-
- public static final Class[] NO_PARAMETER_TYPES = new Class[0];
- public static final Object[] NO_ARGUMENTS = new Object[0];
-
- private final StringBuilder parentString;
- private final StringBuilder nameString;
- private final StringBuilder referenceString;
-
- private static String titleFor(final Object object) {
- if (object == null) {
- return null;
- } else if (object instanceof String) {
- return object.toString();
- } else {
- try {
- Method e = object.getClass().getMethod("title", NO_PARAMETER_TYPES);
- return (String) e.invoke(object, NO_ARGUMENTS);
- } catch (IllegalArgumentException | IllegalAccessException | InvocationTargetException | SecurityException var2) {
- throw new TitleBufferException(var2);
- } catch (NoSuchMethodException var3) {
- return object.toString();
- }
- }
- }
-
- private TitleBuilder() {
- this.referenceString = new StringBuilder();
- this.nameString = new StringBuilder();
- this.parentString = new StringBuilder();
- }
-
- public static TitleBuilder start() {
- return new TitleBuilder();
- }
-
- public TitleBuilder withParent(final Object object){
- parentString.append(titleFor(object));
- parentString.append(PARENT_SEPARATOR);
- return this;
- }
-
- public TitleBuilder withName(final String name){
- if (name != null && name.length() > 0 ) {
- if (nameString.length() > 0){
- nameString.append(SPACE);
- }
- nameString.append(name);
- }
- return this;
- }
-
- public TitleBuilder withReference(final String reference){
- referenceString.append(reference);
- return this;
- }
-
- @Override
- public String toString() {
- return new StringBuilder()
- .append(parentString)
- .append(nameString)
- .append(referenceString.length() > 0 && nameString.length() > 0 ? SPACE : "")
- .append(!referenceString.toString().equals(nameString.toString()) ? delimited(referenceString) : "")
- .toString().trim();
- }
-
- private StringBuilder delimited(final StringBuilder stringBuilder){
- return stringBuilder.length()>0 ? stringBuilder.insert(0,DELIMITER.charAt(0)).append(DELIMITER.charAt(1)) : stringBuilder;
- }
-
- public TitleBuilder withName(final Object object) {
- final String title = titleFor(object);
- if(title != null) {
- nameString.append(title);
- }
- return this;
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/AbstractInterval.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/AbstractInterval.java
deleted file mode 100644
index 231a437208..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/AbstractInterval.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.valuetypes;
-
-import org.joda.time.Interval;
-import org.joda.time.LocalDate;
-import org.joda.time.Period;
-import org.joda.time.PeriodType;
-
-/**
- * @since 2.0 {@index}
- */
-public abstract class AbstractInterval<T extends AbstractInterval<T>> {
-
- public enum IntervalEnding {
- EXCLUDING_END_DATE, INCLUDING_END_DATE
- }
-
- private static class IntervalUtil {
- private static final long MIN_VALUE = 0;
- private static final long MAX_VALUE = Long.MAX_VALUE;
-
- public static Interval toInterval(final AbstractInterval<?> localDateInterval) {
- Long startInstant = toStartInstant(localDateInterval.startDate());
- Long endInstant = toEndInstant(localDateInterval.endDateExcluding());
- return new Interval(startInstant, endInstant);
- }
-
- public static LocalDate toLocalDate(final long instant) {
- if (instant == MAX_VALUE || instant == MIN_VALUE) {
- return null;
- }
- return new LocalDate(instant);
- }
-
- private static long toStartInstant(final LocalDate date) {
- if (date == null) {
- return MIN_VALUE;
- }
- return date.toInterval().getStartMillis();
- }
-
- private static long toEndInstant(final LocalDate date) {
- if (date == null) {
- return MAX_VALUE;
- }
- return date.toInterval().getStartMillis();
- }
-
- }
-
- /**
- * Determines how end dates are shown in the ui and stored in the database:
- *
- * {@link IntervalEnding#EXCLUDING_END_DATE} uses the start date of the next interval as end date.
- * {@link IntervalEnding#INCLUDING_END_DATE} used the last day of the interval as the end date.
- */
- private static final IntervalEnding PERSISTENT_ENDING = IntervalEnding.INCLUDING_END_DATE;
-
- protected LocalDate endDate;
- protected LocalDate startDate;
-
- public AbstractInterval() {
- }
-
- public AbstractInterval(final Interval interval) {
- if (interval == null) {
- throw new IllegalArgumentException("interval cannot be null");
- }
- startDate = IntervalUtil.toLocalDate(interval.getStartMillis());
- endDate = IntervalUtil.toLocalDate(interval.getEndMillis());
- }
-
- public AbstractInterval(final LocalDate startDate, final LocalDate endDate) {
- this(startDate, endDate, PERSISTENT_ENDING);
- }
-
- public AbstractInterval(final LocalDate startDate, final LocalDate endDate, final IntervalEnding ending) {
- this.startDate = startDate;
- this.endDate = adjustDateIn(endDate, ending);
- }
-
- public Interval asInterval() {
- return IntervalUtil.toInterval(this);
- }
-
- /**
- * Does this date contain the specified time interval.
- *
- * @param date
- */
- public boolean contains(final LocalDate date) {
- if (date == null){
- return false;
- }
- if (endDate() == null) {
- if (startDate() == null) {
- return true;
- }
- if (date.isEqual(startDate()) || date.isAfter(startDate())) {
- return true;
- }
- return false;
- }
- return asInterval().contains(date.toInterval());
- }
-
- /**
- * Does this time interval contain the specified time interval.
- *
- * @param localDateInterval
- */
- public boolean contains(final T localDateInterval) {
- return asInterval().contains(localDateInterval.asInterval());
- }
-
- /**
- * The duration in days
- */
- public int days() {
- if (isInfinite()) {
- return 0;
- }
- Period p = new Period(asInterval(), PeriodType.days());
- return p.getDays();
- }
-
- public LocalDate endDate() {
- return endDate(PERSISTENT_ENDING);
- }
-
- public LocalDate endDate(final IntervalEnding ending) {
- if (endDate == null) {
- return null;
- }
- return adjustDateOut(endDate, ending);
- }
-
- public LocalDate endDateExcluding() {
- return endDate(IntervalEnding.EXCLUDING_END_DATE);
- }
-
- public LocalDate endDateFromStartDate() {
- return adjustDateOut(startDate(), PERSISTENT_ENDING);
- }
-
- public boolean isValid() {
- return startDate == null || endDate == null || endDate.isAfter(startDate) || endDate.equals(startDate);
- }
-
-
- /**
- * For benefit of subclass toString implementations.
- */
- protected String dateToString(LocalDate localDate) {
- return dateToString(localDate, "yyyy-MM-dd");
- }
-
- /**
- * For benefit of subclass toString implementations.
- */
- protected String dateToString(LocalDate localDate, String format) {
- return localDate == null ? "----------" : localDate.toString(format);
- }
-
- /**
- * Gets the overlap between this interval and another interval.
- *
- * @param otherInterval
- */
- @SuppressWarnings("unchecked")
- public T overlap(final T otherInterval) {
- if (otherInterval == null) {
- return null;
- }
- if (otherInterval.isInfinite()) {
- return (T)this;
- }
- if (this.isInfinite()) {
- return otherInterval;
- }
- final Interval thisAsInterval = asInterval();
- final Interval otherAsInterval = otherInterval.asInterval();
- Interval overlap = thisAsInterval.overlap(otherAsInterval);
- if (overlap == null) {
- return null;
- }
- return newInterval(overlap);
- }
-
- /**
- * Mandatory hook
- * @param overlap
- */
- protected abstract T newInterval(Interval overlap);
-
- /**
- * Does this time interval contain the specified time interval.
- *
- * @param interval
- */
- public boolean overlaps(final T interval) {
- return asInterval().overlaps(interval.asInterval());
- }
-
- public LocalDate startDate() {
- return startDate;
- }
-
- @Override
- public abstract String toString();
-
- /**
- * Does this interval is within the specified interval
- *
- * @param interval
- */
- public boolean within(final T interval) {
- return interval.asInterval().contains(asInterval());
- }
-
- private LocalDate adjustDateIn(final LocalDate date, final IntervalEnding ending) {
- if (date == null) {
- return null;
- }
- return ending == IntervalEnding.INCLUDING_END_DATE ? date.plusDays(1) : date;
- }
-
- private LocalDate adjustDateOut(final LocalDate date, final IntervalEnding ending) {
- if (date == null) {
- return null;
- }
- return ending == IntervalEnding.INCLUDING_END_DATE ? date.minusDays(1) : date;
- }
-
- public boolean isInfinite() {
- return startDate == null && endDate == null;
- }
-
- public boolean isOpenEnded() {
- return endDate == null;
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateInterval.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateInterval.java
deleted file mode 100644
index 3a25aff4b2..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateInterval.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.valuetypes;
-
-import java.util.Objects;
-
-import org.joda.time.Interval;
-import org.joda.time.LocalDate;
-
-/**
- * @since 2.0 {@index}
- */
-public class LocalDateInterval extends AbstractInterval<LocalDateInterval>{
-
- public static LocalDateInterval excluding(final LocalDate startDate, final LocalDate endDate) {
- return new LocalDateInterval(startDate, endDate, IntervalEnding.EXCLUDING_END_DATE);
- }
-
- public static LocalDateInterval including(final LocalDate startDate, final LocalDate endDate) {
- return new LocalDateInterval(startDate, endDate, IntervalEnding.INCLUDING_END_DATE);
- }
-
-
- public LocalDateInterval() {
- }
-
- public LocalDateInterval(final Interval interval) {
- super(interval);
- }
-
- public LocalDateInterval(final LocalDate startDate, final LocalDate endDate) {
- super(startDate, endDate);
- }
-
- public LocalDateInterval(final LocalDate startDate, final LocalDate endDate, final IntervalEnding ending) {
- super(startDate, endDate, ending);
- }
-
- // //////////////////////////////////////
-
- @Override
- protected LocalDateInterval newInterval(Interval overlap) {
- return new LocalDateInterval(overlap);
- }
-
- // //////////////////////////////////////
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == null) {
- return false;
- }
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof LocalDateInterval)) {
- return false;
- }
- LocalDateInterval rhs = (LocalDateInterval) obj;
- return Objects.equals(startDate, rhs.startDate)
- && Objects.equals(endDate, rhs.endDate);
- }
-
- @Override
- public int hashCode() {
- return Objects.hash(startDate, endDate);
- }
-
- @Override
- public String toString() {
- StringBuilder builder =
- new StringBuilder(
- dateToString(startDate()))
- .append("/")
- .append(dateToString(endDateExcluding()));
- return builder.toString();
- }
-
- public String toString(String format) {
- StringBuilder builder =
- new StringBuilder(
- dateToString(startDate(), format))
- .append("/")
- .append(dateToString(endDate(), format));
- return builder.toString();
- }
-
- // //////////////////////////////////////
-
- /**
- * Parse a string representation of a LocalDateInterval
- *
- * Since this method is only used for testing it's not heavily guarded against illegal arguments
- *
- * @param input a string with format {@literal yyyy-mm-dd/yyyy-mm-dd}, end date is excluding
- */
- public static LocalDateInterval parseString(final String input) {
- String[] values = input.split("/");
- try {
- return new LocalDateInterval(parseLocalDate(values[0]), parseLocalDate(values[1]), IntervalEnding.EXCLUDING_END_DATE);
- } catch (Exception e) {
- throw new IllegalArgumentException("Unable to parse " + input);
- }
- }
-
- /**
- * Parse a string to a LocalDate
- *
- * @param input a string representing a parsable LocalDate, "*" or "----------" returns null
- */
- private static LocalDate parseLocalDate(final String input) {
- if (input.contains("--") || input.contains("*")) {
- return null;
- }
- return LocalDate.parse(input);
- }
-
-
- /**
- * Returns an end date given the start date of the next adjoining interval
- *
- * @param date
- */
- public static LocalDate endDateFromStartDate(LocalDate date) {
- return new LocalDateInterval(date, null).endDateFromStartDate();
-
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/VT.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/VT.java
deleted file mode 100644
index 4d98741148..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/valuetypes/VT.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.valuetypes;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.math.RoundingMode;
-
-import org.joda.time.LocalDate;
-
-/**
- * Factory methods for value types
- *
- * @since 2.0 {@index}
- */
-public final class VT {
-
- private VT(){}
-
-
-
- public static LocalDateInterval ldi(String intervalStr) {
- return intervalStr != null? LocalDateInterval.parseString(intervalStr) : null;
- }
-
- public static LocalDateInterval ldi(LocalDate st, LocalDate endDate, AbstractInterval.IntervalEnding intervalEnding) {
- return new LocalDateInterval(st, endDate, intervalEnding);
- }
-
- public static LocalDateInterval ldix(LocalDate st, LocalDate endDate) {
- return ldi(st, endDate, AbstractInterval.IntervalEnding.EXCLUDING_END_DATE);
- }
-
-
-
- /**
- *
- * @param dateStr - in form "yyyy-MM-dd"
- */
- public static LocalDate ld(String dateStr) {
- return dateStr != null? LocalDate.parse(dateStr) : null;
- }
-
- public static LocalDate ld(int yyyy, int mm, int dd) {
- return new LocalDate(yyyy,mm,dd);
- }
-
-
-
-
- public static BigInteger bi(int val) {
- return BigInteger.valueOf(val);
- }
- public static BigInteger bi(Integer val) {
- return val != null ? bi(val): null;
- }
-
-
-
-
- public static BigDecimal bd(String str) {
- return new BigDecimal(str);
- }
-
- public static BigDecimal bd(double val) {
- return BigDecimal.valueOf(val);
- }
- public static BigDecimal bd(double v, int scale) {
- return bd(v).setScale(scale);
- }
- public static BigDecimal bd(double v, int scale, RoundingMode roundingMode) {
- return bd(v).setScale(scale, roundingMode);
- }
- public static BigDecimal bd2(double v) {
- return bd(v, 2);
- }
- public static BigDecimal bd2hup(double v) {
- return bd(v,2, RoundingMode.HALF_UP);
- }
- public static BigDecimal bd4(double v) {
- return bd(v,4);
- }
-
-
- public static BigDecimal bd(Double val) {
- return val != null? bd(val.doubleValue()): null;
- }
- public static BigDecimal bd(Double val, int scale) {
- return val != null? bd(val.doubleValue(), scale): null;
- }
- public static BigDecimal bd(Double val, int scale, RoundingMode roundingMode) {
- return val != null? bd(val.doubleValue(), scale, roundingMode): null;
- }
- public static BigDecimal bd2(Double val) {
- return val != null? bd2(val.doubleValue()): null;
- }
- public static BigDecimal bd2hup(Double val) {
- return val != null? bd2hup(val.doubleValue()): null;
- }
- public static BigDecimal bd4(Double val) {
- return val != null? bd4(val.doubleValue()): null;
- }
-
-
- public static BigDecimal bd(int val) {
- return BigDecimal.valueOf(val);
- }
- public static BigDecimal bd(int val, int newScale) {
- return bd(val).setScale(newScale);
- }
- public static BigDecimal bd1(int val) {
- return bd(val, 1);
- }
- public static BigDecimal bd2(int val) {
- return bd(val, 2);
- }
- public static BigDecimal bd4(int val) {
- return bd(val, 4);
- }
-
-
- public static BigDecimal bd(Integer val) {
- return val != null? bd(val.intValue()): null;
- }
- public static BigDecimal bd(Integer val, int newScale) {
- return val != null? bd(val.intValue(), newScale): null;
- }
- public static BigDecimal bd1(Integer val) {
- return val != null? bd1(val.intValue()): null;
- }
- public static BigDecimal bd2(Integer val) {
- return val != null? bd2(val.intValue()): null;
- }
- public static BigDecimal bd4(Integer val) {
- return val != null? bd4(val.intValue()): null;
- }
-
-}
-
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeComparable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeComparable.java
deleted file mode 100644
index 2faa51ad95..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeComparable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithCodeComparable<T extends WithCodeComparable<T>> extends Comparable<T>, WithCodeGetter {
- void setCode(String code);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeGetter.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeGetter.java
deleted file mode 100644
index d0d884a9c1..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeGetter.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.apache.isis.applib.util.ObjectContracts.ToStringEvaluator;
-
-/**
- * Indicates that the implementing class has a {@link #getCode() code}.
- *
- * @since 2.0 {@index}
- */
-public interface WithCodeGetter {
-
- public String getCode();
-
- /**
- * Utility class for obtaining the string value of an object that implements {@link WithCodeGetter}.
- */
- public static final class ToString {
- private ToString() {}
- public static ToStringEvaluator evaluator() {
- return new ToStringEvaluator() {
- @Override
- public boolean canEvaluate(final Object o) {
- return o instanceof WithCodeGetter;
- }
-
- @Override
- public String evaluate(final Object o) {
- return ((WithCodeGetter)o).getCode();
- }
- };
- }
- }
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeUnique.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeUnique.java
deleted file mode 100644
index c0da8f6c48..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithCodeUnique.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithCodeUnique extends WithCodeGetter {
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionComparable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionComparable.java
deleted file mode 100644
index a50386b4cf..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionComparable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithDescriptionComparable<T extends WithDescriptionComparable<T>>
- extends Comparable<T>, WithDescriptionGetter {
- void setDescription(String description);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionGetter.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionGetter.java
deleted file mode 100644
index fde15f2ccc..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionGetter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.apache.isis.applib.util.ObjectContracts.ToStringEvaluator;
-
-/**
- * Indicates that the implementing class has a {@link #getDescription() description}.
- *
- * @since 2.0 {@index}
- */
-public interface WithDescriptionGetter {
-
- public String getDescription();
-
- /**
- * Utility class for obtaining the string value of an object that implements {@link WithDescriptionGetter}.
- */
- public static final class ToString {
- private ToString() {}
- public static ToStringEvaluator evaluator() {
- return new ToStringEvaluator() {
- @Override
- public boolean canEvaluate(final Object o) {
- return o instanceof WithDescriptionGetter;
- }
-
- @Override
- public String evaluate(final Object o) {
- return ((WithDescriptionGetter)o).getDescription();
- }
- };
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionUnique.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionUnique.java
deleted file mode 100644
index dc89c46d89..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithDescriptionUnique.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithDescriptionUnique extends WithDescriptionGetter {
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithInterval.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithInterval.java
deleted file mode 100644
index df2fc6d418..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithInterval.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.SortedSet;
-import java.util.function.Predicate;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.commons.internal.base._NullSafe;
-import org.apache.isis.subdomains.base.applib.valuetypes.LocalDateInterval;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithInterval<T extends WithInterval<T>> extends WithStartDate {
-
- /**
- * The start date of the interval.
- *
- * <p>
- * A value of <tt>null</tt> implies that the parent's start date should be used. If
- * that is <tt>null</tt>, then implies 'the beginning of time'.
- */
- @Override
- @Property(editing = Editing.DISABLED, optionality = Optionality.OPTIONAL)
- public LocalDate getStartDate();
-
- @Override
- public void setStartDate(LocalDate startDate);
-
- /**
- * The end date of the interval.
- *
- * <p>
- * A value of <tt>null</tt> implies that the parent's end date should be used. If
- * that is <tt>null</tt>, then implies 'the end of time'.
- */
- @Property(editing = Editing.DISABLED, optionality = Optionality.OPTIONAL)
- public LocalDate getEndDate();
-
- public void setEndDate(LocalDate endDate);
-
- // /**
- // * The parent "owning" object, if any, that is itself a {@link
- // WithInterval}
- // * .
- // *
- // * <p>
- // * Used to determine the {@link #getEffectiveStartDate() effective start
- // * date} and {@link #getEffectiveEndDate() effective end date} when the
- // * actual {@link #getStartDate() start date} and {@link #getEndDate() end
- // * date} are <tt>null</tt> (in other words the start/end date are
- // inherited
- // * from the parent).
- // */
- // @Hidden
- // public WithInterval<?> getWithIntervalParent();
-
- // /**
- // * Either the {@link #getStartDate() start date}, or the
- // * {@link #getWithIntervalParent() parent}'s start date (if any).
- // */
- // @Hidden
- // public LocalDate getEffectiveStartDate();
-
- // /**
- // * Either the {@link #getEndDate() end date}, or the
- // * {@link #getWithIntervalParent() parent}'s end date (if any).
- // */
- // @Hidden
- // public LocalDate getEffectiveEndDate();
-
- @Programmatic
- public LocalDateInterval getInterval();
-
- @Programmatic
- public LocalDateInterval getEffectiveInterval();
-
- @Programmatic
- public boolean isCurrent();
-
- @UtilityClass
- public static final class Util {
-
- // public static LocalDate effectiveStartDateOf(final WithInterval<?>
- // wi) {
- // if (wi.getStartDate() != null) {
- // return wi.getStartDate();
- // }
- // final WithInterval<?> parentWi = wi.getWithIntervalParent();
- // if (parentWi != null) {
- // return parentWi.getEffectiveStartDate();
- // }
- // return null;
- // }
-
- // public static LocalDate effectiveEndDateOf(final WithInterval<?> wi)
- // {
- // if (wi.getEndDate() != null) {
- // return wi.getEndDate();
- // }
- // final WithInterval<?> parentWi = wi.getWithIntervalParent();
- // if (parentWi != null) {
- // return parentWi.getEffectiveEndDate();
- // }
- // return null;
- // }
-
- public static <T extends WithInterval<T>> T firstElseNull(
- final SortedSet<T> roles,
- final Predicate<T> predicate) {
- return _NullSafe.stream(roles)
- .filter(predicate)
- .findFirst()
- .orElse(null);
- }
- }
-
- @UtilityClass
- public static final class Predicates {
-
- /**
- * A {@link Predicate} that tests whether the role's {@link WithInterval#isCurrent() current}
- * status is the specified value.
- */
- public static <T extends WithInterval<T>> Predicate<T> whetherCurrentIs(final boolean current) {
- return (final T candidate) -> {
- return candidate != null && candidate.isCurrent() == current;
- };
- }
-
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalContiguous.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalContiguous.java
deleted file mode 100644
index 940b0743a9..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalContiguous.java
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Objects;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.Property;
-import org.apache.isis.applib.annotation.Where;
-import org.apache.isis.commons.internal.base._NullSafe;
-import org.apache.isis.subdomains.base.applib.Chained;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithIntervalContiguous<T extends WithIntervalContiguous<T>>
- extends WithIntervalMutable<T>, Comparable<T> {
-
-
- /**
- * The interval that immediately precedes this one, if any.
- *
- * <p>
- * The predecessor's {@link #getEndDate() end date} is the day before this interval's
- * {@link #getStartDate() start date}.
- *
- * <p>
- * Implementations where successive intervals are NOT contiguous should instead implement {@link Chained}.
- */
- @Property(editing = Editing.DISABLED, hidden=Where.ALL_TABLES, optionality = Optionality.OPTIONAL)
- public T getPredecessor();
-
- /**
- * The interval that immediately succeeds this one, if any.
- *
- * <p>
- * The successor's {@link #getStartDate() start date} is the day after this interval's
- * {@link #getEndDate() end date}.
- *
- * <p>
- * Implementations where successive intervals are NOT contiguous should instead implement {@link Chained}.
- */
- @Property(editing = Editing.DISABLED, hidden=Where.ALL_TABLES, optionality = Optionality.OPTIONAL)
- public T getSuccessor();
-
-
-
- /**
- * Show this {@link WithIntervalContiguous} in context with its
- * predecessors and successors.
- *
- * <p>
- * This will typically (always) be a derived collection obtained
- * by filtering a collection of the "parent".
- */
- @Property(editing = Editing.DISABLED)
- public SortedSet<T> getTimeline();
-
-
- // //////////////////////////////////////
-
-
- public interface Factory<T extends WithIntervalContiguous<T>> {
- T newRole(LocalDate startDate, LocalDate endDate);
- }
-
- /**
- * Helper class for implementations to delegate to.
- */
- public static class Helper<T extends WithIntervalContiguous<T>> {
-
- private final T withInterval;
- public Helper(final T withInterval) {
- this.withInterval = withInterval;
- }
-
- // //////////////////////////////////////
-
- public T succeededBy(
- final LocalDate startDate,
- final LocalDate endDate,
- final WithIntervalContiguous.Factory<T> factory) {
- final WithInterval<?> successor = withInterval.getSuccessor();
- if(successor != null) {
- successor.setStartDate(dayAfterElseNull(endDate));
- }
- withInterval.setEndDate(dayBeforeElseNull(startDate));
- return factory.newRole(startDate, endDate);
- }
-
- public LocalDate default1SucceededBy() {
- return dayAfterElseNull(withInterval.getEndDate());
- }
-
- public String validateSucceededBy(
- final LocalDate startDate,
- final LocalDate endDate) {
- if(startDate != null && endDate != null && startDate.isAfter(endDate)) {
- return "End date cannot be earlier than start date";
- }
- if(withInterval.getStartDate() != null && !withInterval.getStartDate().isBefore(startDate)) {
- return "Successor must start after existing";
- }
- final WithInterval<?> successor = withInterval.getSuccessor();
- if(successor != null) {
- if (endDate == null) {
- return "An end date is required because a successor already exists";
- }
- if(successor.getEndDate() != null && !endDate.isBefore(successor.getEndDate())) {
- return "Successor must end prior to existing successor";
- }
- }
- return null;
- }
-
- // //////////////////////////////////////
-
-
- public T precededBy(
- final LocalDate startDate,
- final LocalDate endDate,
- final WithIntervalContiguous.Factory<T> factory) {
-
- final WithInterval<?> predecessor = withInterval.getPredecessor();
- if(predecessor != null) {
- predecessor.setEndDate(dayBeforeElseNull(startDate));
- }
- withInterval.setStartDate(dayAfterElseNull(endDate));
- return factory.newRole(startDate, endDate);
- }
-
- public LocalDate default2PrecededBy() {
- return dayBeforeElseNull(withInterval.getStartDate());
- }
-
- public String validatePrecededBy(
- final LocalDate startDate,
- final LocalDate endDate) {
- if(startDate != null && endDate != null && startDate.isAfter(endDate)) {
- return "End date cannot be earlier than start date";
- }
- if(withInterval.getEndDate() != null && !withInterval.getEndDate().isAfter(endDate)) {
- return "Predecessor must end before existing";
- }
- final WithInterval<?> predecessor = withInterval.getPredecessor();
- if(predecessor != null) {
- if (startDate == null) {
- return "A start date is required because a predecessor already exists";
- }
- if(predecessor.getStartDate() != null && !startDate.isAfter(predecessor.getStartDate())) {
- return "Predecessor must start after existing predecessor";
- }
- }
- return null;
- }
-
-
- // //////////////////////////////////////
-
- @Programmatic
- public T getPredecessor(final SortedSet<T> siblings, final Predicate<T> filter) {
- return WithInterval.Util.firstElseNull(
- siblings,
- filter.and(endDatePreceding(withInterval.getStartDate())));
- }
-
- @Programmatic
- public T getSuccessor(final SortedSet<T> siblings, final Predicate<T> filter) {
- return WithInterval.Util.firstElseNull(
- siblings,
- filter.and(startDateFollowing(withInterval.getEndDate())));
-
- }
-
- private Predicate<T> startDateFollowing(final LocalDate date) {
- return (final T ar) -> {
- return date != null && ar != null && Objects.equals(ar.getStartDate(), date.plusDays(1));
- };
- }
-
- private Predicate<T> endDatePreceding(final LocalDate date) {
- return (final T ar) -> {
- return date != null && ar != null && Objects.equals(ar.getEndDate(), date.minusDays(1));
- };
- }
-
- // //////////////////////////////////////
-
- @Programmatic
- public SortedSet<T> getTimeline(final SortedSet<T> siblings, final Predicate<? super T> filter) {
- return _NullSafe.stream(siblings)
- .filter(filter)
- .collect(Collectors.toCollection(TreeSet::new));
- }
-
- // //////////////////////////////////////
-
- public T changeDates(
- final LocalDate startDate,
- final LocalDate endDate) {
-
- final T predecessor = withInterval.getPredecessor();
- if(predecessor != null) {
- predecessor.setEndDate(dayBeforeElseNull(startDate));
- }
- final T successor = withInterval.getSuccessor();
- if(successor != null) {
- successor.setStartDate(dayAfterElseNull(endDate));
- }
- withInterval.setStartDate(startDate);
- withInterval.setEndDate(endDate);
- return withInterval;
- }
-
- public LocalDate default0ChangeDates() {
- return withInterval.getEffectiveInterval().startDate();
- }
-
- public LocalDate default1ChangeDates() {
- return withInterval.getEffectiveInterval().endDate();
- }
-
- public String validateChangeDates(
- final LocalDate startDate,
- final LocalDate endDate) {
-
- if(startDate != null && endDate != null && startDate.isAfter(endDate)) {
- return "End date cannot be earlier than start date";
- }
- final T predecessor = withInterval.getPredecessor();
- if (predecessor != null) {
- if(startDate == null) {
- return "Start date cannot be set to null if there is a predecessor";
- }
- if(predecessor.getStartDate() != null && !predecessor.getStartDate().isBefore(startDate)) {
- return "Start date cannot be on/before start of current predecessor";
- }
- }
- final T successor = withInterval.getSuccessor();
- if (successor != null) {
- if(endDate == null) {
- return "End date cannot be set to null if there is a successor";
- }
- if(successor.getEndDate() != null && !successor.getEndDate().isAfter(endDate)) {
- return "End date cannot be on/after end of current successor";
- }
- }
- return null;
- }
-
- // //////////////////////////////////////
-
- private static LocalDate dayBeforeElseNull(final LocalDate date) {
- return date!=null?date.minusDays(1):null;
- }
- private static LocalDate dayAfterElseNull(final LocalDate date) {
- return date!=null?date.plusDays(1):null;
- }
-
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutable.java
deleted file mode 100644
index 723435ad67..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutable.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.Optionality;
-import org.apache.isis.applib.annotation.Parameter;
-import org.apache.isis.applib.annotation.SemanticsOf;
-import org.apache.isis.subdomains.base.applib.valuetypes.LocalDateInterval;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithIntervalMutable<T extends WithIntervalMutable<T>> extends WithInterval<T> {
-
- @Action(semantics = SemanticsOf.IDEMPOTENT)
- public T changeDates(
- final @Parameter(optionality = Optionality.OPTIONAL) LocalDate startDate,
- final @Parameter(optionality = Optionality.OPTIONAL) LocalDate endDate);
-
- public LocalDate default0ChangeDates();
-
- public LocalDate default1ChangeDates();
-
- public String validateChangeDates(
- final LocalDate startDate,
- final LocalDate endDate);
-
- /**
- * Helper class for implementations to delegate to.
- *
- * <p>
- * If the class implements {@link WithIntervalContiguous} then use
- * {@link WithIntervalContiguous.Helper} instead.
- */
- public static class Helper<T extends WithIntervalMutable<T>> {
-
- private T withInterval;
-
- public Helper(final T withInterval) {
- this.withInterval = withInterval;
- }
-
- public T changeDates(
- final LocalDate startDate,
- final LocalDate endDate) {
- withInterval.setStartDate(startDate);
- withInterval.setEndDate(endDate);
- return withInterval;
- }
-
- public LocalDate default0ChangeDates() {
- LocalDateInterval interval = withInterval.getInterval();
- return interval == null ? null : interval.startDate();
- }
-
- public LocalDate default1ChangeDates() {
- LocalDateInterval interval = withInterval.getInterval();
- return interval == null ? null : interval.endDate();
- }
-
- public String validateChangeDates(
- final LocalDate startDate,
- final LocalDate endDate) {
- if (startDate != null && endDate != null && !startDate.isBefore(endDate)) {
- return "End date must be after start date";
- }
- return null;
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameComparable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameComparable.java
deleted file mode 100644
index 914afb332a..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameComparable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithNameComparable<T extends WithNameComparable<T>> extends Comparable<T>, WithNameGetter {
- void setName(String name);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameGetter.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameGetter.java
deleted file mode 100644
index b3bcbb96ab..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameGetter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.apache.isis.applib.util.ObjectContracts;
-
-/**
- * Indicates that the implementing class has a {@link #getName() name}.
- *
- * @since 2.0 {@index}
- */
-public interface WithNameGetter {
-
- public String getName();
-
- /**
- * Utility class for obtaining the string value of an object that implements {@link WithNameGetter}.
- */
- public static final class ToString {
- private ToString() {}
- public static ObjectContracts.ToStringEvaluator evaluator() {
- return new ObjectContracts.ToStringEvaluator() {
- @Override
- public boolean canEvaluate(final Object o) {
- return o instanceof WithNameGetter;
- }
-
- @Override
- public String evaluate(final Object o) {
- return ((WithNameGetter)o).getName();
- }
- };
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameUnique.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameUnique.java
deleted file mode 100644
index 3071569337..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithNameUnique.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithNameUnique extends WithNameGetter {
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceComparable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceComparable.java
deleted file mode 100644
index 50e1a85385..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceComparable.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithReferenceComparable<T extends WithReferenceComparable<T>>
- extends Comparable<T>, WithReferenceGetter {
- void setReference(String reference);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceGetter.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceGetter.java
deleted file mode 100644
index c1e2781df4..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceGetter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.apache.isis.applib.util.ObjectContracts.ToStringEvaluator;
-
-/**
- * Indicates that the implementing class has a {@link #getReference() reference}.
- *
- * @since 2.0 {@index}
- */
-public interface WithReferenceGetter {
-
- public String getReference();
-
- /**
- * Utility class for obtaining the string value of an object that implements {@link WithReferenceGetter}.
- */
- public static final class ToString {
- private ToString() {}
- public static ToStringEvaluator evaluator() {
- return new ToStringEvaluator() {
- @Override
- public boolean canEvaluate(final Object o) {
- return o instanceof WithReferenceGetter;
- }
-
- @Override
- public String evaluate(final Object o) {
- return ((WithReferenceGetter)o).getReference();
- }
- };
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceUnique.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceUnique.java
deleted file mode 100644
index 6cfb5e1b1c..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithReferenceUnique.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithReferenceUnique extends WithReferenceGetter {
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithSequence.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithSequence.java
deleted file mode 100644
index 760cb7e712..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithSequence.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.math.BigInteger;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithSequence {
- public BigInteger getSequence();
- public void setSequence(BigInteger sequence);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithStartDate.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithStartDate.java
deleted file mode 100644
index 95a5f8ad03..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithStartDate.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.joda.time.LocalDate;
-
-import org.apache.isis.applib.annotation.Editing;
-import org.apache.isis.applib.annotation.Property;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithStartDate {
-
- @Property(editing = Editing.DISABLED)
- public LocalDate getStartDate();
- public void setStartDate(LocalDate startDate);
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleComparable.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleComparable.java
deleted file mode 100644
index 4bbea0f62d..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleComparable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithTitleComparable<T extends WithTitleComparable<T>> extends Comparable<T>, WithTitleGetter {
- void setTitle(String title);
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleGetter.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleGetter.java
deleted file mode 100644
index 4a14d647ba..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleGetter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.apache.isis.applib.util.ObjectContracts.ToStringEvaluator;
-
-/**
- * Indicates that the implementing class has a {@link #getTitle() title}.
- *
- * @since 2.0 {@index}
- */
-public interface WithTitleGetter {
-
- public String getTitle();
-
- /**
- * Utility class for obtaining the string value of an object that implements {@link WithTitleGetter}.
- */
- public static final class ToString {
- private ToString() {}
- public static ToStringEvaluator evaluator() {
- return new ToStringEvaluator() {
- @Override
- public boolean canEvaluate(final Object o) {
- return o instanceof WithTitleGetter;
- }
-
- @Override
- public String evaluate(final Object o) {
- return ((WithTitleGetter)o).getTitle();
- }
- };
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleUnique.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleUnique.java
deleted file mode 100644
index f1447a4827..0000000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/with/WithTitleUnique.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-/**
- * @since 2.0 {@index}
- */
-public interface WithTitleUnique extends WithTitleGetter {
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/matchers/IsisMatchers.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/matchers/IsisMatchers.java
deleted file mode 100644
index 91ab3694b4..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/matchers/IsisMatchers.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.matchers;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-
-import org.hamcrest.CoreMatchers;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.Matchers;
-import org.hamcrest.TypeSafeMatcher;
-import org.hamcrest.core.IsEqual;
-import org.hamcrest.core.StringContains;
-import org.hamcrest.core.StringEndsWith;
-import org.hamcrest.core.StringStartsWith;
-
-import static org.hamcrest.CoreMatchers.nullValue;
-
-import org.apache.isis.core.metamodel.commons.StringExtensions;
-
-/**
- * Hamcrest {@link org.hamcrest.Matcher} implementations.
- *
- */
-public final class IsisMatchers {
-
- private IsisMatchers() {
- }
-
- public static Matcher<String> containsStripNewLines(final String expected) {
- final String strippedExpected = StringExtensions.stripNewLines(expected);
- return new StringContains(false, strippedExpected) {
- @Override
- public boolean matchesSafely(final String actual) {
- return super.matchesSafely(StringExtensions.stripNewLines(actual));
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a string (ignoring new lines) containing").appendValue(strippedExpected);
- }
- };
- }
-
- public static Matcher<String> equalToStripNewLines(final String expected) {
- final String strippedExpected = StringExtensions.stripNewLines(expected);
- return new IsEqual<String>(strippedExpected) {
- @Override
- public boolean matches(final Object actualObj) {
- final String actual = (String) actualObj;
- return super.matches(StringExtensions.stripNewLines(actual));
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a string (ignoring new lines) equal to").appendValue(strippedExpected);
- }
- };
- }
-
- public static StringStartsWith startsWithStripNewLines(final String expected) {
- final String strippedExpected = StringExtensions.stripNewLines(expected);
- return new StringStartsWith(false, strippedExpected) {
- @Override
- public boolean matchesSafely(final String actual) {
- return super.matchesSafely(StringExtensions.stripNewLines(actual));
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a string (ignoring new lines) starting with").appendValue(strippedExpected);
- }
- };
- }
-
- public static Matcher<String> endsWithStripNewLines(final String expected) {
- final String strippedExpected = StringExtensions.stripNewLines(expected);
- return new StringEndsWith(false, strippedExpected) {
- @Override
- public boolean matchesSafely(final String actual) {
- return super.matchesSafely(StringExtensions.stripNewLines(actual));
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a string (ignoring new lines) ending with").appendValue(strippedExpected);
- }
- };
- }
-
- public static <T> Matcher<T> anInstanceOf(final Class<T> expected) {
- return new TypeSafeMatcher<T>() {
- @Override
- public boolean matchesSafely(final T actual) {
- return expected.isAssignableFrom(actual.getClass());
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("an instance of ").appendValue(expected);
- }
- };
- }
-
- public static Matcher<String> nonEmptyString() {
- return new TypeSafeMatcher<String>() {
- @Override
- public boolean matchesSafely(final String str) {
- return str != null && str.length() > 0;
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a non empty string");
- }
-
- };
- }
-
- @SuppressWarnings("unchecked")
- public static Matcher<String> nonEmptyStringOrNull() {
- return CoreMatchers.anyOf(nullValue(String.class), nonEmptyString());
- }
-
- public static Matcher<List<?>> containsElementThat(final Matcher<?> elementMatcher) {
- return new TypeSafeMatcher<List<?>>() {
- @Override
- public boolean matchesSafely(final List<?> list) {
- for (final Object o : list) {
- if (elementMatcher.matches(o)) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("contains element that ").appendDescriptionOf(elementMatcher);
- }
- };
- }
-
- public static <T extends Comparable<T>> Matcher<T> greaterThan(final T c) {
- return Matchers.greaterThan(c);
- }
-
- public static Matcher<Class<?>> classEqualTo(final Class<?> operand) {
-
- class ClassEqualsMatcher extends TypeSafeMatcher<Class<?>> {
- private final Class<?> clazz;
-
- public ClassEqualsMatcher(final Class<?> clazz) {
- this.clazz = clazz;
- }
-
- @Override
- public boolean matchesSafely(final Class<?> arg) {
- return clazz == arg;
- }
-
- @Override
- public void describeTo(final Description description) {
- description.appendValue(clazz);
- }
- }
-
- return new ClassEqualsMatcher(operand);
- }
-
- public static Matcher<File> existsAndNotEmpty() {
-
- return new TypeSafeMatcher<File>() {
-
- @Override
- public void describeTo(final Description arg0) {
- arg0.appendText("exists and is not empty");
- }
-
- @Override
- public boolean matchesSafely(final File f) {
- return f.exists() && f.length() > 0;
- }
- };
- }
-
- public static Matcher<String> matches(final String regex) {
- return new TypeSafeMatcher<String>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("string matching " + regex);
- }
-
- @Override
- public boolean matchesSafely(final String str) {
- return str.matches(regex);
- }
- };
- }
-
- public static <X> Matcher<Class<X>> anySubclassOf(final Class<X> cls) {
- return new TypeSafeMatcher<Class<X>>() {
-
- @Override
- public void describeTo(final Description arg0) {
- arg0.appendText("is subclass of ").appendText(cls.getName());
- }
-
- @Override
- public boolean matchesSafely(final Class<X> item) {
- return cls.isAssignableFrom(item);
- }
- };
- }
-
- public static <T> Matcher<List<T>> sameContentsAs(final List<T> expected) {
- return new TypeSafeMatcher<List<T>>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("same sequence as " + expected);
- }
-
- @Override
- public boolean matchesSafely(final List<T> actual) {
- return actual.containsAll(expected) && expected.containsAll(actual);
- }
- };
- }
-
- public static <T> Matcher<List<T>> listContaining(final T t) {
- return new TypeSafeMatcher<List<T>>() {
-
- @Override
- public void describeTo(Description arg0) {
- arg0.appendText("list containing ").appendValue(t);
- }
-
- @Override
- public boolean matchesSafely(List<T> arg0) {
- return arg0.contains(t);
- }
- };
- }
-
- public static <T> Matcher<List<T>> listContainingAll(final T... items) {
- return new TypeSafeMatcher<List<T>>() {
-
- @Override
- public void describeTo(Description arg0) {
- arg0.appendText("has items ").appendValue(items);
-
- }
-
- @Override
- public boolean matchesSafely(List<T> arg0) {
- return arg0.containsAll(Arrays.asList(items));
- }
- };
- }
-
- public static Matcher<List<Object>> containsObjectOfType(final Class<?> cls) {
- return new TypeSafeMatcher<List<Object>>() {
-
- @Override
- public void describeTo(final Description desc) {
- desc.appendText("contains instance of type " + cls.getName());
- }
-
- @Override
- public boolean matchesSafely(final List<Object> items) {
- for (final Object object : items) {
- if (cls.isAssignableFrom(object.getClass())) {
- return true;
- }
- }
- return false;
- }
- };
- }
-
- public static Matcher<String> startsWith(final String expected) {
- return new TypeSafeMatcher<String>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText(" starts with '" + expected + "'");
- }
-
- @Override
- public boolean matchesSafely(String actual) {
- return actual.startsWith(expected);
- }
- };
- }
-
- public static Matcher<String> contains(final String expected) {
- return new TypeSafeMatcher<String>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText(" contains '" + expected + "'");
- }
-
- @Override
- public boolean matchesSafely(String actual) {
- return actual.contains(expected);
- }
- };
- }
-
-
- public static Matcher<File> equalsFile(final File file) throws IOException {
- final String canonicalPath = file.getCanonicalPath();
- return new TypeSafeMatcher<File>() {
-
- @Override
- public void describeTo(Description arg0) {
- arg0.appendText("file '" + canonicalPath + "'");
- }
-
- @Override
- public boolean matchesSafely(File arg0) {
- try {
- return arg0.getCanonicalPath().equals(canonicalPath);
- } catch (IOException e) {
- return false;
- }
- }
- };
- }
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfMonth.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfMonth.java
deleted file mode 100644
index 701261ecef..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfMonth.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.services.calendar;
-
-import java.time.Instant;
-import java.time.LocalDate;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.applib.clock.VirtualClock;
-import org.apache.isis.applib.services.clock.ClockService;
-
-@RunWith(Parameterized.class)
-public class CalendarServiceTest_beginningOfMonth {
-
- private CalendarService calendarService;
- private ClockService stubClockService;
- protected LocalDate now;
- private LocalDate expected;
-
- @Parameters
- public static Collection<Object[]> data() {
- return Arrays.asList(
- new Object[][] {
- { LocalDate.of(2013,4,15), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,4,1), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,4,30), LocalDate.of(2013,4,1)},
- });
- }
-
- public CalendarServiceTest_beginningOfMonth(LocalDate date, LocalDate expected) {
- this.now = date;
- this.expected = expected;
- }
-
- @Before
- public void setUp() throws Exception {
- stubClockService = new ClockService(null) {
- @Override
- public VirtualClock getClock() {
- return VirtualClock.frozenAt(Instant.from(now));
- }
- };
- calendarService = new CalendarServiceDefault(stubClockService);
- }
-
- @Test
- public void test() throws Exception {
- assertThat(calendarService.beginningOfMonth(), is(expected));
- }
-
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfQuarter.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfQuarter.java
deleted file mode 100644
index 553dd54c4a..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/services/calendar/CalendarServiceTest_beginningOfQuarter.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.services.calendar;
-
-import java.time.Instant;
-import java.time.LocalDate;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameters;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.applib.clock.VirtualClock;
-import org.apache.isis.applib.services.clock.ClockService;
-
-@RunWith(Parameterized.class)
-public class CalendarServiceTest_beginningOfQuarter {
-
- private CalendarService calendarService;
- private ClockService stubClockService;
- protected LocalDate now;
- private LocalDate expected;
-
- @Parameters
- public static Collection<Object[]> data() {
- return Arrays.asList(
- new Object[][] {
- { LocalDate.of(2013,1,15), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,1,1), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,1,31), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,2,15), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,2,1), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,2,28), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,3,15), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,3,1), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,3,31), LocalDate.of(2013,1,1)},
- { LocalDate.of(2013,4,15), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,4,1), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,4,30), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,5,15), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,5,1), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,5,31), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,6,15), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,6,1), LocalDate.of(2013,4,1)},
- { LocalDate.of(2013,6,30), LocalDate.of(2013,4,1)},
- });
- }
-
- public CalendarServiceTest_beginningOfQuarter(LocalDate date, LocalDate expected) {
- this.now = date;
- this.expected = expected;
- }
-
- @Before
- public void setUp() throws Exception {
- stubClockService = new ClockService(null) {
- @Override
- public VirtualClock getClock() {
- return VirtualClock.frozenAt(Instant.from(now));
- }
- };
- calendarService = new CalendarServiceDefault(stubClockService);
- }
-
- @Test
- public void test() throws Exception {
- assertThat(calendarService.beginningOfQuarter(), is(expected));
- }
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/testing/PrivateConstructorTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/testing/PrivateConstructorTester.java
deleted file mode 100644
index 8d5d7d518d..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/testing/PrivateConstructorTester.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.testing;
-
-import java.lang.reflect.Constructor;
-
-import org.apache.isis.commons.internal.reflection._Reflect;
-
-public final class PrivateConstructorTester {
-
- private Class<?> cls;
-
- public PrivateConstructorTester(Class<?> cls) {
- this.cls = cls;
- }
-
- public void exercise() throws Exception {
- final Constructor<?> constructor = cls.getDeclaredConstructor();
- _Reflect.invokeConstructor(constructor);
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTestAbstract_title.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTestAbstract_title.java
deleted file mode 100644
index 8123ebdee2..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTestAbstract_title.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.titled;
-
-import org.junit.Test;
-
-import org.apache.isis.subdomains.base.applib.TitledEnum;
-
-import lombok.val;
-
-public abstract class TitledEnumContractTestAbstract_title {
- protected final Iterable<Class<? extends TitledEnum>> candidates;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(TitledEnum.class);}
- */
- public TitledEnumContractTestAbstract_title(final Iterable<Class<? extends TitledEnum>> candidates) {
- this.candidates = candidates;
- }
-
- @SuppressWarnings({ "unchecked" })
- @Test
- public void searchAndTest() {
- for (Class<? extends TitledEnum> subtype : candidates) {
- if(!Enum.class.isAssignableFrom(subtype)) {
- continue; // ignore non-enums
- }
- val enumType = (Class<? extends Enum<?>>) subtype;
- new TitledEnumContractTester(enumType).test();
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTester.java
deleted file mode 100644
index 5ca5cbada1..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/titled/TitledEnumContractTester.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.titled;
-
-import org.hamcrest.CoreMatchers;
-
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.applib.util.Enums;
-import org.apache.isis.subdomains.base.applib.TitledEnum;
-
-public class TitledEnumContractTester {
- protected Enum<?>[] enumValues;
- protected Class<? extends Enum<?>> cls;
-
- public TitledEnumContractTester(Class<? extends Enum<?>> enumType) {
- this.cls = enumType;
- this.enumValues = enumType.getEnumConstants();
- }
-
- public void test() {
- System.out.println("TitledEnumContractTester: " + cls.getName());
-
- for (Enum<?> enumValue: enumValues) {
- final TitledEnum titled = (TitledEnum) enumValue;
- final String enumName = enumValue.name();
- assertThat(enumValue.getClass().getName()+"#"+enumName, titled.title(), CoreMatchers.is(enumTitle(enumName)));
- }
- }
-
- private <T> String enumTitle(final String enumName) {
- return Enums.getFriendlyNameOf(enumName);
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/ClassUtilsTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/ClassUtilsTest.java
deleted file mode 100644
index a9fb3bc974..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/ClassUtilsTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-public class ClassUtilsTest {
-
- public static class Load extends ClassUtilsTest {
-
- public static class SomeClass {
- }
-
- public static class SomeSubclass extends SomeClass {
- }
-
- public static class SomeOtherClass {
- }
-
- @Rule
- public ExpectedException thrown = ExpectedException.none();
-
- @Test
- public void doesExist() throws Exception {
- final Class<? extends SomeClass> cls = ClassUtils.load(SomeClass.class.getName(), SomeClass.class);
- assertThat(cls, is(not(nullValue())));
- }
-
- @Test
- public void doesNotExist() throws Exception {
- thrown.expect(IllegalArgumentException.class);
- thrown.expectMessage("Class 'org.apache.isis.subdomains.base.applib.utils.SomeNonExistentClass' not found");
- final Class<? extends SomeClass> cls = ClassUtils.load("org.apache.isis.subdomains.base.applib.utils.SomeNonExistentClass", SomeClass.class);
- assertThat(cls, is(not(nullValue())));
- }
-
- @Test
- public void existsAndIsSubclass() throws Exception {
- final Class<? extends SomeClass> cls = ClassUtils.load(SomeSubclass.class.getName(), SomeClass.class);
- assertThat(cls, is(not(nullValue())));
- }
-
- @Test
- public void existsAndIsNotASubclass() throws Exception {
- thrown.expect(IllegalArgumentException.class);
- thrown.expectMessage("Class 'org.apache.isis.subdomains.base.applib.utils.ClassUtilsTest$Load$SomeOtherClass' not a subclass of org.apache.isis.subdomains.base.applib.utils.ClassUtilsTest$Load$SomeClass");
- final Class<? extends SomeClass> cls = ClassUtils.load(SomeOtherClass.class.getName(), SomeClass.class);
- assertThat(cls, is(not(nullValue())));
- }
-
- }
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtilsTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtilsTest.java
deleted file mode 100644
index 581f14e2ca..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/JodaPeriodUtilsTest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import org.hamcrest.core.Is;
-import org.joda.time.LocalDate;
-import org.joda.time.Period;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class JodaPeriodUtilsTest {
-
- public static class AsPeriod extends JodaPeriodUtilsTest {
-
- @Test
- public void happyCase() {
- Period period = JodaPeriodUtils.asPeriod("6y6m3d");
- LocalDate startDate = new LocalDate(2000, 1, 1);
- Assert.assertThat(startDate.plus(period), Is.is(new LocalDate(2006, 7, 4)));
- }
-
- @Test
- public void withSpaces() {
- Period period = JodaPeriodUtils.asPeriod(" 6Y 6m ");
- LocalDate startDate = new LocalDate(2000, 1, 1);
- Assert.assertThat(startDate.plus(period), Is.is(new LocalDate(2006, 7, 1)));
- }
-
- @Test
- public void whenMalformed() {
- Period period = JodaPeriodUtils.asPeriod("6x6y");
- LocalDate startDate = new LocalDate(2000, 1, 1);
- Assert.assertThat(startDate.plus(period), Is.is(new LocalDate(2000, 1, 1)));
- }
- }
-
- public static class AsString extends JodaPeriodUtilsTest {
- @Test
- public void happyCase() throws Exception {
- Period period = new Period(new LocalDate(2000, 1, 1), new LocalDate(2006, 7, 2));
- Assert.assertThat(JodaPeriodUtils.asString(period), Is.is("6 years, 6 months & 1 day"));
- }
- }
-
- public static class AsSimpleString extends JodaPeriodUtilsTest {
- @Test
- public void happyCase() throws Exception {
- Period period = new Period(new LocalDate(2000, 1, 1), new LocalDate(2006, 7, 2));
- Assert.assertThat(JodaPeriodUtils.asSimpleString(period), Is.is("6y6m1d"));
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MathUtilsTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MathUtilsTest.java
deleted file mode 100644
index 90706d6399..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MathUtilsTest.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.math.BigDecimal;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-public class MathUtilsTest {
-
- public static class IsZeroOrNull extends MathUtilsTest {
-
- @Test
- public void testIsZeroOrNull() {
- Assert.assertTrue(MathUtils.isZeroOrNull(null));
- Assert.assertTrue(MathUtils.isZeroOrNull(BigDecimal.valueOf(0)));
- Assert.assertFalse(MathUtils.isZeroOrNull(BigDecimal.valueOf(100)));
- Assert.assertFalse(MathUtils.isNotZeroOrNull(null));
- Assert.assertFalse(MathUtils.isNotZeroOrNull(BigDecimal.valueOf(0)));
- Assert.assertTrue(MathUtils.isNotZeroOrNull(BigDecimal.valueOf(100)));
- }
- }
-
- public static class Round extends MathUtilsTest {
-
- @Test
- public void roundDown() throws Exception {
- assertThat(MathUtils.round(new BigDecimal("4.54"), 1), is(new BigDecimal("4.5")));
- }
-
- @Test
- public void noRounding() throws Exception {
- assertThat(MathUtils.round(new BigDecimal("4.54"), 2), is(new BigDecimal("4.54")));
- }
-
- @Test
- public void roundUp() throws Exception {
- assertThat(MathUtils.round(new BigDecimal("4.55"), 1), is(new BigDecimal("4.6")));
- }
- }
-
- public static class Max extends MathUtilsTest {
-
- @Test
- public void happyCase() throws Exception {
- assertThat(MathUtils.max(null, BigDecimal.ZERO, new BigDecimal("123.45"), new BigDecimal("123")), is(new BigDecimal("123.45")));
- }
- }
-
- public static class SomeThing extends MathUtilsTest {
-
- @Test
- public void happyCase() throws Exception {
- assertThat(MathUtils.maxUsingFirstSignum(new BigDecimal("-123.45"), new BigDecimal("-123")), is(new BigDecimal("-123.45")));
- assertThat(MathUtils.maxUsingFirstSignum(null, BigDecimal.ZERO, new BigDecimal("-123.45"), new BigDecimal("-123")), is(new BigDecimal("-123.45")));
- }
- }
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils_Test.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils_Test.java
deleted file mode 100644
index 62899623f4..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/MessageUtils_Test.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import org.assertj.core.api.Assertions;
-import org.junit.Test;
-
-public class MessageUtils_Test {
-
- @Test
- public void when_matches_pattern() throws Exception {
-
- final String normalized = MessageUtils.normalize(new Exception(
- "Temp *00000000: Reason: Must be in status of 'Approved'. Identifier: org.estatio.dom.invoice.Invoice$_invoice#$$(org.joda.time.LocalDate)"));
-
- Assertions.assertThat(normalized).isEqualTo("Must be in status of 'Approved'.");
-
- }
-
- @Test
- public void when_matches_pattern_nothing_before_Reason() throws Exception {
-
- final String normalized = MessageUtils.normalize(new Exception(
- "Reason: Must be in status of 'Approved'. Identifier: org.estatio.dom.invoice.Invoice$_invoice#$$(org.joda.time.LocalDate)"));
-
- Assertions.assertThat(normalized).isEqualTo("Must be in status of 'Approved'.");
-
- }
-
- @Test
- public void when_matches_pattern_nothing_extra_spaces_before_Identifier() throws Exception {
-
- final String normalized = MessageUtils.normalize(new Exception(
- "Temp *00000000: Reason: Must be in status of 'Approved'. Identifier: org.estatio.dom.invoice.Invoice$_invoice#$$(org.joda.time.LocalDate)"));
-
- Assertions.assertThat(normalized).isEqualTo("Must be in status of 'Approved'.");
-
- }
-
- @Test
- public void when_does_not_match_pattern_no_Reason() throws Exception {
-
- final String message = "Temp *00000000: ReAson: Must be in status of 'Approved'. Identifier: org.estatio.dom.invoice.Invoice$_invoice#$$(org.joda.time.LocalDate)";
- final String normalized = MessageUtils.normalize(new Exception(message));
-
- Assertions.assertThat(normalized).isEqualTo(message);
-
- }
-
- @Test
- public void when_does_not_match_pattern_no_Identifier() throws Exception {
-
- final String message = "Temp *00000000: Reason: Must be in status of 'Approved'. IDentifier: org.estatio.dom.invoice.Invoice$_invoice#$$(org.joda.time.LocalDate)";
- final String normalized = MessageUtils.normalize(new Exception(message));
-
- Assertions.assertThat(normalized).isEqualTo(message);
-
- }
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/StringUtilsTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/StringUtilsTest.java
deleted file mode 100644
index 76be15dbfe..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/StringUtilsTest.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-
-import static org.junit.Assert.assertEquals;
-
-import org.apache.isis.subdomains.base.applib.testing.PrivateConstructorTester;
-
-
-public class StringUtilsTest {
-
- public static class constructor extends StringUtilsTest {
- @Test
- public void instantiate() throws Exception {
- new PrivateConstructorTester(StringUtils.class).exercise();
- }
- }
-
- @RunWith(Parameterized.class)
- public static class EnumDeTitle extends StringUtilsTest {
-
- private String from;
- private String to;
-
- @Parameterized.Parameters
- public static Collection<Object[]> values() {
- return Arrays.asList(
- new Object[][]{
- {"Foo", "FOO"},
- {"Foo Bar", "FOO_BAR"},
- {null, null},
- }
- );
- }
-
- public EnumDeTitle(String from, String to) {
- this.from = from;
- this.to = to;
- }
-
- @Test
- public void nonNull() throws Exception {
- assertEquals(to, StringUtils.enumDeTitle(from));
- }
-
- }
-
- @RunWith(Parameterized.class)
- public static class EnumTitle extends StringUtilsTest {
-
- private String from;
- private String to;
-
- @Parameterized.Parameters
- public static Collection<Object[]> values() {
- return Arrays.asList(
- new Object[][]{
- {"FOO", "Foo"},
- {"FOO_BAR", "Foo Bar"},
- {null, null},
- }
- );
- }
-
- public EnumTitle(String from, String to) {
- this.from = from;
- this.to = to;
- }
-
- @Test
- public void nonNull() throws Exception {
- assertEquals(to, StringUtils.enumTitle(from));
- }
-
- }
-
- @RunWith(Parameterized.class)
- public static class WildcardToCaseInsensitiveRegex extends StringUtilsTest {
-
- private String from;
- private String to;
-
- @Parameterized.Parameters
- public static Collection<Object[]> values() {
- return Arrays.asList(
- new Object[][]{
- {"*abc?def*ghi", "(?i).*abc.def.*ghi"},
- {null, null},
- }
- );
- }
-
- public WildcardToCaseInsensitiveRegex(String from, String to) {
- this.from = from;
- this.to = to;
- }
-
- @Test
- public void nonNull() throws Exception {
- assertEquals(to, StringUtils.wildcardToCaseInsensitiveRegex(from));
- }
- }
-
- @RunWith(Parameterized.class)
- public static class WildcardToRegex extends StringUtilsTest {
-
- private String from;
- private String to;
-
- @Parameterized.Parameters
- public static Collection<Object[]> values() {
- return Arrays.asList(
- new Object[][]{
- {"*abc?def*ghi", ".*abc.def.*ghi"},
- {null, null},
- }
- );
- }
-
- public WildcardToRegex(String from, String to) {
- this.from = from;
- this.to = to;
- }
-
- @Test
- public void nonNull() throws Exception {
- assertEquals(to, StringUtils.wildcardToRegex(from));
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilderTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilderTest.java
deleted file mode 100644
index 1a604445c7..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/utils/TitleBuilderTest.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.utils;
-
-import org.junit.Test;
-
-import static org.assertj.core.api.Assertions.assertThat;
-
-import org.apache.isis.subdomains.base.applib.valuetypes.LocalDateInterval;
-
-public class TitleBuilderTest {
-
- public class TestObject {
- public String title(){
- return "Parent [PAR]";
- }
- }
-
- @Test
- public void testToString() throws Exception {
- assertThat(TitleBuilder.start().withName("Name").withReference("REF").toString())
- .isEqualTo("Name [REF]");
- assertThat(TitleBuilder.start().withParent(new TestObject()).withName("Name").withReference("REF").toString())
- .isEqualTo("Parent [PAR] > Name [REF]");
- assertThat(TitleBuilder.start().withParent(new TestObject()).withName("REF").withReference("REF").toString())
- .isEqualTo("Parent [PAR] > REF");
- assertThat(TitleBuilder.start().withParent(new TestObject()).withName("Name1").withName("Name2").withReference("REF").toString())
- .isEqualTo("Parent [PAR] > Name1 Name2 [REF]");
- assertThat(TitleBuilder.start().withParent(new TestObject()).withName(LocalDateInterval.parseString("2014-01-01/2015-01-01")).toString())
- .isEqualTo("Parent [PAR] > 2014-01-01/2015-01-01");
-
- }
-}
\ No newline at end of file
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateIntervalTest.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateIntervalTest.java
deleted file mode 100644
index 8930e40587..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/valuetypes/LocalDateIntervalTest.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.valuetypes;
-
-import org.joda.time.Interval;
-import org.joda.time.LocalDate;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertTrue;
-
-public class LocalDateIntervalTest {
-
- LocalDateInterval interval120101to120401 = LocalDateInterval.excluding(new LocalDate(2012, 1, 1), new LocalDate(2012, 4, 1));
- LocalDateInterval interval120101to120331incl = LocalDateInterval.including(new LocalDate(2012, 1, 1), new LocalDate(2012, 3, 31));
- LocalDateInterval interval111101to120501 = LocalDateInterval.excluding(new LocalDate(2011, 11, 1), new LocalDate(2012, 5, 1));
- LocalDateInterval interval111101to120301 = LocalDateInterval.excluding(new LocalDate(2011, 11, 1), new LocalDate(2012, 3, 1));
- LocalDateInterval interval120201to120501 = LocalDateInterval.excluding(new LocalDate(2012, 2, 1), new LocalDate(2012, 5, 1));
- LocalDateInterval interval120201to120301 = LocalDateInterval.excluding(new LocalDate(2012, 2, 1), new LocalDate(2012, 3, 1));
- LocalDateInterval interval100101to110101 = LocalDateInterval.excluding(new LocalDate(2010, 1, 1), new LocalDate(2011, 1, 1));
- LocalDateInterval interval130101to140101 = LocalDateInterval.excluding(new LocalDate(2013, 1, 1), new LocalDate(2014, 1, 1));
- LocalDateInterval interval120201toOpen = LocalDateInterval.excluding(new LocalDate(2012, 2, 1), null);
- LocalDateInterval interval120101toOpen = LocalDateInterval.excluding(new LocalDate(2010, 2, 1), null);
- LocalDateInterval intervalOpen = LocalDateInterval.excluding(null, null);
-
- public static class Instantiate extends LocalDateIntervalTest {
-
- @Test
- public void test() {
- LocalDate startDate = new LocalDate(2012, 1, 1);
- LocalDate endDate = new LocalDate(2012, 1, 31);
- Interval jodaInterval = new Interval(startDate.toInterval().getStartMillis(), endDate.toInterval().getEndMillis());
- LocalDateInterval interval = new LocalDateInterval(jodaInterval);
- assertThat(interval.startDate(), is(startDate));
- assertThat(interval.endDate(), is(endDate));
- }
-
- @Test
- public void testEmptyInterval() {
- LocalDateInterval myInterval = new LocalDateInterval();
- assertNull(myInterval.startDate());
- assertNull(myInterval.endDate());
- }
-
- }
-
- public static class IsValid extends LocalDateIntervalTest {
-
- @Test
- public void testInvalid() {
- assertFalse(new LocalDateInterval(new LocalDate(2011, 1, 1), new LocalDate(2010, 1, 1)).isValid());
- assertFalse(new LocalDateInterval(new LocalDate(2011, 1, 1), new LocalDate(2010, 12, 30)).isValid());
- assertTrue(new LocalDateInterval(new LocalDate(2011, 1, 1), new LocalDate(2010, 12, 31)).isValid());
- }
- }
-
- public static class Overlaps extends LocalDateIntervalTest {
-
- @Test
- public void testIsWithinParent() {
- assertTrue(interval120101to120331incl.overlaps(interval120101to120401));
- assertTrue(interval111101to120501.overlaps(interval120101to120401));
- assertTrue(interval111101to120301.overlaps(interval120101to120401));
- assertTrue(interval120201to120501.overlaps(interval120101to120401));
- assertTrue(interval120201to120301.overlaps(interval120101to120401));
- assertFalse(interval100101to110101.overlaps(interval120101to120401));
- assertFalse(interval130101to140101.overlaps(interval120101to120401));
- assertTrue(interval120201toOpen.overlaps(interval120101to120401));
- assertTrue(intervalOpen.overlaps(interval120101to120401));
- }
- }
-
- public static class Contains extends LocalDateIntervalTest {
-
- @Test
- public void testIsFullInterval() {
- assertTrue(interval120101to120331incl.contains(interval120101to120401));
- assertTrue(interval111101to120501.contains(interval120101to120401));
- assertFalse(interval111101to120301.contains(interval120101to120401));
- assertFalse(interval120201to120501.contains(interval120101to120401));
- assertFalse(interval120201to120301.contains(interval120101to120401));
- assertFalse(interval100101to110101.contains(interval120101to120401));
- assertFalse(interval130101to140101.contains(interval120101to120401));
- assertFalse(interval120201toOpen.contains(interval120101to120401));
- assertTrue(intervalOpen.contains(interval120101to120401));
- }
-
- @Test
- public void testContainsDate() {
- assertTrue(interval120101to120401.contains(new LocalDate(2012, 1, 1)));
- assertTrue(interval120101to120401.contains(new LocalDate(2012, 3, 31)));
- assertTrue(interval120201toOpen.contains(new LocalDate(2099, 1, 1)));
- assertFalse(interval120201toOpen.contains(new LocalDate(2000, 1, 1)));
- assertTrue(interval120201toOpen.contains(new LocalDate(2012, 3, 1)));
- assertTrue(intervalOpen.contains(new LocalDate(2012, 3, 31)));
- assertFalse(interval120101to120401.contains(new LocalDate(2012, 4, 1)));
- }
-
- @Test
- public void testContainsLocalDateInterval() {
- assertThat(LocalDateInterval.parseString("2010-01-01/2010-04-01").contains(LocalDateInterval.parseString("2010-01-01/2010-04-01")), is(true));
- assertThat(LocalDateInterval.parseString("2010-01-01/2010-04-01").contains(LocalDateInterval.parseString("2010-01-01/2010-05-01")), is(false));
- }
- }
-
- public static class StartDate extends LocalDateIntervalTest {
-
- @Test
- public void startDate() {
- assertEquals(new LocalDate(2012, 1, 1), interval120101to120331incl.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 1, 1), interval111101to120501.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 1, 1), interval111101to120301.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 2, 1), interval120201to120501.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 2, 1), interval120201to120301.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 2, 1), interval120201toOpen.overlap(interval120101to120401).startDate());
- assertEquals(new LocalDate(2012, 1, 1), intervalOpen.overlap(interval120101to120401).startDate());
- }
- }
-
- public static class EndDateExcluding extends LocalDateIntervalTest {
-
- @Test
- public void endDateExcluding() {
- assertEquals(new LocalDate(2012, 4, 1), interval120101to120331incl.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 4, 1), interval111101to120501.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 3, 1), interval111101to120301.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 4, 1), interval120201to120501.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 3, 1), interval120201to120301.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 4, 1), interval120201toOpen.overlap(interval120101to120401).endDateExcluding());
- assertEquals(new LocalDate(2012, 4, 1), intervalOpen.overlap(interval120101to120401).endDateExcluding());
- }
- }
-
- public static class Days extends LocalDateIntervalTest {
-
- @Test
- public void days() {
- assertEquals(91, interval120101to120331incl.overlap(interval120101to120401).days());
- assertEquals(91, interval111101to120501.overlap(interval120101to120401).days());
- assertEquals(60, interval111101to120301.overlap(interval120101to120401).days());
- assertEquals(60, interval120201to120501.overlap(interval120101to120401).days());
- assertEquals(29, interval120201to120301.overlap(interval120101to120401).days());
- assertEquals(60, interval120201toOpen.overlap(interval120101to120401).days());
- assertEquals(91, intervalOpen.overlap(interval120101to120401).days());
- assertEquals(91, interval120101to120401.overlap(intervalOpen).days());
- assertEquals(0, intervalOpen.overlap(intervalOpen).days());
- }
- }
-
-
- public static class EndDateFromStartDate extends LocalDateIntervalTest {
-
- @Test
- public void testEndDateFromStartDate() {
- assertThat(interval120101to120331incl.endDateFromStartDate(), is(interval120101to120331incl.startDate().minusDays(1)));
- }
- }
-
- public static class Overlap extends LocalDateIntervalTest {
-
- @Test
- public void testOverlap() {
- testOverlap("----------/----------", "----------/----------", "----------/----------");
- testOverlap("2010-01-01/----------", "----------/----------", "2010-01-01/----------");
- testOverlap("----------/----------", "2010-01-01/----------", "2010-01-01/----------");
- testOverlap("2010-01-01/----------", "2011-01-01/----------", "2011-01-01/----------");
- testOverlap("2011-01-01/----------", "2010-01-01/----------", "2011-01-01/----------");
- testOverlap("----------/2010-01-01", "2010-01-01/----------", null);
- testOverlap("----------/2010-02-01", "2010-01-01/----------", "2010-01-01/2010-02-01");
- testOverlap("2010-01-01/----------", "----------/2010-02-01", "2010-01-01/2010-02-01");
- }
-
- @Test
- public void testOpen() {
- assertThat(LocalDateInterval.parseString("*/*").overlap(LocalDateInterval.parseString("*/*")), is(LocalDateInterval.parseString("*/*")));
- }
-
- private void testOverlap(
- final String firstIntervalStr,
- final String secondIntervalStr,
- final String expectedIntervalStr) {
- LocalDateInterval first = LocalDateInterval.parseString(firstIntervalStr);
- LocalDateInterval second = LocalDateInterval.parseString(secondIntervalStr);
- LocalDateInterval overlap = first.overlap(second);
- LocalDateInterval expected = expectedIntervalStr == null ? null : LocalDateInterval.parseString(expectedIntervalStr);
- assertThat(overlap, is(expected));
- }
-
- }
-
- public static class ToString extends LocalDateIntervalTest {
-
- @Test
- public void testString() {
- assertThat(interval120201toOpen.toString(), is("2012-02-01/----------"));
- }
-
-
- @Test
- public void testStringWithFormat() {
- assertThat(LocalDateInterval.parseString("2010-07-01/2010-10-01").toString("dd-MM-yyy"), is("01-07-2010/30-09-2010"));
- }
- }
-
- public static class Equals extends LocalDateIntervalTest {
-
- @Test
- public void testEquals() {
- assertTrue(new LocalDateInterval().equals(new LocalDateInterval()));
- assertTrue(new LocalDateInterval(null, null, AbstractInterval.IntervalEnding.EXCLUDING_END_DATE).equals(new LocalDateInterval(null, null, AbstractInterval.IntervalEnding.INCLUDING_END_DATE)));
- }
- }
-
- public static class ParseString extends LocalDateIntervalTest {
-
- @Test
- public void testParseString() throws Exception {
- assertThat(LocalDateInterval.parseString("2010-07-01/2010-10-01").endDateExcluding(), is(new LocalDate(2010, 10, 1)));
- }
- }
-
-
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTestAbstract_compareTo.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTestAbstract_compareTo.java
deleted file mode 100644
index c3a0425ab8..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTestAbstract_compareTo.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Map;
-
-import org.junit.Test;
-
-import lombok.val;
-
-public abstract class ComparableByCodeContractTestAbstract_compareTo {
- protected final Iterable<Class<? extends WithCodeComparable>> candidates;
- protected Map<Class<?>, Class<?>> noninstantiableSubstitutes;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(WithCodeComparable.class);}
- */
- public ComparableByCodeContractTestAbstract_compareTo(
- Iterable<Class<? extends WithCodeComparable>> candidates,
- Map<Class<?>, Class<?>> noninstantiableSubstitutes) {
- this.candidates = candidates;
- this.noninstantiableSubstitutes = noninstantiableSubstitutes;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Test
- public void searchAndTest() {
-
- for (val subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
- test(instantiable(subtype));
- }
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- private Class<? extends WithCodeComparable> instantiable(Class<? extends WithCodeComparable> cls) {
- final Class<?> substitute = noninstantiableSubstitutes.get(cls);
- return (Class<? extends WithCodeComparable>) (substitute!=null?substitute:cls);
- }
-
- private <T extends WithCodeComparable<T>> void test(Class<T> cls) {
- new ComparableByCodeContractTester<>(cls).test();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTester.java
deleted file mode 100644
index 527e849c3f..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByCodeContractTester.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.testing.unittestsupport.applib.dom.comparable.ComparableContractTester;
-
-
-public class ComparableByCodeContractTester<T extends WithCodeComparable<T>> {
- protected final Class<T> cls;
-
- public ComparableByCodeContractTester(Class<T> cls) {
- this.cls = cls;
- }
-
- public static <E> List<E> listOf(E... elements) {
- return _Lists.of(elements);
- }
-
- public void test() {
- System.out.println("ComparableByCodeContractTester: " + cls.getName());
- new ComparableContractTester<>(orderedTuples()).test();
-
- testToString();
- }
-
- protected void testToString() {
- final String str = "ABC";
-
- final T withCode = newWithCode(str);
- String expectedToString = "";// MoreObjects.toStringHelper(withCode).add("code", "ABC").toString();
-
- assertThat(withCode.toString(), is(expectedToString));
- }
-
- @SuppressWarnings("unchecked")
- protected List<List<T>> orderedTuples() {
- return listOf(
- listOf(
- newWithCode(null),
- newWithCode("ABC"),
- newWithCode("ABC"),
- newWithCode("DEF")));
- }
-
- private T newWithCode(String reference) {
- final T wr = newWithCode();
- wr.setCode(reference);
- return wr;
- }
-
- private T newWithCode() {
- try {
- return cls.newInstance();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTestAbstract_compareTo.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTestAbstract_compareTo.java
deleted file mode 100644
index b998867570..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTestAbstract_compareTo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Map;
-
-import org.junit.Test;
-
-public abstract class ComparableByDescriptionContractTestAbstract_compareTo {
-
- protected final Iterable<Class<? extends WithDescriptionComparable<?>>> candidates;
- protected Map<Class<?>, Class<?>> noninstantiableSubstitutes;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(WithDescriptionComparable.class);}
- */
- public ComparableByDescriptionContractTestAbstract_compareTo(
- Iterable<Class<? extends WithDescriptionComparable<?>>> candidates,
- Map<Class<?>, Class<?>> noninstantiableSubstitutes) {
- this.candidates = candidates;
- this.noninstantiableSubstitutes = noninstantiableSubstitutes;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Test
- public void searchAndTest() {
- for (Class<? extends WithDescriptionComparable> subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
- subtype = instantiable(subtype);
- test(subtype);
- }
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- private Class<? extends WithDescriptionComparable> instantiable(Class<? extends WithDescriptionComparable> cls) {
- final Class<?> substitute = noninstantiableSubstitutes.get(cls);
- return (Class<? extends WithDescriptionComparable>) (substitute!=null?substitute:cls);
- }
-
- private <T extends WithDescriptionComparable<T>> void test(Class<T> cls) {
- new ComparableByDescriptionContractTester<>(cls).test();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTester.java
deleted file mode 100644
index 07e1e207ba..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByDescriptionContractTester.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.testing.unittestsupport.applib.dom.comparable.ComparableContractTester;
-
-public class ComparableByDescriptionContractTester<T extends WithDescriptionComparable<T>> {
- protected final Class<T> cls;
-
- public ComparableByDescriptionContractTester(Class<T> cls) {
- this.cls = cls;
- }
-
- public static <E> List<E> listOf(E... elements) {
- return _Lists.of(elements);
- }
-
- public void test() {
- System.out.println("ComparableByDescriptionContractTester: " + cls.getName());
- new ComparableContractTester<>(orderedTuples()).test();
-
- testToString();
- }
-
- protected void testToString() {
- final String str = "ABC";
-
- final T withDescription = newWithDescription(str);
- String expectedToString = "";//MoreObjects.toStringHelper(withDescription).add("description", "ABC").toString();
-
- assertThat(withDescription.toString(), is(expectedToString));
- }
-
- @SuppressWarnings("unchecked")
- protected List<List<T>> orderedTuples() {
- return listOf(
- listOf(
- newWithDescription(null),
- newWithDescription("ABC"),
- newWithDescription("ABC"),
- newWithDescription("DEF")));
- }
-
- private T newWithDescription(String reference) {
- final T wr = newWithDescription();
- wr.setDescription(reference);
- return wr;
- }
-
- private T newWithDescription() {
- try {
- return cls.newInstance();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTestAbstract_compareTo.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTestAbstract_compareTo.java
deleted file mode 100644
index af32ec295c..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTestAbstract_compareTo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Map;
-
-import org.junit.Test;
-
-public abstract class ComparableByNameContractTestAbstract_compareTo {
- protected final Iterable<Class<? extends WithNameComparable>> candidates;
- protected Map<Class<?>, Class<?>> noninstantiableSubstitutes;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(WithNameComparable.class);}
- */
- public ComparableByNameContractTestAbstract_compareTo(
- Iterable<Class<? extends WithNameComparable>> candidates,
- Map<Class<?>, Class<?>> noninstantiableSubstitutes) {
- this.candidates = candidates;
- this.noninstantiableSubstitutes = noninstantiableSubstitutes;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Test
- public void searchAndTest() {
-
- for (Class<? extends WithNameComparable> subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
- subtype = instantiable(subtype);
- test(subtype);
- }
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- private Class<? extends WithNameComparable> instantiable(Class<? extends WithNameComparable> cls) {
- final Class<?> substitute = noninstantiableSubstitutes.get(cls);
- return (Class<? extends WithNameComparable>) (substitute!=null?substitute:cls);
- }
-
- private <T extends WithNameComparable<T>> void test(Class<T> cls) {
- new ComparableByNameContractTester<>(cls).test();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTester.java
deleted file mode 100644
index eae45f42f3..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByNameContractTester.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.testing.unittestsupport.applib.dom.comparable.ComparableContractTester;
-
-
-public class ComparableByNameContractTester<T extends WithNameComparable<T>> {
- protected final Class<T> cls;
-
- public ComparableByNameContractTester(Class<T> cls) {
- this.cls = cls;
- }
-
- public static <E> List<E> listOf(E... elements) {
- return _Lists.of(elements);
- }
-
- public void test() {
- System.out.println("ComparableByNameContractTester: " + cls.getName());
- new ComparableContractTester<>(orderedTuples()).test();
-
- testToString();
-
- }
-
- protected void testToString() {
- final String str = "ABC";
-
- final T withName = newWithName(str);
- String expectedToString = "";//MoreObjects.toStringHelper(withName).add("name", "ABC").toString();
-
- assertThat(withName.toString(), is(expectedToString));
- }
-
- @SuppressWarnings("unchecked")
- protected List<List<T>> orderedTuples() {
- return listOf(
- listOf(
- newWithName(null),
- newWithName("ABC"),
- newWithName("ABC"),
- newWithName("DEF")));
- }
-
- private T newWithName(String reference) {
- final T wr = newWithName();
- wr.setName(reference);
- return wr;
- }
-
- private T newWithName() {
- try {
- return cls.newInstance();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTestAbstract_compareTo.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTestAbstract_compareTo.java
deleted file mode 100644
index 0850a417e8..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTestAbstract_compareTo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Map;
-
-import org.junit.Test;
-
-public abstract class ComparableByReferenceContractTestAbstract_compareTo {
- protected final Iterable<Class<? extends WithReferenceComparable>> candidates;
- protected Map<Class<?>, Class<?>> noninstantiableSubstitutes;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(WithReferenceComparable.class);}
- */
- public ComparableByReferenceContractTestAbstract_compareTo(
- Iterable<Class<? extends WithReferenceComparable>> candidates,
- Map<Class<?>, Class<?>> noninstantiableSubstitutes) {
- this.candidates = candidates;
- this.noninstantiableSubstitutes = noninstantiableSubstitutes;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Test
- public void searchAndTest() {
-
- for (Class<? extends WithReferenceComparable> subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
- subtype = instantiable(subtype);
- test(subtype);
- }
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- private Class<? extends WithReferenceComparable> instantiable(Class<? extends WithReferenceComparable> cls) {
- final Class<?> substitute = noninstantiableSubstitutes.get(cls);
- return (Class<? extends WithReferenceComparable>) (substitute!=null?substitute:cls);
- }
-
- private <T extends WithReferenceComparable<T>> void test(Class<T> cls) {
- new ComparableByReferenceContractTester<>(cls).test();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTester.java
deleted file mode 100644
index b04a7d0d9a..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByReferenceContractTester.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.testing.unittestsupport.applib.dom.comparable.ComparableContractTester;
-
-
-public class ComparableByReferenceContractTester<T extends WithReferenceComparable<T>> {
- protected final Class<T> cls;
-
- public ComparableByReferenceContractTester(Class<T> cls) {
- this.cls = cls;
- }
-
- public static <E> List<E> listOf(E... elements) {
- return _Lists.of(elements);
- }
-
- public void test() {
- System.out.println("ComparableByReferenceContractTester: " + cls.getName());
- new ComparableContractTester<>(orderedTuples()).test();
-
- testToString();
-
- }
-
- protected void testToString() {
- final String str = "ABC";
-
- final T withReference = newWithReference(str);
- String expectedToString = "";//MoreObjects.toStringHelper(withReference).add("reference", "ABC").toString();
-
- assertThat(withReference.toString(), is(expectedToString));
- }
-
- @SuppressWarnings("unchecked")
- protected List<List<T>> orderedTuples() {
- return listOf(
- listOf(
- newWithReference(null),
- newWithReference("ABC"),
- newWithReference("ABC"),
- newWithReference("DEF")));
- }
-
- private T newWithReference(String reference) {
- final T wr = newWithReference();
- wr.setReference(reference);
- return wr;
- }
-
- private T newWithReference() {
- try {
- return cls.newInstance();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTestAbstract_compareTo.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTestAbstract_compareTo.java
deleted file mode 100644
index 4b2b18bd84..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTestAbstract_compareTo.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.Map;
-
-import org.junit.Test;
-
-public abstract class ComparableByTitleContractTestAbstract_compareTo {
- protected final Iterable<Class<? extends WithTitleComparable>> candidates;
- protected Map<Class<?>, Class<?>> noninstantiableSubstitutes;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(WithTitleComparable.class);}
- */
- public ComparableByTitleContractTestAbstract_compareTo(
- Iterable<Class<? extends WithTitleComparable>> candidates,
- Map<Class<?>, Class<?>> noninstantiableSubstitutes) {
- this.candidates = candidates;
- this.noninstantiableSubstitutes = noninstantiableSubstitutes;
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- @Test
- public void searchAndTest() {
-
- for (Class<? extends WithTitleComparable> subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
- subtype = instantiable(subtype);
- test(subtype);
- }
- }
-
- @SuppressWarnings({ "rawtypes", "unchecked" })
- private Class<? extends WithTitleComparable> instantiable(Class<? extends WithTitleComparable> cls) {
- final Class<?> substitute = noninstantiableSubstitutes.get(cls);
- return (Class<? extends WithTitleComparable>) (substitute!=null?substitute:cls);
- }
-
- private <T extends WithTitleComparable<T>> void test(Class<T> cls) {
- new ComparableByTitleContractTester<>(cls).test();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTester.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTester.java
deleted file mode 100644
index 6e1c63c8e3..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/ComparableByTitleContractTester.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.util.List;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.commons.internal.collections._Lists;
-import org.apache.isis.testing.unittestsupport.applib.dom.comparable.ComparableContractTester;
-
-
-public class ComparableByTitleContractTester<T extends WithTitleComparable<T>> {
- protected final Class<T> cls;
-
- public ComparableByTitleContractTester(Class<T> cls) {
- this.cls = cls;
- }
-
- public static <E> List<E> listOf(E... elements) {
- return _Lists.of(elements);
- }
-
- public void test() {
- System.out.println("ComparableByTitleContractTester: " + cls.getName());
- new ComparableContractTester<>(orderedTuples()).test();
-
- testToString();
-
- }
-
- protected void testToString() {
- final String str = "ABC";
-
- final T withTitle = newWithTitle(str);
- String expectedToString = "";//MoreObjects.toStringHelper(withTitle).add("title", "ABC").toString();
-
- assertThat(withTitle.toString(), is(expectedToString));
- }
-
- @SuppressWarnings("unchecked")
- protected List<List<T>> orderedTuples() {
- return listOf(
- listOf(
- newWithTitle(null),
- newWithTitle("ABC"),
- newWithTitle("ABC"),
- newWithTitle("DEF")));
- }
-
- private T newWithTitle(String reference) {
- final T wr = newWithTitle();
- wr.setTitle(reference);
- return wr;
- }
-
- private T newWithTitle() {
- try {
- return cls.newInstance();
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/StaticHelperClassesContractTest_privateConstructor.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/StaticHelperClassesContractTest_privateConstructor.java
deleted file mode 100644
index 940a5a7113..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/StaticHelperClassesContractTest_privateConstructor.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.junit.Test;
-
-import org.apache.isis.subdomains.base.applib.testing.PrivateConstructorTester;
-
-public class StaticHelperClassesContractTest_privateConstructor {
-
- @Test
- public void cover() throws Exception {
- exercise(WithCodeGetter.ToString.class);
- exercise(WithDescriptionGetter.ToString.class);
- exercise(WithNameGetter.ToString.class);
- exercise(WithReferenceGetter.ToString.class);
- exercise(WithTitleGetter.ToString.class);
- }
-
- private static void exercise(final Class<?> cls) throws Exception {
- new PrivateConstructorTester(cls).exercise();
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithFieldUniqueContractTestAllAbstract.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithFieldUniqueContractTestAllAbstract.java
deleted file mode 100644
index e5fce9b052..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithFieldUniqueContractTestAllAbstract.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import java.lang.annotation.Annotation;
-
-import javax.jdo.annotations.Unique;
-import javax.jdo.annotations.Uniques;
-
-import org.junit.Assert;
-import org.junit.Test;
-
-public abstract class WithFieldUniqueContractTestAllAbstract<T> {
- protected final Iterable<Class<? extends T>> candidates;
- protected final Class<T> interfaceType;
- protected final String fieldName;
-
- /**
- * @apiNote Usage example:<br>
- * {@code import org.reflections.Reflections;}<br>
- * {@code val reflections = new Reflections(packagePrefix);}<br>
- * {@code val candidates = reflections.getSubTypesOf(interfaceType);}
- */
- public WithFieldUniqueContractTestAllAbstract(
- Iterable<Class<? extends T>> candidates,
- String fieldName,
- Class<T> interfaceType) {
- this.candidates = candidates;
- this.fieldName = fieldName;
- this.interfaceType = interfaceType;
- }
-
- private static <T> boolean declaresUniquenesForField(final Class<? extends T> subtype, final Unique unique, String fieldName) {
- final String[] members = unique.members();
- return members != null && members.length == 1 && members[0].equals(fieldName);
- }
-
- @Test
- public void searchAndTest() {
-
- final StringBuilder buf = new StringBuilder();
-
- checkClass:
- for (final Class<? extends T> subtype : candidates) {
- if(subtype.isInterface() || subtype.isAnonymousClass() || subtype.isLocalClass() || subtype.isMemberClass()) {
- // skip (probably a testing class)
- continue;
- }
-
- try {
- subtype.getDeclaredField(fieldName);
- } catch (NoSuchFieldException e) {
- // assume inherited field, so skip.
- continue;
- }
-
- final Annotation[] annotations = subtype.getAnnotations();
-
- // @Unique(...)
- for (Annotation annotation : annotations) {
- if(annotation instanceof Unique) {
- final Unique unique = (Unique) annotation;
- if(declaresUniquenesForField(subtype, unique, fieldName)) {
- continue checkClass;
- }
- }
- }
-
- // @Uniques({ @Unique(...), @Unique(...), ... })
- for (Annotation annotation : annotations) {
- if(annotation instanceof Uniques) {
- Uniques uniques = (Uniques) annotation;
- for (Unique unique : uniques.value()) {
- if(declaresUniquenesForField(subtype, unique, fieldName)) {
- continue checkClass;
- }
- }
- }
- }
-
- buf.append("\n" + subtype.getName() + " is not annotated with @Unique(members={\"" + fieldName + "\"})");
- }
- if(buf.length() > 0) {
- Assert.fail(buf.toString());
- }
- }
-}
diff --git a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutableContractTestAbstract_changeDates.java b/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutableContractTestAbstract_changeDates.java
deleted file mode 100644
index 1905529f91..0000000000
--- a/subdomains/base/applib/src/test/java/org/apache/isis/subdomains/base/applib/with/WithIntervalMutableContractTestAbstract_changeDates.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.subdomains.base.applib.with;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.joda.time.LocalDate;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-import org.apache.isis.testing.unittestsupport.applib.jmocking.JUnitRuleMockery2;
-
-public abstract class WithIntervalMutableContractTestAbstract_changeDates<T extends WithIntervalMutable<T>> {
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(JUnitRuleMockery2.Mode.INTERFACES_AND_CLASSES);
- protected T withIntervalMutable;
- @Mock
- private WithIntervalMutable.Helper<T> mockChangeDates;
-
- @Before
- public void setUpWithIntervalMutable() throws Exception {
- withIntervalMutable = doCreateWithIntervalMutable(mockChangeDates);
- }
-
- protected abstract T doCreateWithIntervalMutable(WithIntervalMutable.Helper<T> mockChangeDates);
-
- @Test
- public void default0ChangeDates() {
- final LocalDate localDate = new LocalDate(2013,7,1);
- context.checking(new Expectations() {
- {
- oneOf(mockChangeDates).default0ChangeDates();
- will(returnValue(localDate));
- }
- });
- assertThat(withIntervalMutable.default0ChangeDates(), is(localDate));
- }
-
- @Test
- public void default1ChangeDates() {
- final LocalDate localDate = new LocalDate(2013,7,1);
- context.checking(new Expectations() {
- {
- oneOf(mockChangeDates).default1ChangeDates();
- will(returnValue(localDate));
- }
- });
- assertThat(withIntervalMutable.default1ChangeDates(), is(localDate));
- }
-
- @Test
- public void validateChangeDates() {
- final LocalDate startDate = new LocalDate(2013,4,1);
- final LocalDate endDate = new LocalDate(2013,7,1);
- final String reason = "xxx";
- context.checking(new Expectations() {
- {
- oneOf(mockChangeDates).validateChangeDates(startDate, endDate);
- will(returnValue(reason));
- }
- });
- assertThat(withIntervalMutable.validateChangeDates(startDate, endDate), is(reason));
- }
-}
diff --git a/subdomains/base/pom.xml b/subdomains/base/pom.xml
deleted file mode 100644
index c559811b30..0000000000
--- a/subdomains/base/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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 information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<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/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.subdomains</groupId>
- <artifactId>isis-subdomains</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-subdomains-base</artifactId>
-
- <name>Apache Isis Sub - Base (parent)</name>
- <description>
- A module providing Base utilities for other subdomain modules
- </description>
-
- <packaging>pom</packaging>
-
- <modules>
- <module>applib</module>
- </modules>
-
-</project>
diff --git a/subdomains/pom.xml b/subdomains/pom.xml
index e08b0b9879..91cb5118c7 100644
--- a/subdomains/pom.xml
+++ b/subdomains/pom.xml
@@ -62,12 +62,6 @@
<dependencyManagement>
<dependencies>
- <dependency>
- <groupId>org.apache.isis.subdomains</groupId>
- <artifactId>isis-subdomains-base-applib</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </dependency>
-
<dependency>
<groupId>org.apache.isis.subdomains</groupId>
<artifactId>isis-subdomains-excel-applib</artifactId>