View Javadoc
1   package de.spiritscorp.datasync.controller;
2   
3   /*-
4    * 		Data Sync
5    *
6    * 		Copyright ©   2022    The Spirit
7    * 		@email                        thespirit@spiritscorp.network
8    *
9    * 		This program is free software; you can redistribute it and/or modify
10   * 		it under the terms of the GNU General Public License as published by
11   * 		the Free Software Foundation; either version 3 of the License, or
12   * 		(at your option) any later version.
13   *
14   * 		This program is distributed in the hope that it will be useful,
15   * 		but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * 		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17   * 		See the GNU General Public License for more details.
18   *
19   * 		You should have received a copy of the GNU General Public License
20   * 		along with this program. If not, see <http://www.gnu.org/licenses/>.
21   */
22  
23  import de.spiritscorp.datasync.gui.Gui;
24  import de.spiritscorp.datasync.io.Preference;
25  import de.spiritscorp.datasync.theme.AppTheme;
26  import javafx.scene.control.ListCell;
27  
28  /**
29   * Core architectural interface decoupling user interface interactions from business logic orchestration.
30   * Acts as the primary controller boundary for all GUI-driven events.
31   * * @author Tom Spirit
32   */
33  public interface ViewController {
34  
35  	/**
36  	 * Registers a native host operating system runtime shutdown hook to capture external termination signals.
37  	 */
38  	void registerNativeShutdownHook();
39  
40  	/**
41  	 * Handles switching between different primary view layers within the main viewport.
42  	 *
43  	 * @param state The target structural navigation layer.
44  	 */
45  	void handleNavigate( Gui.ViewState state );
46  
47  	/**
48  	 * Requests termination of the entire application environment, safely stopping background hooks.
49  	 */
50  	void handleApplicationShutdown();
51  
52  	/**
53  	 * Load the whole jobList from the Preferences.
54  	 */
55  //	void loadInitialJobList();
56  
57  	/**
58  	 * Handles the creation and append workflow for a new managed task synchronization context instance.
59  	 */
60  	void handleCreateNewJob();
61  
62  	/**
63  	 * Triggers the specialized configuration context dialog to change a job instance identification label.
64  	 *
65  	 * @param cell The graphical ListCell context container hosting the target model entity.
66  	 */
67  	void handleRenameJob( ListCell<SyncJobContext> cell );
68  
69  	/**
70  	 * Creates an independent copy of the currently selected task parameters profile mapping.
71  	 *
72  	 * @param job The source configuration instance payload.
73  	 */
74  	void handleDuplicateJob( SyncJobContext job );
75  
76  	/**
77  	 * Permanently removes a task entity context from the global orchestrator matrix tracking layer.
78  	 *
79  	 * @param job The target configuration instance to wipe.
80  	 */
81  	void handleDeleteJob( SyncJobContext job );
82  
83  	/**
84  	 * Initiates execution of processing operations based on active configuration parameters.
85  	 *
86  	 * @param job The active task configuration processing target.
87  	 */
88  	void handleExecuteTask( SyncJobContext job );
89  
90  	/**
91  	 * Stop execution of processing operations based on active configuration parameters.
92  	 *
93  	 * @param job The active task configuration processing target.
94  	 */
95  	void handleStopTask( SyncJobContext job );
96  
97  	/**
98  	 * Commits altered orchestration state variables using the encapsulated properties entity carrier.
99  	 *
100 	 * @param localPreferences Altered context data parameters container reference.
101 	 * @param targetTheme      Visual presentation theme strategy selection.
102 	 */
103 	void handleSaveSettings( Preference localPreferences, AppTheme targetTheme );
104 
105 	void runInBackground( boolean firstStart );
106 
107 	void deleteSelectedDuplicates( SyncJobContext jobContext );
108 
109 }