@Override public boolean execute() { Twitter main = new Twitter(); logger.info( "WARNING!!!!!! Once authorized, this will delete EVERY tweet you ever posted, that is older then 2 weeks.\n" + "Do not continue unless you are absolutely certain you want to do this."); logger.info( "\n\nNote: Twitter rate limits us to 350 actions per hour. If your twitter stream is very active, this will " + "most likely break and you'll need to re-run this application a few times over to do a proper cleanup."); Scanner scanner = new Scanner(System.in); logger.info("Do you wish to continue? (y/n)?"); String ans = scanner.nextLine(); if (ans.toLowerCase().charAt(0) != 'y') { logger.info("Exciting application...."); System.exit(0); } AccessToken token = main.requestToken(); main.twitter.setOAuthAccessToken(token); Configuration globalConfig = Configuration.getInstance(); TwitterConfig config = globalConfig.getTwitterConfig("twitter"); if (config.isCleanDirectMessages()) main.deleteDirectMessages(); if (config.isCleanLists()) main.removeLists(); if (config.isCleanTweets()) main.deleteTweets(); if (config.isCleanFavorites()) main.removeFavorites(); if (config.isCleanReTweets()) main.removeRetweets(); if (config.isCleanFriendships()) main.removeFriendships(); return true; }