~aleteoryx/muditaos

ref: 3ac4bd4935e598da305b77e7dea8af20413ba668 muditaos/module-db/doc/contacts_import.svg -rw-r--r-- 10.9 KiB
3ac4bd49 — Wojtek Rzepecki [EGD-7127] Store imported contacts in DB 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="627px" preserveAspectRatio="none" style="width:658px;height:627px;background:#FFFFFF;" version="1.1" viewBox="0 0 658 627" width="658px" zoomAndPan="magnify"><defs><filter height="300%" id="f12hef58xpqd4m" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><rect fill="#FFFFFF" filter="url(#f12hef58xpqd4m)" height="46.2656" style="stroke:#000000;stroke-width:2.0;" width="397.5" x="243.5" y="431.7578"/><rect fill="#FFFFFF" filter="url(#f12hef58xpqd4m)" height="46.2656" style="stroke:#000000;stroke-width:2.0;" width="397.5" x="243.5" y="492.0234"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="51" x2="51" y1="40.2969" y2="584.4219"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="314.5" x2="314.5" y1="40.2969" y2="584.4219"/><line style="stroke:#A80036;stroke-width:1.0;stroke-dasharray:5.0,5.0;" x1="579" x2="579" y1="40.2969" y2="584.4219"/><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="89" x="5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="75" x="12" y="24.9951">Application</text><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="89" x="5" y="583.4219"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="75" x="12" y="603.417">Application</text><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="118" x="253.5" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="104" x="260.5" y="24.9951">ContactRecord</text><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="118" x="253.5" y="583.4219"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="104" x="260.5" y="603.417">ContactRecord</text><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="99" x="528" y="5"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="85" x="535" y="24.9951">contacts DB</text><rect fill="#FEFECE" filter="url(#f12hef58xpqd4m)" height="30.2969" style="stroke:#A80036;stroke-width:1.5;" width="99" x="528" y="583.4219"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="85" x="535" y="603.417">contacts DB</text><rect fill="#EEEEEE" filter="url(#f12hef58xpqd4m)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="651" x="0" y="70.8633"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="651" y1="70.8633" y2="70.8633"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="651" y1="73.8633" y2="73.8633"/><rect fill="#EEEEEE" filter="url(#f12hef58xpqd4m)" height="23.1328" style="stroke:#000000;stroke-width:2.0;" width="195" x="228" y="60.2969"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="176" x="234" y="76.3638">Checking for duplicates</text><polygon fill="#A80036" points="302.5,125.6953,312.5,129.6953,302.5,133.6953,306.5,129.6953" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="51.5" x2="308.5" y1="129.6953" y2="129.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="113" x="58.5" y="109.4966">contacts to check</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="239" x="58.5" y="124.6294">(query::CheckContactsListDuplicates)</text><polygon fill="#A80036" points="567.5,154.8281,577.5,158.8281,567.5,162.8281,571.5,158.8281" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="573.5" y1="158.8281" y2="158.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="82" x="321.5" y="153.7622">get numbers</text><polygon fill="#A80036" points="325.5,168.8281,315.5,172.8281,325.5,176.8281,321.5,172.8281" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="319.5" x2="578.5" y1="172.8281" y2="172.8281"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="356.5" y1="201.9609" y2="201.9609"/><line style="stroke:#A80036;stroke-width:1.0;" x1="356.5" x2="356.5" y1="201.9609" y2="214.9609"/><line style="stroke:#A80036;stroke-width:1.0;" x1="315.5" x2="356.5" y1="214.9609" y2="214.9609"/><polygon fill="#A80036" points="325.5,210.9609,315.5,214.9609,325.5,218.9609,321.5,214.9609" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="136" x="321.5" y="196.895">numbers comparison</text><polygon fill="#A80036" points="62.5,240.0938,52.5,244.0938,62.5,248.0938,58.5,244.0938" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56.5" x2="313.5" y1="244.0938" y2="244.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="125" x="68.5" y="239.0278">duplicated contacts</text><rect fill="#EEEEEE" filter="url(#f12hef58xpqd4m)" height="3" style="stroke:#EEEEEE;stroke-width:1.0;" width="651" x="0" y="272.6602"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="651" y1="272.6602" y2="272.6602"/><line style="stroke:#000000;stroke-width:1.0;" x1="0" x2="651" y1="275.6602" y2="275.6602"/><rect fill="#EEEEEE" filter="url(#f12hef58xpqd4m)" height="23.1328" style="stroke:#000000;stroke-width:2.0;" width="221" x="215" y="262.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="202" x="221" y="278.1606">Merging contacts list to DB</text><polygon fill="#A80036" points="302.5,327.4922,312.5,331.4922,302.5,335.4922,306.5,331.4922" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="51.5" x2="308.5" y1="331.4922" y2="331.4922"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="118" x="58.5" y="311.2935">contacts to merge</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="173" x="58.5" y="326.4263">(query::MergeContactsList)</text><polygon fill="#A80036" points="567.5,356.625,577.5,360.625,567.5,364.625,571.5,360.625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="573.5" y1="360.625" y2="360.625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="82" x="321.5" y="355.5591">get numbers</text><polygon fill="#A80036" points="325.5,370.625,315.5,374.625,325.5,378.625,321.5,374.625" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="319.5" x2="578.5" y1="374.625" y2="374.625"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="356.5" y1="403.7578" y2="403.7578"/><line style="stroke:#A80036;stroke-width:1.0;" x1="356.5" x2="356.5" y1="403.7578" y2="416.7578"/><line style="stroke:#A80036;stroke-width:1.0;" x1="315.5" x2="356.5" y1="416.7578" y2="416.7578"/><polygon fill="#A80036" points="325.5,412.7578,315.5,416.7578,325.5,420.7578,321.5,416.7578" style="stroke:#A80036;stroke-width:1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="136" x="321.5" y="398.6919">numbers comparison</text><path d="M243.5,431.7578 L422.5,431.7578 L422.5,438.7578 L412.5,448.7578 L243.5,448.7578 L243.5,431.7578 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="46.2656" style="stroke:#000000;stroke-width:2.0;" width="397.5" x="243.5" y="431.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="134" x="258.5" y="444.8247">number not found</text><polygon fill="#A80036" points="567.5,466.0234,577.5,470.0234,567.5,474.0234,571.5,470.0234" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="573.5" y1="470.0234" y2="470.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="77" x="321.5" y="464.9575">Add contact</text><path d="M243.5,492.0234 L436.5,492.0234 L436.5,499.0234 L426.5,509.0234 L243.5,509.0234 L243.5,492.0234 " fill="#EEEEEE" style="stroke:#000000;stroke-width:1.0;"/><rect fill="none" height="46.2656" style="stroke:#000000;stroke-width:2.0;" width="397.5" x="243.5" y="492.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="148" x="258.5" y="505.0903">number found in db</text><polygon fill="#A80036" points="567.5,526.2891,577.5,530.2891,567.5,534.2891,571.5,530.2891" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="314.5" x2="573.5" y1="530.2891" y2="530.2891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="241" x="321.5" y="525.2231">Update contact by overriding old data</text><polygon fill="#A80036" points="62.5,562.4219,52.5,566.4219,62.5,570.4219,58.5,566.4219" style="stroke:#A80036;stroke-width:1.0;"/><line style="stroke:#A80036;stroke-width:1.0;" x1="56.5" x2="313.5" y1="566.4219" y2="566.4219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="103" x="68.5" y="561.356">status response</text><!--MD5=[921bcca0682cb10fe9b051cd54a58a3c]
@startuml

participant "Application" as app
participant "ContactRecord" as rec
participant "contacts DB" as db

== Checking for duplicates ==

app -> rec : contacts to check\n(query::CheckContactsListDuplicates)
rec -> db : get numbers
db -> rec
rec -> rec : numbers comparison
rec -> app : duplicated contacts

== Merging contacts list to DB ==

app -> rec : contacts to merge\n(query::MergeContactsList)
rec -> db : get numbers
db -> rec
rec -> rec : numbers comparison

group number not found
    rec -> db : Add contact
end
group number found in db
    rec -> db : Update contact by overriding old data
end
rec -> app : status response

@enduml

PlantUML version 1.2021.7(Sun May 23 14:40:07 CEST 2021)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Default Encoding: UTF-8
Language: pl
Country: PL
--></g></svg>