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/10/02 07:03:47 UTC
[isis-app-demo] tag tags/03-08-add-remaining-PetOwner-properties
created (now 6249707)
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a change to tag tags/03-08-add-remaining-PetOwner-properties
in repository https://gitbox.apache.org/repos/asf/isis-app-demo.git.
at 6249707 (commit)
This tag includes the following new commits:
new 4e8600b adds PhoneNumber meta-annotation
new dd17833 adds EmailAddress meta-annotation
new 6249707 adds phoneNumber and emailAddress to PetOwner
The 3 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-app-demo] 02/03: adds EmailAddress meta-annotation
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to tag tags/03-08-add-remaining-PetOwner-properties
in repository https://gitbox.apache.org/repos/asf/isis-app-demo.git
commit dd17833fe7eb4f6c082bfc5437052ab386370b0a
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Oct 2 08:02:26 2021 +0100
adds EmailAddress meta-annotation
---
.../petclinic/modules/pets/types/EmailAddress.java | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/module-pets/src/main/java/petclinic/modules/pets/types/EmailAddress.java b/module-pets/src/main/java/petclinic/modules/pets/types/EmailAddress.java
new file mode 100644
index 0000000..ad2833e
--- /dev/null
+++ b/module-pets/src/main/java/petclinic/modules/pets/types/EmailAddress.java
@@ -0,0 +1,28 @@
+package petclinic.modules.pets.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.Editing;
+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;
+
+@Property(
+ editing = Editing.ENABLED,
+ maxLength = EmailAddress.MAX_LEN,
+ optionality = Optionality.OPTIONAL
+)
+@PropertyLayout(named = "E-mail")
+@Parameter(maxLength = EmailAddress.MAX_LEN, optionality = Optionality.OPTIONAL)
+@ParameterLayout(named = "E-mail")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EmailAddress {
+
+ int MAX_LEN = 100;
+}
[isis-app-demo] 03/03: adds phoneNumber and emailAddress to PetOwner
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to tag tags/03-08-add-remaining-PetOwner-properties
in repository https://gitbox.apache.org/repos/asf/isis-app-demo.git
commit 624970722431451b2273934d8de99467f859d0dd
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Oct 2 08:03:25 2021 +0100
adds phoneNumber and emailAddress to PetOwner
---
.../petclinic/modules/pets/dom/petowner/PetOwner.java | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
index 11de65e..6ccb3a9 100644
--- a/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
+++ b/module-pets/src/main/java/petclinic/modules/pets/dom/petowner/PetOwner.java
@@ -21,7 +21,6 @@ import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
import org.apache.isis.applib.annotation.DomainObject;
import org.apache.isis.applib.annotation.DomainObjectLayout;
-import org.apache.isis.applib.annotation.PromptStyle;
import org.apache.isis.applib.annotation.Property;
import org.apache.isis.applib.annotation.PropertyLayout;
import org.apache.isis.applib.annotation.Publishing;
@@ -42,9 +41,11 @@ import lombok.Setter;
import lombok.ToString;
import lombok.val;
+import petclinic.modules.pets.types.EmailAddress;
import petclinic.modules.pets.types.FirstName;
import petclinic.modules.pets.types.LastName;
import petclinic.modules.pets.types.Notes;
+import petclinic.modules.pets.types.PhoneNumber;
@Entity
@@ -121,6 +122,18 @@ public class PetOwner implements Comparable<PetOwner> {
@Property(hidden = Where.EVERYWHERE)
private String firstName;
+ @PhoneNumber
+ @Column(length = PhoneNumber.MAX_LEN, nullable = true)
+ @PropertyLayout(fieldSetId = "name", sequence = "1.5")
+ @Getter @Setter
+ private String phoneNumber;
+
+ @EmailAddress
+ @Column(length = EmailAddress.MAX_LEN, nullable = true)
+ @PropertyLayout(fieldSetId = "name", sequence = "1.6")
+ @Getter @Setter
+ private String emailAddress;
+
@Notes
@Column(length = Notes.MAX_LEN, nullable = true)
@Getter @Setter
[isis-app-demo] 01/03: adds PhoneNumber meta-annotation
Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to tag tags/03-08-add-remaining-PetOwner-properties
in repository https://gitbox.apache.org/repos/asf/isis-app-demo.git
commit 4e8600b22181dedfda7b20cfd001476956feee0b
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Sat Oct 2 08:02:13 2021 +0100
adds PhoneNumber meta-annotation
---
.../petclinic/modules/pets/types/PhoneNumber.java | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/module-pets/src/main/java/petclinic/modules/pets/types/PhoneNumber.java b/module-pets/src/main/java/petclinic/modules/pets/types/PhoneNumber.java
new file mode 100644
index 0000000..711fe6f
--- /dev/null
+++ b/module-pets/src/main/java/petclinic/modules/pets/types/PhoneNumber.java
@@ -0,0 +1,26 @@
+package petclinic.modules.pets.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.Editing;
+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;
+
+@Property(
+ editing = Editing.ENABLED,
+ maxLength = PhoneNumber.MAX_LEN,
+ optionality = Optionality.OPTIONAL
+)
+@Parameter(maxLength = PhoneNumber.MAX_LEN, optionality = Optionality.OPTIONAL)
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PhoneNumber {
+
+ int MAX_LEN = 30;
+}