Action.java 634 B

1234567891011121314151617181920212223242526272829
  1. package eu.oschl.gui.actions;
  2. /***
  3. * This interface defines the structure for commands in the console application.
  4. *
  5. * @author Ondřej Schlaichert
  6. */
  7. public interface Action {
  8. /**
  9. * Returns ID of the action.
  10. *
  11. * @return a string ID/name
  12. */
  13. String getId();
  14. /**
  15. * Returns a description of what the action does.
  16. *
  17. * @return a string description of the action
  18. */
  19. String getDescription();
  20. /**
  21. * Executes the action with the provided arguments.
  22. *
  23. * @param args an array of strings representing the action arguments
  24. */
  25. void execute(String[] args);
  26. }