package Ġcc ce v . s 2 . request . app Ċ Ċ import Ġcc ce v . s 2 . request . app . config . Request S 2 Aggregate Ċ import Ġcc ce v . s 2 . request . app . entity . Request Entity Ċ import Ġcc ce v . s 2 . request . domain . Request Aggregate Ċ import Ġcc ce v . s 2 . request . domain . Request State Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Audit Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Evidence Add Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Evidence Remove Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Init Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Initialized Event Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Ref use Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Send Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Sign Command Function Ċ import Ġcc ce v . s 2 . request . domain . features . command . Request Supported Value Add Command Function Ċ import Ġf 2 . dsl . fn c . f 2 Function Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġs 2 . spring . utils . logger . Logger Ċ Ċ @ Service Ċ class ĠRequest Aggregate Service ( Ċ ĉ private Ġval Ġaggregate : ĠRequest S 2 Aggregate , Ċ ): ĠRequest Aggregate Ġ{ Ċ ĉ private Ġval Ġlogger Ġby ĠLogger () ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġinit (): ĠRequest Init Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ aggregate . create With Event ( cmd , Ġ{ ĠRequest Initialized Event ( id Ġ= Ġid ) Ġ}) Ġ{ Ċĉĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġinit ") Ċĉĉ ĉ Request Entity ( Ċĉĉĉ ĉ id Ġ= Ġcmd . id , Ċĉĉĉ ĉ status Ġ= ĠRequest State . Created , Ċĉĉĉ ĉ framework Id Ġ= Ġcmd . framework Id , Ċĉĉĉ ĉ e vid ences Ġ= Ġmutable ListOf (), Ċĉĉĉ ĉ supported Values Ġ= Ġmutable Map Of () Ċĉĉ ĉ ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġadd Evidence (): ĠRequest Evidence Add Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġadd Evidence ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġadd Evidence ( cmd . evidence ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġremove Evidence (): ĠRequest Evidence Remove Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġremove Evidence ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġremove Evidence ( cmd . evidence TypeId ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġadd Supported Value (): ĠRequest Supported Value Add Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġadd Supported Value ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġadd Supported Value ( cmd . supported Value ) Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġsend (): ĠRequest Send Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġsend ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġsend () Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġsign (): ĠRequest Sign Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġsign ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġsign () Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġaudit (): ĠRequest Audit Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġaudit ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġaudit () Ċĉ ĉ } Ċ ĉ } ĊĊ ĉ @ Bean Ċ ĉ override Ġfun Ġref use (): ĠRequest Ref use Command Function Ġ= Ġf 2 Function Ġ{ Ġcmd Ġ-> Ċĉ ĉ logger . info (" Request Ġ[ ${ cmd . id } ]: Ġref use ") Ċĉ ĉ aggregate . do Transition ( cmd ) Ġ{ Ċĉĉ ĉ this Ġto Ġref use () Ċĉ ĉ } Ċ ĉ } Ċ } Ċ