Skip to content

Sequence diagrams

Mathea Gjerde edited this page Apr 23, 2026 · 5 revisions

Sequence-diagrams

Some sequence diagrams for the core functionalities of the system

Selecting organizations

Image of Sequence diagram of the process when selecting a organization.

image

The diagram in PlantUML format:

@startuml org-select
title selecting organization

actor User
participant CausesPageView
participant OrganizationController
participant OrganizationService
participant OrganizationRepository
participant AppState
participant NavigationController
participant OrganizationPageView


User -> CausesPageView : choose donation

CausesPageView -> OrganizationController : getOrgById(id)
OrganizationController -> OrganizationService : findByOrgNumber(id)
OrganizationService -> OrganizationRepository : findByOrgNumber(id)
OrganizationRepository --> OrganizationService : Organization
OrganizationService --> OrganizationController : Organization

OrganizationController -> AppState :setCurrentOrganization(org)

OrganizationController -> NavigationController : showOrganizationPage()
NavigationController -> OrganizationPageView : create and show
@enduml

Donating to a selected organization

Image of Sequence diagram of the process when donating to a selected organization. image

The diagram in PlantUML format:

@startuml org-donate
title Donating to a selected organization

actor User
participant OrganizationPageView
participant DonationController
participant DonationService
participant DonationRepository
participant AppState
participant NavigationController
participant PaymentCompletePageView


User -> OrganizationPageView : press donate button

OrganizationPageView -> DonationController : handleDonate()

DonationController -> AppState : getCurrentUser()
AppState --> DonationController : Customer
DonationController -> AppState : getCurrentOrganization()
AppState --> DonationController : Organization
DonationController -> AppState : getCurrentDonationAmount()
AppState --> DonationController : BigDecimal

DonationController -> DonationService : donate(customer, orgId, amount, paymentMethod)
DonationService -> DonationRepository : addContent(donation)

DonationRepository --> DonationService : success
DonationService --> DonationController : success

DonationController -> NavigationController : showPaymentCompletePage()
NavigationController -> PaymentCompletePageView : create and show

@enduml