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 2021/06/10 10:14:26 UTC

[isis] branch ISIS-2442 created (now 2879c04)

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a change to branch ISIS-2442
in repository https://gitbox.apache.org/repos/asf/isis.git.


      at 2879c04  ISIS-2442: adds docs for base subdomain; convert types to meta-annotations

This branch includes the following new commits:

     new 2879c04  ISIS-2442: adds docs for base subdomain; convert types to meta-annotations

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[isis] 01/01: ISIS-2442: adds docs for base subdomain; convert types to meta-annotations

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2442
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 2879c04a31cc1582aee2c2a2485a22f7b4a84f84
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Thu Jun 10 11:13:25 2021 +0100

    ISIS-2442: adds docs for base subdomain; convert types to meta-annotations
---
 .../adoc/modules/secman/pages/setting-up.adoc      |  16 +--
 .../setup-and-configure-dependencyManagement.adoc  |   2 +-
 subdomains/base/adoc/modules/base/pages/about.adoc | 152 ++++++++++++++++++++-
 .../applib/services/calendar/CalendarService.java  |  33 +++--
 .../{DescriptionType.java => Description.java}     |  31 +++--
 .../base/applib/types/{FqcnType.java => Fqcn.java} |  25 ++--
 .../applib/types/{NameType.java => Money.java}     |  25 ++--
 .../applib/types/{MoneyType.java => Name.java}     |  25 ++--
 .../types/{DescriptionType.java => Notes.java}     |  32 +++--
 .../subdomains/base/applib/types/NotesType.java    |  36 -----
 ...{DescriptionType.java => ObjectIdentifier.java} |  27 ++--
 .../base/applib/types/ObjectIdentifierType.java    |  36 -----
 .../{DescriptionType.java => Percentage.java}      |  24 ++--
 .../base/applib/types/PercentageType.java          |  36 -----
 .../{DescriptionType.java => ProperName.java}      |  26 ++--
 .../base/applib/types/ProperNameType.java          |  36 -----
 .../subdomains/base/applib/types/Reference.java    |  47 +++++++
 .../base/applib/types/ReferenceType.java           |  39 ------
 .../types/{DescriptionType.java => Title.java}     |  26 ++--
 .../subdomains/base/applib/types/TitleType.java    |  34 -----
 .../{DescriptionType.java => UrlTemplate.java}     |  26 ++--
 .../base/applib/types/UrlTemplateType.java         |  34 -----
 .../subdomains/base/applib/types/UserNameType.java |  34 -----
 .../types/{DescriptionType.java => Username.java}  |  26 ++--
 .../isis/subdomains/base/applib/types/XxxType.java |  34 -----
 .../base/applib/valuetypes/LocalDateInterval.java  |   1 -
 26 files changed, 410 insertions(+), 453 deletions(-)

diff --git a/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc b/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc
index 2c3d762..6498f9b 100644
--- a/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc
+++ b/extensions/security/secman/adoc/modules/secman/pages/setting-up.adoc
@@ -40,14 +40,14 @@ In the webapp module of your application, add the following dependency:
 .pom.xml
 ----
 <dependencies>
-        <dependency>
-            <groupId>org.apache.isis.extensions</groupId>
-            <artifactId>isis-extensions-secman-persistence-XXX</artifactId> <!--.-->
-        </dependency>
-        <dependency>
-            <groupId>org.apache.isis.extensions</groupId>
-            <artifactId>isis-extensions-secman-encryption-jbcrypt</artifactId> <!--.-->
-        </dependency>
+    <dependency>
+        <groupId>org.apache.isis.extensions</groupId>
+        <artifactId>isis-extensions-secman-persistence-XXX</artifactId>    <!--.-->
+    </dependency>
+    <dependency>
+        <groupId>org.apache.isis.extensions</groupId>
+        <artifactId>isis-extensions-secman-encryption-jbcrypt</artifactId> <!--.-->
+    </dependency>
 </dependencies>
 ----
 <.> specify either `isis-extensions-secman-persistence-jpa` or `isis-extensions-secman-persistence-jdo`, as required
