Skip to content

Commit 699b0e3

Browse files
added some comments
1 parent 8ee3f03 commit 699b0e3

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

goobi-plugin-workflow-projectexport/src/main/java/de/intranda/goobi/plugins/ProjectExportPlugin.java

+25-1
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,22 @@ public class ProjectExportPlugin implements IWorkflowPlugin {
9595
@Setter
9696
private List<Process> testList;
9797

98+
99+
/**
100+
* Getter to list all existing active projects
101+
* @return List of Strings
102+
*/
98103
public List<String> getAllProjectNames() {
99104
if (allProjectNames == null) {
100105
allProjectNames = ProjectManager.getAllProjectTitles(true);
101106
}
102107
return allProjectNames;
103108
}
104109

110+
/**
111+
* Setter to define the project to use
112+
* @param selectedProjectName the title of the project to use
113+
*/
105114
public void setProjectName(String selectedProjectName) {
106115
if (StringUtils.isBlank(this.projectName) || !this.projectName.equals(selectedProjectName)) {
107116
this.projectName = selectedProjectName;
@@ -119,6 +128,10 @@ public void setProjectName(String selectedProjectName) {
119128
}
120129
}
121130

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+
*/
122135
private int getNumberOfUnfinishedTasks() {
123136
if (!testDatabase) {
124137
Connection connection = null;
@@ -148,14 +161,22 @@ private int getNumberOfUnfinishedTasks() {
148161
return 0;
149162
}
150163

164+
/**
165+
* Create a list of all processes of the selected project based on the project title
166+
* @return List of processes
167+
*/
151168
private List<Process> getProcessList() {
152169
if (!testDatabase) {
153170
return ProcessManager.getProcesses("prozesse.titel", "projekte.titel = '" + projectName + "' ");
154171
} else {
155172
return testList;
156173
}
157174
}
158-
175+
176+
/**
177+
* private method to read in all parameters from the configuration file
178+
* @param projectName
179+
*/
159180
private void readConfiguration(String projectName) {
160181

161182
HierarchicalConfiguration config = null;
@@ -183,6 +204,9 @@ private void readConfiguration(String projectName) {
183204
}
184205
}
185206

207+
/**
208+
* Execute the export to write the excel file and the images to the given export folder
209+
*/
186210
public void prepareExport() {
187211

188212
List<Process> processesInProject = getProcessList();

0 commit comments

Comments
 (0)