@ PostConstruct public void initUserCommandMap ( ) { userCommandMap . put ( ManageUserAccountRequest . AccountOperation . DELETE , account -> { removeDataManager . removeUserAccountApplicationHistory ( account . getUserId ( ) ) ; getUserDAO ( ) . delete ( account ) ; return new ManageUserAccountResponse ( ServiceResult . SUCCESS ) ; } ) ; userCommandMap . put ( ManageUserAccountRequest . AccountOperation . UNLOCK , account -> { account . setUserLockStatus ( UserLockStatus . UNLOCKED ) ; getUserDAO ( ) . persist ( account ) ; return new ManageUserAccountResponse ( ServiceResult . SUCCESS ) ; } ) ; userCommandMap . put ( ManageUserAccountRequest . AccountOperation . LOCK , account -> { account . setUserLockStatus ( UserLockStatus . LOCKED ) ; getUserDAO ( ) . persist ( account ) ; return new ManageUserAccountResponse ( ServiceResult . SUCCESS ) ; } ) ; }
Inits the user command map .