diff --git a/mavendeps/adoc/modules/mavendeps/partials/setup-and-configure-dependencyManagement.adoc b/mavendeps/adoc/modules/mavendeps/partials/setup-and-configure-dependencyManagement.adoc
index a3737e7..c09f781 100644
--- a/mavendeps/adoc/modules/mavendeps/partials/setup-and-configure-dependencyManagement.adoc
+++ b/mavendeps/adoc/modules/mavendeps/partials/setup-and-configure-dependencyManagement.adoc
@@ -5,7 +5,7 @@
 
 
 
-If your application inherits from the Apache Isis starter app (`org.apache.isis.app:isis-app-starter-parent` then that will define the version automatically:
+If your application inherits from the Apache Isis starter app (`org.apache.isis.app:isis-app-starter-parent`) then that will define the version automatically:
 
 [source,xml,subs="attributes+"]
 .pom.xml
diff --git a/subdomains/base/adoc/modules/base/pages/about.adoc b/subdomains/base/adoc/modules/base/pages/about.adoc
index 00c83c4..5a1f449 100644
--- a/subdomains/base/adoc/modules/base/pages/about.adoc
+++ b/subdomains/base/adoc/modules/base/pages/about.adoc
@@ -1,5 +1,153 @@
-= Base Library
+= 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 [...]
 
-WARNING: TODO
+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):
++
+:chk: icon:check[]
++
+[cols="2a,^2a,^2a,^2a",options="header"]
+|===
+|With
+| Getter
+| Comparable
+| Unique
+
+| Code
+| xref:refguide:subdomains:index/base/applib/with/WithCodeGetter.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithCodeComparable.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithCodeUnique.adoc[{chk}]
+
+| Description
+| xref:refguide:subdomains:index/base/applib/with/WithDescriptionGetter.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithDescriptionComparable.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithDescriptionUnique.adoc[{chk}]
+
+| Name
+| xref:refguide:subdomains:index/base/applib/with/WithNameGetter.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithNameComparable.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithNameUnique.adoc[{chk}]
+
+| Reference
+| xref:refguide:subdomains:index/base/applib/with/WithReferenceGetter.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithReferenceComparable.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithReferenceUnique.adoc[{chk}]
+
+| Title
+| xref:refguide:subdomains:index/base/applib/with/WithTitleGetter.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithTitleComparable.adoc[{chk}]
+| xref:refguide:subdomains:index/base/applib/with/WithTitleUnique.adoc[{chk}]
+
+
+|===
+
+** 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/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
index 48a2455..201ea6b 100644
--- 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
@@ -32,6 +32,8 @@ import org.springframework.stereotype.Service;
 import org.apache.isis.applib.annotation.OrderPrecedence;
 import org.apache.isis.applib.services.clock.ClockService;
 
+import lombok.RequiredArgsConstructor;
+
 /**
  * @since 2.0 {@index}
  */
@@ -40,17 +42,16 @@ import org.apache.isis.applib.services.clock.ClockService;
 @Order(OrderPrecedence.MIDPOINT)
 @Primary
 @Qualifier("Default")
