package Ġdev . d res . run . audit Ċ Ċ import Ġdev . d res . data . model . Entity Ċ import Ġdev . d res . data . model . UID Ċ import Ġdev . d res . data . model . submissions . Submission Ċ import Ġdev . d res . data . model . submissions . Submission Status Ċ Ċ enum Ġclass ĠAudit LogEntry Type Ġ{ ĊĊĠĠĠ ĠCOMP ET ITION _ START , ĊĠĠĠ ĠCOMP ET ITION _ END , ĊĠĠĠ ĠTASK _ START , ĊĠĠĠ ĠTASK _ MODI FIED , ĊĠĠĠ ĠTASK _ END , ĊĠĠĠ ĠSUB MISSION , ĊĠĠĠ ĠPRE PARE _ J UD GE MENT , ĊĠĠĠ ĠJ UD GE MENT , ĊĠĠĠ ĠLOGIN , ĊĠĠĠ ĠLOG OUT , ĊĠĠĠ ĠSUB MISSION _ VALIDATION , ĊĠĠĠ ĠSUB MISSION _ STATUS _ OVER WRITE Ċ Ċ } Ċ Ċ enum Ġclass ĠLog EventSource Ġ{ ĊĠĠĠ ĠREST , ĊĠĠĠ ĠCLI , ĊĠĠĠ ĠINTERNAL Ċ } Ċ Ċ sealed Ġclass ĠAudit LogEntry ( val Ġtype : ĠAudit LogEntry Type ): ĠEntity { ĊĊĠĠĠ Ġvar Ġtimestamp : ĠLong Ġ= ĠSystem . currentTimeMillis () ĊĠĠĠĠĠĠĠ Ġinternal Ġset ĊĊ Ċ } Ċ Ċ data Ġclass ĠComp etition Start Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . COMP ET ITION _ START ){ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠComp etition End Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . COMP ET ITION _ END ){ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠTask Start Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġtask Name : ĠString , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . TASK _ START ){ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġtask Name : ĠString , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġtask Name , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠTask Modified Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġtask Name : ĠString , Ġval Ġmodification : ĠString , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . TASK _ MODI FIED ) Ġ{ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġtask Name : ĠString , Ġmodification : ĠString , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġtask Name , Ġmodification , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠTask End Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġtask Name : ĠString , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . TASK _ END ){ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġtask Name : ĠString , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġtask Name , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠSubmission Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġtask Name : ĠString , Ġval Ġsubmission : ĠSubmission , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?, Ġval Ġaddress : ĠString ) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . SUB MISSION ){ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġtask Name : ĠString , Ġsubmission : ĠSubmission , Ġapi : ĠLog EventSource , Ġuser : ĠString ?, Ġaddress : ĠString ): Ġthis ( UID . EMPTY , Ġcompetition , Ġtask Name , Ġsubmission , Ġapi , Ġuser , Ġaddress ) Ċ } Ċ Ċ data Ġclass ĠPrepare J udge ment Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġvalidator : ĠString , Ġval Ġtoken : ĠString , Ġval Ġsubmission : ĠSubmission ) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . PRE PARE _ J UD GE MENT ){ ĊĠĠĠ Ġconstructor ( validator : ĠString , Ġtoken : ĠString , Ġsubmission : ĠSubmission ): Ġthis ( UID . EMPTY , Ġvalidator , Ġtoken , Ġsubmission ) Ċ } Ċ Ċ data Ġclass ĠJ udge ment Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition : ĠUID , Ġval Ġvalidator : ĠString , Ġval Ġtoken : ĠString , Ġval Ġver dict : ĠSubmission Status , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . J UD GE MENT ) Ġ{ ĊĠĠĠ Ġconstructor ( comp etition : ĠUID , Ġvalidator : ĠString , Ġtoken : ĠString , Ġver dict : ĠSubmission Status , Ġapi : ĠLog EventSource , Ġuser : ĠString ?): Ġthis ( UID . EMPTY , Ġcompetition , Ġvalidator , Ġtoken , Ġver dict , Ġapi , Ġuser ) Ċ } Ċ Ċ data Ġclass ĠLogin Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġuser : ĠString , Ġval Ġsession : ĠString , Ġval Ġapi : ĠLog EventSource ) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . LOGIN ) Ġ{ ĊĠĠĠ Ġconstructor ( user : ĠString , Ġsession : ĠString , Ġapi : ĠLog EventSource ): Ġthis ( UID . EMPTY , Ġuser , Ġsession , Ġapi ) Ċ } Ċ Ċ data Ġclass ĠLogout Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġsession : ĠString , Ġval Ġapi : ĠLog EventSource ) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . LOG OUT ) Ġ{ ĊĠĠĠ Ġconstructor ( session : ĠString , Ġapi : ĠLog EventSource ): Ġthis ( UID . EMPTY , Ġsession , Ġapi ) Ċ } Ċ Ċ data Ġclass ĠSubmission Validation Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġsubmission : ĠSubmission , Ġval Ġvalidator Name : ĠString , Ġval Ġstatus : ĠSubmission Status ) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . SUB MISSION _ VALIDATION ) Ġ{ ĊĠĠĠ Ġconstructor ( submission : ĠSubmission , Ġvalidator Name : ĠString , Ġstatus : ĠSubmission Status ) Ġ: Ġthis ( UID . EMPTY , Ġsubmission , Ġvalidator Name , Ġstatus ) Ċ } Ċ Ċ data Ġclass ĠSubmission Status Overwrite Audit LogEntry ( override Ġvar Ġid : ĠUID , Ġval Ġcompetition Run Uid : ĠUID , Ġval Ġsubmission Id : ĠUID , Ġval Ġnew Ver dict : ĠSubmission Status , Ġval Ġapi : ĠLog EventSource , Ġval Ġuser : ĠString ?) Ġ: ĠAudit LogEntry ( Audit LogEntry Type . SUB MISSION _ STATUS _ OVER WRITE ) Ġ{ ĊĠĠĠ Ġconstructor ( comp etition Run Uid : ĠUID , Ġsubmission Id : ĠUID , Ġnew Ver dict : ĠSubmission Status , Ġapi : ĠLog EventSource , Ġuser : ĠString ?) Ġ: Ġthis ( UID . EMPTY , Ġcompetition Run Uid , Ġsubmission Id , Ġnew Ver dict , Ġapi , Ġuser ) Ċ }