Class CommandLineAction

    • Constructor Detail

      • CommandLineAction

        public CommandLineAction()
    • Method Detail

      • execute

        public final void execute​(ConsoleInterface console,
                                  CommandLineAction parent)
        Führt den Befehl aus
        Parameters:
        console - Konsole
        parent - Übergeordneter Befehl oder null falls es sich um die "Wurzel" handelt.
      • printStatus

        public void printStatus​(ConsoleInterface console)
                         throws java.lang.Exception
        Gibt einen Text vor der Auswahl der Aktion aus (zum überschreiben)
        Parameters:
        console - Konsole
        Throws:
        java.lang.Exception - Beliebige Exception
      • execute

        protected void execute​(ConsoleInterface console)
                        throws java.lang.Exception
        Führt den eigentlichen Befehl aus
        Parameters:
        console - Konsole
        Throws:
        java.lang.Exception - Beliebige Exception
      • dispose

        protected void dispose​(ConsoleInterface console)
                        throws java.lang.Exception
        Wird aufgerufen wenn der Befehl verlassen wird
        Parameters:
        console - Konsole
        Throws:
        java.lang.Exception - Beliebige Exception
      • toString

        public abstract java.lang.String toString()
        Gibt den Befehlsnamen zurück
        Overrides:
        toString in class java.lang.Object
        Returns:
        Name
      • getChildren

        public java.util.List<? extends CommandLineAction> getChildren()
        Gibt die Kindbefehle zurück
        Returns:
        Kindbefehle
      • skipParent

        public final void skipParent()