+@RequiredArgsConstructor(onConstructor_ = {@Inject})
 public class CalendarService {
 
     private static final int MONTHS_IN_QUARTER = 3;
 
-    private ClockService clockService;
-
-    @Inject
-    public CalendarService(ClockService clockService) {
-        this.clockService = clockService;
-    }
+    private final ClockService clockService;
 
+    /**
+     * Returns the date corresponding to the beginning of the current month.
+     */
     public LocalDate beginningOfMonth() {
         return beginningOfMonth(nowAsLocalDate());
     }
@@ -60,10 +61,21 @@ public class CalendarService {
         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()
+     */
     public LocalDate beginningOfQuarter() {
         return beginningOfQuarter(nowAsLocalDate());
     }
 
+    /**
+     * Returns the date corresponding to the beginning of the quarter following this one.
+     *
+     * @see #beginningOfQuarter()
+     */
     public LocalDate beginningOfNextQuarter() {
         return beginningOfQuarter(nowAsLocalDate().plusMonths(3));
     }
@@ -81,13 +93,4 @@ public class CalendarService {
         return clockService.getClock().localDate(ZoneId.systemDefault());
     }
 
-    /**
-     * @deprecated - use {@link ClockService#getClock()}.getEpochMillis()
-     */
-    @Deprecated
-    public long timestamp() {
-        return clockService.getClock().getEpochMillis();
-    }
-
-
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java
similarity index 50%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java
index 2c08e75..96aeb62 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Description.java
@@ -18,20 +18,31 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+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
+ * description of some sort.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = Description.MAX_LEN)
+@PropertyLayout(multiLine = Description.MULTI_LINE)
+@Parameter(maxLength = Description.MAX_LEN)
+@ParameterLayout(multiLine = Description.MULTI_LINE)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Description {
 
-    }
+    int MAX_LEN = 254;
+    int MULTI_LINE = 5;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/FqcnType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java
similarity index 59%
rename from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/FqcnType.java
rename to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java
index f91a4ea..aa6ecd2 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/FqcnType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Fqcn.java
@@ -18,19 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing a
+ * fully qualified class name
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class FqcnType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
+@Property(maxLength = Fqcn.MAX_LEN)
+@Parameter(maxLength = Fqcn.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Fqcn {
 
-    }
+    int MAX_LEN = 254;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NameType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java
similarity index 59%
rename from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NameType.java
rename to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java
index bdea9bf..6b82993 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NameType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Money.java
@@ -18,19 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link java.math.BigDecimal} property or parameter
+ * representing a monetary amount.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class NameType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 50;
+@Property(maxLength = Fqcn.MAX_LEN)
+@Parameter(maxLength = Fqcn.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Money {
 
-    }
+    int SCALE = 2;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/MoneyType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java
similarity index 59%
rename from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/MoneyType.java
rename to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java
index 42e2490..9e24e98 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/MoneyType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Name.java
@@ -18,19 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing a
+ * name of some sort.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class MoneyType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int SCALE = 2;
+@Property(maxLength = Name.MAX_LEN)
+@Parameter(maxLength = Name.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Name {
 
-    }
+    int MAX_LEN = 50;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java
similarity index 51%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java
index 2c08e75..00ea7ba 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Notes.java
@@ -18,20 +18,32 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+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
+ * notes or comments about some object.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = Notes.MAX_LEN)
+@PropertyLayout(multiLine = Notes.MULTI_LINE)
+@Parameter(maxLength = Notes.MAX_LEN)
+@ParameterLayout(multiLine = Notes.MULTI_LINE)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Notes {
 
-    }
+    int MAX_LEN = 4000;
+    int MULTI_LINE = 10;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NotesType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NotesType.java
deleted file mode 100644
index db77526..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/NotesType.java
+++ /dev/null
@@ -1,36 +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 lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class NotesType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 4000;
-
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java
similarity index 56%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java
index 2c08e75..2b40374 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifier.java
@@ -18,20 +18,27 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing a
+ * the identity of a domain object (with respect to its logical type).
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = ObjectIdentifier.MAX_LEN)
+@Parameter(maxLength = ObjectIdentifier.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ObjectIdentifier {
 
-    }
+    int MAX_LEN = 50;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifierType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifierType.java
deleted file mode 100644
index 4abf1e1..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ObjectIdentifierType.java
+++ /dev/null
@@ -1,36 +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 lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class ObjectIdentifierType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 20;
-
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java
similarity index 60%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java
index 2c08e75..83b06cc 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Percentage.java
@@ -18,20 +18,24 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a numeric property or parameter representing a
+ * the identity of a domain object (with respect to its logical type).
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Percentage {
 
-    }
+    int SCALE = 2;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PercentageType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PercentageType.java
deleted file mode 100644
index 5280f44..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/PercentageType.java
+++ /dev/null
@@ -1,36 +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 lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class PercentageType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int SCALE = 2;
-
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java
similarity index 57%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java
index 2c08e75..85d698b 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperName.java
@@ -18,20 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing the
+ * &quot;proper&quot; (or formal) name of some sort.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = ProperName.MAX_LEN)
+@Parameter(maxLength = ProperName.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ProperName {
 
-    }
+    int MAX_LEN = 50;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperNameType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperNameType.java
deleted file mode 100644
index 08ef75b..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ProperNameType.java
+++ /dev/null
@@ -1,36 +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 lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class ProperNameType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 50;
-
-    }
-
-}
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
new file mode 100644
index 0000000..7f73ce8
--- /dev/null
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Reference.java
@@ -0,0 +1,47 @@
+/*
+ *  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.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
+
+/**
+ * Meta-annotation for a {@link String} property or parameter representing A
+ * unique reference code of some sort.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(maxLength = Reference.MAX_LEN, regexPattern = Reference.REGEX, regexPatternReplacement = Reference.REGEX_DESCRIPTION)
+@Parameter(maxLength = Reference.MAX_LEN, regexPattern = Reference.REGEX, regexPatternReplacement = Reference.REGEX_DESCRIPTION)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Reference {
+
+    int MAX_LEN = 24;
+
+    String REGEX = "[ -/_A-Z0-9]+";
+    String REGEX_DESCRIPTION = "Only capital letters, numbers and 3 symbols being: \"_\" , \"-\" and \"/\" are allowed";
+
+}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ReferenceType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ReferenceType.java
deleted file mode 100644
index 25a0656..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/ReferenceType.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.types;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class ReferenceType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 24;
-
-        public static final String REGEX = "[ -/_A-Z0-9]+";
-        public static final String REGEX_DESCRIPTION = "Only capital letters, numbers and 3 symbols being: \"_\" , \"-\" and \"/\" are allowed";
-
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java
similarity index 58%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java
index 2c08e75..83e12cd 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Title.java
@@ -18,20 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing a
+ * title (or perhaps label) of some sort.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = Title.MAX_LEN)
+@Parameter(maxLength = Title.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Title {
 
-    }
+    int MAX_LEN = 50;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/TitleType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/TitleType.java
deleted file mode 100644
index 4e27d1b..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/TitleType.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.types;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class TitleType {
-
-    @UtilityClass
-    public static class Meta {
-        public static final int MAX_LEN = 50;
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java
similarity index 55%
copy from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
copy to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java
index 2c08e75..730dc51 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplate.java
@@ -18,20 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@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}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = UrlTemplate.MAX_LEN)
+@Parameter(maxLength = UrlTemplate.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface UrlTemplate {
 
-    }
+    int MAX_LEN = 254;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplateType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplateType.java
deleted file mode 100644
index f350eb9..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UrlTemplateType.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.types;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class UrlTemplateType {
-
-    @UtilityClass
-    public static class Meta {
-        public static final int MAX_LEN = 254;
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UserNameType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UserNameType.java
deleted file mode 100644
index c19b026..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/UserNameType.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.types;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class UserNameType {
-
-    @UtilityClass
-    public static class Meta {
-        public static final int MAX_LEN = 50;
-    }
-
-}
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java
similarity index 57%
rename from subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
rename to subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java
index 2c08e75..97fcf11 100644
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/DescriptionType.java
+++ b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/Username.java
@@ -18,20 +18,26 @@
  */
 package org.apache.isis.subdomains.base.applib.types;
 
