1 | package com.jsql.view.swing.util; | |
2 | ||
3 | import com.jsql.model.InjectionModel; | |
4 | import com.jsql.view.swing.JFrameView; | |
5 | import com.jsql.view.swing.manager.*; | |
6 | import com.jsql.view.swing.menubar.AppMenubar; | |
7 | import com.jsql.view.swing.panel.PanelAddressBar; | |
8 | import com.jsql.view.swing.panel.PanelConsoles; | |
9 | import com.jsql.view.swing.tab.TabManagersCards; | |
10 | import com.jsql.view.swing.tab.TabResults; | |
11 | import com.jsql.view.swing.tab.TabbedPaneWheeled; | |
12 | import com.jsql.view.swing.tree.TreeDatabase; | |
13 | ||
14 | /** | |
15 | * Mediator for loosely coupled components. | |
16 | */ | |
17 | public final class MediatorHelper { | |
18 | | |
19 | private static InjectionModel model; | |
20 | | |
21 | private static TreeDatabase treeDatabase; | |
22 | private static TabResults tabResults; | |
23 | private static TabManagersCards tabManagersCards; | |
24 | | |
25 | private static JFrameView frame; | |
26 | private static AppMenubar appMenubar; | |
27 | private static PanelAddressBar panelAddressBar; | |
28 | private static TabbedPaneWheeled tabConsoles; | |
29 | private static PanelConsoles panelConsoles; | |
30 | | |
31 | private static ManagerScan managerScan; | |
32 | private static ManagerAdminPage managerAdminPage; | |
33 | private static ManagerFile managerFile; | |
34 | private static ManagerExploit managerExploit; | |
35 | private static ManagerBruteForce managerBruteForce; | |
36 | ||
37 | private MediatorHelper() { | |
38 | // Utility class | |
39 | } | |
40 | ||
41 | public static InjectionModel model() { | |
42 |
1
1. model : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::model → NO_COVERAGE |
return MediatorHelper.model; |
43 | } | |
44 | | |
45 | public static TreeDatabase treeDatabase() { | |
46 |
1
1. treeDatabase : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::treeDatabase → NO_COVERAGE |
return MediatorHelper.treeDatabase; |
47 | } | |
48 | | |
49 | public static TabResults tabResults() { | |
50 |
1
1. tabResults : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::tabResults → NO_COVERAGE |
return MediatorHelper.tabResults; |
51 | } | |
52 | | |
53 | public static TabManagersCards tabManagersCards() { | |
54 |
1
1. tabManagersCards : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::tabManagersCards → NO_COVERAGE |
return MediatorHelper.tabManagersCards; |
55 | } | |
56 | | |
57 | public static JFrameView frame() { | |
58 |
1
1. frame : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::frame → NO_COVERAGE |
return MediatorHelper.frame; |
59 | } | |
60 | | |
61 | public static AppMenubar menubar() { | |
62 |
1
1. menubar : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::menubar → NO_COVERAGE |
return MediatorHelper.appMenubar; |
63 | } | |
64 | | |
65 | public static PanelAddressBar panelAddressBar() { | |
66 |
1
1. panelAddressBar : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::panelAddressBar → NO_COVERAGE |
return MediatorHelper.panelAddressBar; |
67 | } | |
68 | | |
69 | public static TabbedPaneWheeled tabConsoles() { | |
70 |
1
1. tabConsoles : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::tabConsoles → NO_COVERAGE |
return MediatorHelper.tabConsoles; |
71 | } | |
72 | | |
73 | public static PanelConsoles panelConsoles() { | |
74 |
1
1. panelConsoles : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::panelConsoles → NO_COVERAGE |
return MediatorHelper.panelConsoles; |
75 | } | |
76 | | |
77 | public static ManagerAdminPage managerAdminPage() { | |
78 |
1
1. managerAdminPage : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::managerAdminPage → NO_COVERAGE |
return MediatorHelper.managerAdminPage; |
79 | } | |
80 | | |
81 | public static ManagerFile managerFile() { | |
82 |
1
1. managerFile : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::managerFile → NO_COVERAGE |
return MediatorHelper.managerFile; |
83 | } | |
84 | ||
85 | public static ManagerExploit managerExploit() { | |
86 |
1
1. managerExploit : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::managerExploit → NO_COVERAGE |
return MediatorHelper.managerExploit; |
87 | } | |
88 | | |
89 | public static ManagerScan managerScan() { | |
90 |
1
1. managerScan : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::managerScan → NO_COVERAGE |
return MediatorHelper.managerScan; |
91 | } | |
92 | | |
93 | public static ManagerBruteForce managerBruteForce() { | |
94 |
1
1. managerBruteForce : replaced return value with null for com/jsql/view/swing/util/MediatorHelper::managerBruteForce → NO_COVERAGE |
return MediatorHelper.managerBruteForce; |
95 | } | |
96 | | |
97 | | |
98 | // Registering GUI components | |
99 | | |
100 | public static void register(JFrameView frame) { | |
101 | MediatorHelper.frame = frame; | |
102 | } | |
103 | | |
104 | public static void register(AppMenubar appMenubar) { | |
105 | MediatorHelper.appMenubar = appMenubar; | |
106 | } | |
107 | | |
108 | public static void register(PanelAddressBar panelAddress) { | |
109 | MediatorHelper.panelAddressBar = panelAddress; | |
110 | } | |
111 | | |
112 | public static void register(TabbedPaneWheeled tabConsoles) { | |
113 | MediatorHelper.tabConsoles = tabConsoles; | |
114 | } | |
115 | | |
116 | public static void register(PanelConsoles panelConsoles) { | |
117 | MediatorHelper.panelConsoles = panelConsoles; | |
118 | } | |
119 | | |
120 | public static void register(TreeDatabase treeDatabase) { | |
121 | MediatorHelper.treeDatabase = treeDatabase; | |
122 | } | |
123 | | |
124 | public static void register(TabResults tabResults) { | |
125 | MediatorHelper.tabResults = tabResults; | |
126 | } | |
127 | | |
128 | public static void register(TabManagersCards tabManagersCards) { | |
129 | MediatorHelper.tabManagersCards = tabManagersCards; | |
130 | } | |
131 | | |
132 | | |
133 | // Registering Managers | |
134 | public static void register(ManagerAdminPage managerAdminPage) { | |
135 | MediatorHelper.managerAdminPage = managerAdminPage; | |
136 | } | |
137 | | |
138 | public static void register(ManagerFile managerFile) { | |
139 | MediatorHelper.managerFile = managerFile; | |
140 | } | |
141 | public static void register(ManagerExploit managerExploit) { | |
142 | MediatorHelper.managerExploit = managerExploit; | |
143 | } | |
144 | | |
145 | public static void register(ManagerScan managerScan) { | |
146 | MediatorHelper.managerScan = managerScan; | |
147 | } | |
148 | | |
149 | public static void register(ManagerBruteForce managerBruteForce) { | |
150 | MediatorHelper.managerBruteForce = managerBruteForce; | |
151 | } | |
152 | ||
153 | public static void register(InjectionModel model) { | |
154 | MediatorHelper.model = model; | |
155 | } | |
156 | } | |
Mutations | ||
42 |
1.1 |
|
46 |
1.1 |
|
50 |
1.1 |
|
54 |
1.1 |
|
58 |
1.1 |
|
62 |
1.1 |
|
66 |
1.1 |
|
70 |
1.1 |
|
74 |
1.1 |
|
78 |
1.1 |
|
82 |
1.1 |
|
86 |
1.1 |
|
90 |
1.1 |
|
94 |
1.1 |