From f39ab43fc0120b7fa97028d40acd7851de8d4a99 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 24 Nov 2022 14:14:37 +0100 Subject: Repository moved to GitHub: https://github.com/a-sit/pdf-over --- .../at/asit/pdfover/gui/workflow/states/State.java | 93 ---------------------- 1 file changed, 93 deletions(-) delete mode 100644 pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java deleted file mode 100644 index c039f21a..00000000 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/State.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2012 by A-SIT, Secure Information Technology Center Austria - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://joinup.ec.europa.eu/software/page/eupl - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - */ -package at.asit.pdfover.gui.workflow.states; - -//Imports -import at.asit.pdfover.gui.workflow.StateMachine; -import at.asit.pdfover.gui.workflow.config.ConfigurationManager; - -/** - * Base state class - */ -public abstract class State { - - /** - * The StateMachine - */ - private StateMachine stateMachine; - - private State nextState = null; - - /** - * Default Workflow State constructor - * @param stateMachine the State Machine - */ - public State(StateMachine stateMachine) { - this.stateMachine = stateMachine; - this.nextState = this; - } - - public ConfigurationManager getConfig() { return this.stateMachine.configProvider; } - - /** - * Gets the next logical state or null if this their is no state transition - * @return the next state (or null) - */ - public State nextState() { - return this.nextState; - } - - /** - * Sets the next logical state - * @param state - */ - protected void setNextState(State state) { - this.nextState = state; - } - - /** - * Perform main logic for this state - */ - public abstract void run(); - - /** - * Perform status cleanup - */ - public abstract void cleanUp(); - - /** - * Update the state machine - */ - public void updateStateMachine() - { - this.stateMachine.invokeUpdate(); - } - - /** - * Get the state machine - * @return the StateMachine - */ - protected StateMachine getStateMachine() - { - return this.stateMachine; - } - - /** - * Update the main window behavior of this state if necessary - * Should update this.stateMachine.status.getBehavior() - */ - public abstract void updateMainWindowBehavior(); -} -- cgit v1.2.3