-import lombok.experimental.UtilityClass;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.Property;
 
 /**
+ * Meta-annotation for a {@link String} property or parameter representing the
+ * unique username (or login name) of a user of the system.
+ *
  * @since 2.0 {@index}
  */
-@UtilityClass
-public class DescriptionType {
-
-    @UtilityClass
-    public static class Meta {
-
-        public static final int MAX_LEN = 254;
-        public static final int MULTI_LINE = 5;
+@Property(maxLength = Username.MAX_LEN)
+@Parameter(maxLength = Username.MAX_LEN)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Username {
 
-    }
+    int MAX_LEN = 120;
 
 }
diff --git a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/XxxType.java b/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/XxxType.java
deleted file mode 100644
index c11108e..0000000
--- a/subdomains/base/applib/src/main/java/org/apache/isis/subdomains/base/applib/types/XxxType.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.types;
-
-import lombok.experimental.UtilityClass;
-
-/**
- * @since 2.0 {@index}
- */
-@UtilityClass
-public class XxxType {
-
-    @UtilityClass
-    public static class Meta {
-
-    }
-
-}
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
index 44a468d..3a25aff 100644
--- 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
@@ -36,7 +36,6 @@ public class LocalDateInterval extends AbstractInterval<LocalDateInterval>{
         return new LocalDateInterval(startDate, endDate, IntervalEnding.INCLUDING_END_DATE);
     }
 
-    // //////////////////////////////////////
 
     public LocalDateInterval() {
     }