Skip to content

Package: ResetTask

ResetTask

nameinstructionbranchcomplexitylinemethod
ResetTask(ConfigurationGraph)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
resetGraphConfiguration(RouterConfiguration)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package networkconfigurator.actions;
2:
3: import model.RouterConfiguration;
4: import networkconfigurator.ConfigurationGraph;
5: import networkconfigurator.LoadConfigurationGraphException;
6:
7: /**
8: *
9: * @author Jannik
10: *
11: */
12: public class ResetTask {
13:
14:         /**
15:          * The Graph.
16:          */
17:         private final ConfigurationGraph graph;
18:
19:         /**
20:          *
21:          * @param configurationGraph
22:          * the graph.
23:          */
24:         public ResetTask(final ConfigurationGraph configurationGraph) {
25:                 this.graph = configurationGraph;
26:         }
27:
28:         /**
29:          *
30:          * method for reset the additional information of the nodes.
31:          *
32:          * @param rc
33:          * the router configuration to get the path where the configuration is located. For
34:          * example, is as follows: "C:\Users\admin\Documents\example-3.10.15\config" and the
35:          * Assignments.
36:          * @throws LoadConfigurationGraphException
37:          * the error is thrown if a problem occurs during loading.
38:          */
39:         public void resetGraphConfiguration(final RouterConfiguration rc)
40:                         throws LoadConfigurationGraphException {
41:                 this.graph.getItems().clear();
42:                 final LoadTask loadTask = new LoadTask(graph);
43:                 loadTask.loadGraphConfiguration(rc);
44:         }
45: }