@@ -95,13 +95,22 @@ public class ProjectExportPlugin implements IWorkflowPlugin {
95
95
@ Setter
96
96
private List <Process > testList ;
97
97
98
+
99
+ /**
100
+ * Getter to list all existing active projects
101
+ * @return List of Strings
102
+ */
98
103
public List <String > getAllProjectNames () {
99
104
if (allProjectNames == null ) {
100
105
allProjectNames = ProjectManager .getAllProjectTitles (true );
101
106
}
102
107
return allProjectNames ;
103
108
}
104
109
110
+ /**
111
+ * Setter to define the project to use
112
+ * @param selectedProjectName the title of the project to use
113
+ */
105
114
public void setProjectName (String selectedProjectName ) {
106
115
if (StringUtils .isBlank (this .projectName ) || !this .projectName .equals (selectedProjectName )) {
107
116
this .projectName = selectedProjectName ;
@@ -119,6 +128,10 @@ public void setProjectName(String selectedProjectName) {
119
128
}
120
129
}
121
130
131
+ /**
132
+ * Find out how many processes in the project are still not in the right status to be interpreted as finished
133
+ * @return integer value with number of processes
134
+ */
122
135
private int getNumberOfUnfinishedTasks () {
123
136
if (!testDatabase ) {
124
137
Connection connection = null ;
@@ -148,14 +161,22 @@ private int getNumberOfUnfinishedTasks() {
148
161
return 0 ;
149
162
}
150
163
164
+ /**
165
+ * Create a list of all processes of the selected project based on the project title
166
+ * @return List of processes
167
+ */
151
168
private List <Process > getProcessList () {
152
169
if (!testDatabase ) {
153
170
return ProcessManager .getProcesses ("prozesse.titel" , "projekte.titel = '" + projectName + "' " );
154
171
} else {
155
172
return testList ;
156
173
}
157
174
}
158
-
175
+
176
+ /**
177
+ * private method to read in all parameters from the configuration file
178
+ * @param projectName
179
+ */
159
180
private void readConfiguration (String projectName ) {
160
181
161
182
HierarchicalConfiguration config = null ;
@@ -183,6 +204,9 @@ private void readConfiguration(String projectName) {
183
204
}
184
205
}
185
206
207
+ /**
208
+ * Execute the export to write the excel file and the images to the given export folder
209
+ */
186
210
public void prepareExport () {
187
211
188
212
List <Process > processesInProject = getProcessList ();
0 commit comments