package Ġcom . nim bus framework . nim bus aws local . aws . secrets manager Ċ Ċ import Ġcom . nim bus framework . nim bus aws . annotation . annotations . secret manager . Uses Secret Manager Secret Ċ import Ġcom . nim bus framework . nim bus aws local . aws . Aws Permission Types Ċ import Ġcom . nim bus framework . nim bus local . deployment . function . Function Environment Ċ import Ġcom . nim bus framework . nim bus local . deployment . function . permissions . Permission Ċ import Ġcom . nim bus framework . nim bus local . deployment . services . Local Resource Holder Ċ import Ġcom . nim bus framework . nim bus local . deployment . services . Stage Service Ċ import Ġcom . nim bus framework . nim bus local . deployment . services . uses resources . Local Uses Resources Handler Ċ import Ġjava . lang . reflect . Method Ċ Ċ class ĠLocal Uses Secret Manager Handler ( ĊĠĠĠĠĠĠĠ Ġlocal Resource Holder : ĠLocal Resource Holder , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġstage Service : ĠStage Service Ċ ) Ġ: ĠLocal Uses Resources Handler ( local Resource Holder ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġhandle Uses Resources ( clazz : ĠClass < out ĠAny >, Ġmethod : ĠMethod , Ġfunction Environment : ĠFunction Environment ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġuses Secret Ġ= Ġmethod . get Annotations ByType ( Uses Secret Manager Secret :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġval Ġannotation Ġ= Ġstage Service . annotation For Stage ( uses Secret ) Ġ{ Ġannotation Ġ-> Ġannotation . stages Ġ} ĊĠĠĠĠĠĠĠ Ġif Ġ( annotation Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġar n Ġ= Ġannotation . secret Arn ĊĠĠĠĠĠĠĠĠĠĠĠ Ġfunction Environment . add Permission ( Aws Permission Types . SE CRE TS _ MANAGER , Ġobject : ĠPermission Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun Ġhas Permission ( value : ĠString ): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġvalue Ġ== Ġar n ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}) ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠ Ġ} Ċ Ċ } Ċ