From 9939332a5a18cb93f789fe7cc09fe68dd744cea6 Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 9 Jan 2019 15:44:20 +0100
Subject: [PATCH] =?UTF-8?q?[Projekt:=20Entwicklung=20-=20Neon][TicketNr.:?=
 =?UTF-8?q?=201030874][=20Technische=20Doku=20-=20Review=20und=20Erg=C3=A4?=
 =?UTF-8?q?nzen]=20ADDRESS?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 entity/Address_entity/Address_entity.aod               |  9 +++++++--
 entity/Address_entity/documentation.adoc               | 10 ++++++++++
 .../entityfields/addr_type/documentation.adoc          |  4 ++++
 .../defaultaddressid_param/documentation.adoc          |  3 +++
 .../entityfields/is_standard/documentation.adoc        |  3 +++
 .../persorgsaddresses_dfi/documentation.adoc           |  7 +++++++
 .../entityfields/relid_param/documentation.adoc        |  4 ++++
 7 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 entity/Address_entity/documentation.adoc
 create mode 100644 entity/Address_entity/entityfields/addr_type/documentation.adoc
 create mode 100644 entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc
 create mode 100644 entity/Address_entity/entityfields/is_standard/documentation.adoc
 create mode 100644 entity/Address_entity/entityfields/persorgsaddresses_dfi/documentation.adoc
 create mode 100644 entity/Address_entity/entityfields/relid_param/documentation.adoc

diff --git a/entity/Address_entity/Address_entity.aod b/entity/Address_entity/Address_entity.aod
index 6feb8d1d17..014b132b6c 100644
--- a/entity/Address_entity/Address_entity.aod
+++ b/entity/Address_entity/Address_entity.aod
@@ -3,6 +3,7 @@
   <name>Address_entity</name>
   <title>Addresses</title>
   <majorModelMode>DISTRIBUTED</majorModelMode>
+  <documentation>%aditoprj%/entity/Address_entity/documentation.adoc</documentation>
   <titleProcess>%aditoprj%/entity/Address_entity/titleProcess.js</titleProcess>
   <recordContainer>db</recordContainer>
   <entityFields>
@@ -23,6 +24,7 @@
     </entityField>
     <entityField>
       <name>ADDR_TYPE</name>
+      <documentation>%aditoprj%/entity/Address_entity/entityfields/addr_type/documentation.adoc</documentation>
       <title>Addresstype</title>
       <possibleItemsProcess>%aditoprj%/entity/Address_entity/entityfields/addr_type/possibleItemsProcess.js</possibleItemsProcess>
     </entityField>
@@ -96,7 +98,7 @@
     <entityParameter>
       <name>RelId_param</name>
       <expose v="true" />
-      <description>PARAMETER</description>
+      <documentation>%aditoprj%/entity/Address_entity/entityfields/relid_param/documentation.adoc</documentation>
     </entityParameter>
     <entityIncomingField>
       <name>PersAddress_dfi</name>
@@ -126,6 +128,7 @@
     <entityIncomingField>
       <name>PersOrgsAddresses_dfi</name>
       <fieldType>DEPENDENCY_IN</fieldType>
+      <documentation>%aditoprj%/entity/Address_entity/entityfields/persorgsaddresses_dfi/documentation.adoc</documentation>
       <recordContainer>db</recordContainer>
       <dependencies>
         <entityDependency>
@@ -138,6 +141,7 @@
     </entityIncomingField>
     <entityField>
       <name>IS_STANDARD</name>
+      <documentation>%aditoprj%/entity/Address_entity/entityfields/is_standard/documentation.adoc</documentation>
       <contentType>BOOLEAN</contentType>
       <valueProcess>%aditoprj%/entity/Address_entity/entityfields/is_standard/valueProcess.js</valueProcess>
     </entityField>
@@ -145,7 +149,8 @@
       <name>DefaultAddressId_param</name>
       <expose v="true" />
       <triggerRecalculation v="false" />
-      <description>PARAMETER</description>
+      <documentation>%aditoprj%/entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc</documentation>
+      <description>provide a ADDRESSID-value of the standard address (of a RELATION)</description>
     </entityParameter>
   </entityFields>
   <recordContainers>
diff --git a/entity/Address_entity/documentation.adoc b/entity/Address_entity/documentation.adoc
new file mode 100644
index 0000000000..77153fad79
--- /dev/null
+++ b/entity/Address_entity/documentation.adoc
@@ -0,0 +1,10 @@
+Address
+=======
+
+----
+an entity for logic behind a postal address
+----
+
+The entity manages storing postal addresses and provides features like validation.
+
+Every `RELATION` has one standard address value that is used by default for some actions. Keep in mind that this standard address has a special status and therefore may cannot be deleted.
diff --git a/entity/Address_entity/entityfields/addr_type/documentation.adoc b/entity/Address_entity/entityfields/addr_type/documentation.adoc
new file mode 100644
index 0000000000..89006f557f
--- /dev/null
+++ b/entity/Address_entity/entityfields/addr_type/documentation.adoc
@@ -0,0 +1,4 @@
+The `ADDR_TYPE` field represents the type of address (like "shipping address", "private address", etc.)
+
+
+Possible values depend on the type of object it's connect to since a contactperson has different types than a company (organisation).
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc b/entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc
new file mode 100644
index 0000000000..d54b66e0af
--- /dev/null
+++ b/entity/Address_entity/entityfields/defaultaddressid_param/documentation.adoc
@@ -0,0 +1,3 @@
+`ADDRESSID`-value that specifies which ADDRESSID` is the standard addess of a record. [.small]#See: `IS_STANDARD` field#
+
+There is no validation if the provided value is actually the value of an standard address or a valid `ADDRESSID` at all.
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/is_standard/documentation.adoc b/entity/Address_entity/entityfields/is_standard/documentation.adoc
new file mode 100644
index 0000000000..ec3bda82ac
--- /dev/null
+++ b/entity/Address_entity/entityfields/is_standard/documentation.adoc
@@ -0,0 +1,3 @@
+The `IS_STANDARD` field specifies if an ADDRESS is the standard address (see Address_entity documentation)
+
+However that information is not stored directly in the `ADDRESS` database table. Every `RELATION`-record has an own standard address.
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/persorgsaddresses_dfi/documentation.adoc b/entity/Address_entity/entityfields/persorgsaddresses_dfi/documentation.adoc
new file mode 100644
index 0000000000..76be4af806
--- /dev/null
+++ b/entity/Address_entity/entityfields/persorgsaddresses_dfi/documentation.adoc
@@ -0,0 +1,7 @@
+Dependency for an arbitrary address of 
+
+ * `ORG` 
+ * `PERS` 
+
+ 
+ 
\ No newline at end of file
diff --git a/entity/Address_entity/entityfields/relid_param/documentation.adoc b/entity/Address_entity/entityfields/relid_param/documentation.adoc
new file mode 100644
index 0000000000..9be1a63930
--- /dev/null
+++ b/entity/Address_entity/entityfields/relid_param/documentation.adoc
@@ -0,0 +1,4 @@
+`RELATIONID`-value that is associated with
+
+* an existing address (=filtering)
+* an address that shall be created (=inserted)
\ No newline at end of file
-- 
GitLab