prepare for merging doc into mono-repository

This commit is contained in:
2021-03-25 17:06:29 +01:00
parent daec8c892c
commit d9759024ef
68 changed files with 0 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -0,0 +1,82 @@
@startuml
actor User
participant Controller
participant ExportFormType as eft
participant ExportManager as em
participant SelectedExport as se
participant AggregatorFormType as aft
collections aggregators as a
participant FilterFormType as fft
collections filters as f
User -> Controller: request "/exports/new/<id of the export>?step=export"
activate Controller
Controller -> eft: build the form (AbstractType::buildForm)
activate eft
eft -> em: get the export
activate em
em -> eft: return the SelectedExport
deactivate em
eft -> se: get the Export Type
activate se
se -> eft: return the export Type (a string)
deactivate se
eft -> aft: build the subform 'aggregators'
activate aft
aft -> em: get aggregators for this export type
activate em
em -> aft: return a collection of aggregators
deactivate em
loop for each aggregator
aft -> a: build eventual subform for the aggregator
activate a
a -> a: append enventually his form
a -> aft
deactivate a
end
aft -> eft
deactivate aft
eft -> fft: build the subform 'filters'
activate fft
fft -> em: get filters for this export type
activate em
em -> fft: return a collection for filters
deactivate em
loop for each filter
fft -> f: build eventual subform for the filter
activate f
f -> f: append eventually his form
f -> fft
deactivate f
end
fft -> eft
deactivate fft
eft -> se: build eventual subform for the export itsefl
activate se
se -> se: append eventually his form
se -> eft
deactivate se
se -> Controller: return a well-build form
deactivate se
Controller -> User: render the page with the form
deactivate Controller
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

View File

@@ -0,0 +1,164 @@
@startuml
participant Controller
participant ExportManager as em
participant SelectedExport as se
participant Formatter as f
collections aggregators as aa
collections filters as ff
activate Controller
Controller -> em: ExportManager::generate(string 'export_alias', Centers[], $data, $formatterdata)
activate em
note left
$data contains the data
from the export form
(export form + aggregators form +
filters forms)
end note
em -> se: Export::initiateQuery($modifiers, $acl, $data)
activate se
note left
$modifiers contains the selected modifiers
and their data. Usually you can ignore this.
$acl contains the list of selected centers. The
export must check that the user has the right
to compute the export for this center
$data the data from the export form (if the export
build a form with `buildForm` function
end note
create Query as q
se -> q: the export will create a query
se -> em: return the query
deactivate se
alt The query is a "native sql query"
note over em, se
When the export create a native query, there aren't any filters
or aggregators which can alter the query.
We immediatly get the results from the query.
end note
else "The query is a query builder"
note over em, se
As the query is a query builder, filters and formatters
will be able to alter the query.
end note
loop for each filter selected by user
em -> ff: FilterInterface::alterQuery(query, $data)
activate ff
note over em, ff
The filter will alter query, adding his own clause (i.e. WHERE clause). It is
his responsability to avoid removing clauses added by other filters / aggregators.
The ExportManager will also transmit the $data filled by the user (if the
filter has a form) to each filter / aggregator.
end note
ff -> q: append some clauses
deactivate ff
end
loop for each aggregator selected by user
note over em, aa
As of filter, aggregators will append their
own clauses in the query (usually GROUP BY clause).
end note
em -> aa: AggregatorInterface::alterQuery(query, data)
activate aa
aa -> q: append some clauses
deactivate aa
end
end alt
note over se
The query is now ready. We will fetch the results from databases.
The Export is responsible for getting the results
end note
em -> se: Export::getResult(query, $data)
activate se
se -> q: getResult()
activate q
q -> se: return result
destroy q
se -> em: return result
deactivate se
em -> f: FormatterInterface::getResponse()
activate f
note over f, ff
The formatter will ask the export, and each aggregators the keys they
are responsible for.
Then, for each of those keys, he will ask to each participant
(Export or aggregator) a Closure, which will render the value in
results into a human readable string.
end note
f -> se: getQueryKeys
activate se
se -> f: return string[]
loop for each keys the export is responsible for
f -> se: ExportInterface::getLabel()
create "closure for key export" as closuree
se -> closuree: create a closure
se -> f: return closure
end
loop for each aggregator
f -> aa: getQueryKeys()
activate aa
aa -> f: return string[]
deactivate aa
loop for each keys the aggregator is responsible for
f -> aa: getLabel()
activate aa
create "closure for key aggregators" as closureg
aa -> closureg: create a closure
aa -> f: return closure
deactivate aa
end
end
loop over results
note over f, closureg
Each row in result will be transformed in a human readable format by the closure.
The human readable string will be appended by the Formatter in his response (a Spreadsheet, CSV file, ...)
end note
f -> closuree: call
activate closuree
closuree -> f: return a human readable format for this value
deactivate closuree
f -> closureg: call
activate closureg
closureg -> f: return a human readable format for the value
deactivate g
f -> f: append the result in his response
end
f -> em: return a Response
deactivate f
em -> Controller: return a Response
deactivate em
deactivate Controller
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1,20 @@
@startuml
actor "controller, service, ..." as x
participant "paginator"
participant "Request"
x -> paginator: getCurrentPage()
activate paginator
paginator -> Request: read the `page` parameter in GET request
activate Request
Request -> paginator
deactivate Request
paginator -> paginator: construct a page object for current page number
paginator -> x: return the `page`
deactivate paginator
@enduml