/* Ċ Ġ* ĠCopyright Ġ 2 0 1 8 ĠHP ĠDevelopment ĠCompany , ĠL . P . Ċ Ġ* ĠSPDX - License - Identifier : ĠMIT Ċ Ġ*/ Ċ Ċ package Ġcom . hp . k ale xa . core . handler . request handler Ċ Ċ import Ġcom . hp . k ale xa . core . extension . cast Ċ import Ġcom . hp . k ale xa . core . handler . Base Handler Repository Ċ import Ġcom . hp . k ale xa . core . intent . Reminder Events Handler Ċ import Ġcom . hp . k ale xa . core . util . Intent Util Ċ import Ġcom . hp . k ale xa . model . request . Alex a Request Ċ import Ġcom . hp . k ale xa . model . request . event . reminder . Reminder Created Event Request Ċ import Ġcom . hp . k ale xa . model . request . event . reminder . Reminder Deleted Event Request Ċ import Ġcom . hp . k ale xa . model . request . event . reminder . Reminder Started Event Request Ċ import Ġcom . hp . k ale xa . model . request . event . reminder . Reminder Status Changed Event Request Ċ import Ġcom . hp . k ale xa . model . request . event . reminder . Reminder Updated Event Request Ċ import Ġcom . hp . k ale xa . model . response . Alex a Response Ċ import Ġorg . apache . logging . log 4 j . Log Manager Ċ Ċ class ĠDefault Reminder Handler ( repository : ĠBase Handler Repository ) Ġ: ĠRem inder Handler , ĠAbstract RequestHandler ( repository ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġlogger Ġ= ĠLog Manager . getLogger ( Default Reminder Handler :: class . java ) ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Reminder Created Event Request ( ĊĠĠĠĠĠĠĠ Ġa lex a Request : ĠAlex a Request < Reminder Created Event Request > ĊĠĠĠ Ġ): ĠAlex a Response Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" ================ =========== ĠRem inder Created Event Request Ġ================= ======= =") ĊĠĠĠĠĠĠĠ Ġval Ġreminder Handler : ĠRem inder Events Handler ? Ġ= Ġget Handler ( Reminder Events Handler :: class )?. cast () ĊĠĠĠĠĠĠĠ Ġreturn Ġreminder Handler ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġa lex a Response Ġ= Ġreminder Handler . on Reminder Created Event Request ( ale xa Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġgenerate Response ( reminder Handler , Ġa lex a Request , Ġa lex a Response ) ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠIntent Util . unsupported Intent () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Reminder Deleted Event Request ( ĊĠĠĠĠĠĠĠ Ġa lex a Request : ĠAlex a Request < Reminder Deleted Event Request > ĊĠĠĠ Ġ): ĠAlex a Response Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" ================ =========== ĠRem inder Deleted Event Request Ġ================= ======= =") ĊĠĠĠĠĠĠĠ Ġval Ġreminder Handler : ĠRem inder Events Handler ? Ġ= Ġget Handler ( Reminder Events Handler :: class )?. cast () ĊĠĠĠĠĠĠĠ Ġreturn Ġreminder Handler ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġa lex a Response Ġ= Ġreminder Handler . on Reminder Deleted Event Request ( ale xa Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġgenerate Response ( reminder Handler , Ġa lex a Request , Ġa lex a Response ) ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠIntent Util . unsupported Intent () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Reminder Started Event Request ( ĊĠĠĠĠĠĠĠ Ġa lex a Request : ĠAlex a Request < Reminder Started Event Request > ĊĠĠĠ Ġ): ĠAlex a Response Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" ================ =========== ĠRem inder Started Event Request Ġ================= ======= =") ĊĠĠĠĠĠĠĠ Ġval Ġreminder Handler : ĠRem inder Events Handler ? Ġ= Ġget Handler ( Reminder Events Handler :: class )?. cast () ĊĠĠĠĠĠĠĠ Ġreturn Ġreminder Handler ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġa lex a Response Ġ= Ġreminder Handler . on Reminder Started Event Request ( ale xa Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġgenerate Response ( reminder Handler , Ġa lex a Request , Ġa lex a Response ) ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠIntent Util . unsupported Intent () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Reminder Status Changed Event Request ( ĊĠĠĠĠĠĠĠ Ġa lex a Request : ĠAlex a Request < Reminder Status Changed Event Request > ĊĠĠĠ Ġ): ĠAlex a Response Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" ================ =========== ĠRem inder Status Changed Event Request Ġ================= ======= =") ĊĠĠĠĠĠĠĠ Ġval Ġreminder Handler : ĠRem inder Events Handler ? Ġ= Ġget Handler ( Reminder Events Handler :: class )?. cast () ĊĠĠĠĠĠĠĠ Ġreturn Ġreminder Handler ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġa lex a Response Ġ= Ġreminder Handler . on Reminder Status Changed Event Request ( ale xa Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġgenerate Response ( reminder Handler , Ġa lex a Request , Ġa lex a Response ) ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠIntent Util . unsupported Intent () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Reminder Updated Event Request ( ĊĠĠĠĠĠĠĠ Ġa lex a Request : ĠAlex a Request < Reminder Updated Event Request > ĊĠĠĠ Ġ): ĠAlex a Response Ġ{ ĊĠĠĠĠĠĠĠ Ġlogger . info (" ================ =========== ĠRem inder Updated Event Request Ġ================= ======= =") ĊĠĠĠĠĠĠĠ Ġval Ġreminder Handler : ĠRem inder Events Handler ? Ġ= Ġget Handler ( Reminder Events Handler :: class )?. cast () ĊĠĠĠĠĠĠĠ Ġreturn Ġreminder Handler ?. let Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġa lex a Response Ġ= Ġreminder Handler . on Reminder Updated Event Request ( ale xa Request ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġgenerate Response ( reminder Handler , Ġa lex a Request , Ġa lex a Response ) ĊĠĠĠĠĠĠĠ Ġ} Ġ?: ĠIntent Util . unsupported Intent () ĊĠĠĠ Ġ} Ċ } Ċ