1 changed files with 0 additions and 27 deletions
@ -1,27 +0,0 @@ |
|||||
package com.example.datacollect.command; |
|
||||
|
|
||||
import com.example.datacollect.repository.ArticleRepository; |
|
||||
import com.example.datacollect.view.ConsoleView; |
|
||||
import org.slf4j.Logger; |
|
||||
import org.slf4j.LoggerFactory; |
|
||||
|
|
||||
public class ExitCommand implements Command { |
|
||||
private static final Logger logger = LoggerFactory.getLogger(ExitCommand.class); |
|
||||
private final ConsoleView view; |
|
||||
|
|
||||
public ExitCommand(ConsoleView view) { |
|
||||
this.view = view; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public String getName() { |
|
||||
return "exit"; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void execute(String[] args, ArticleRepository repository) { |
|
||||
logger.info("Application exit requested"); |
|
||||
view.printSuccess("Bye!"); |
|
||||
System.exit(0); |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue