@Test public void processNewOpenTipBotCommandsTest() { try { opentipbotService.processNewOpenTipBotCommands(); } catch (OpenTipBotServiceException e) { e.printStackTrace(); } }
public void processNewOpenTipBotCommands() throws OpenTipBotServiceException { logger.debug("Start command processing"); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RAIN)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RANDOM)); processWithdrawals(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.WITHDRAW)); processReceiverNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_RECEIVER)); processErrorNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_ERROR)); processFavs(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.FAV)); logger.debug("Operation Complete"); }
OpenTipBotService { public void processNewOpenTipBotCommands() throws OpenTipBotServiceException { logger.debug("Start command processing"); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RAIN)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RANDOM)); processWithdrawals(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.WITHDRAW)); processReceiverNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_RECEIVER)); processErrorNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_ERROR)); processFavs(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.FAV)); logger.debug("Operation Complete"); } }
OpenTipBotService { public void processNewOpenTipBotCommands() throws OpenTipBotServiceException { logger.debug("Start command processing"); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RAIN)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RANDOM)); processWithdrawals(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.WITHDRAW)); processReceiverNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_RECEIVER)); processErrorNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_ERROR)); processFavs(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.FAV)); logger.debug("Operation Complete"); }  }
OpenTipBotService { public void processNewOpenTipBotCommands() throws OpenTipBotServiceException { logger.debug("Start command processing"); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RAIN)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RANDOM)); processWithdrawals(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.WITHDRAW)); processReceiverNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_RECEIVER)); processErrorNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_ERROR)); processFavs(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.FAV)); logger.debug("Operation Complete"); }  TwitterTemplate getTwitterTemplate(); @PostConstruct void init(); void handleNewTweets(); void handleNewTweet(Tweet tweet); void processNewOpenTipBotCommands(); List<OpenTipBotCommand> getLastTips(); }
OpenTipBotService { public void processNewOpenTipBotCommands() throws OpenTipBotServiceException { logger.debug("Start command processing"); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RAIN)); processTips(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.TIP_RANDOM)); processWithdrawals(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.WITHDRAW)); processReceiverNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_RECEIVER)); processErrorNotifications(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.NOTIFY_ERROR)); processFavs(opentipbotCommandRepository.findByOpenTipBotCommandStatusAndOpenTipBotCommandEnumOrderByCreationTimeAsc(OpenTipBotCommandStatus.NEW, OpenTipBotCommandEnum.FAV)); logger.debug("Operation Complete"); }  TwitterTemplate getTwitterTemplate(); @PostConstruct void init(); void handleNewTweets(); void handleNewTweet(Tweet tweet); void processNewOpenTipBotCommands(); List<OpenTipBotCommand> getLastTips();  }