Skip to content

Commit 856bf55

Browse files
committed
automation at the end of the crawling
1 parent ff2eb54 commit 856bf55

File tree

6 files changed

+45
-9
lines changed

6 files changed

+45
-9
lines changed

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/beans/GUIEmailAccount.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ public class GUIEmailAccount implements Serializable {
8989

9090
private String automationAfter;
9191

92+
private String automationEnd;
93+
9294
public GUIEmailAccount() {
9395
super();
9496
target = null;
@@ -293,4 +295,12 @@ public String getClientTenant() {
293295
public void setClientTenant(String clientTenant) {
294296
this.clientTenant = clientTenant;
295297
}
298+
299+
public String getAutomationEnd() {
300+
return automationEnd;
301+
}
302+
303+
public void setAutomationEnd(String automationEnd) {
304+
this.automationEnd = automationEnd;
305+
}
296306
}

logicaldoc-gui/src/main/java/com/logicaldoc/gui/common/client/beans/GUIImportFolder.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public class GUIImportFolder implements Serializable {
8686
private String automation;
8787

8888
private String automationAfter;
89+
90+
private String automationEnd;
8991

9092
public GUIImportFolder() {
9193
super();
@@ -360,4 +362,12 @@ public String getAutomationAfter() {
360362
public void setAutomationAfter(String automationAfter) {
361363
this.automationAfter = automationAfter;
362364
}
365+
366+
public String getAutomationEnd() {
367+
return automationEnd;
368+
}
369+
370+
public void setAutomationEnd(String automationEnd) {
371+
this.automationEnd = automationEnd;
372+
}
363373
}

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/impex/email/EmailAccountAutomationPanel.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void onDraw() {
3535
form.clearErrors(false);
3636
form.destroy();
3737

38-
if (Boolean.TRUE.equals(container.contains(form)))
38+
if (Boolean.TRUE.equals(container.contains(form)))
3939
container.removeChild(form);
4040

4141
form = new DynamicForm();
@@ -44,21 +44,28 @@ public void onDraw() {
4444
form.setNumCols(1);
4545
form.setTitleOrientation(TitleOrientation.TOP);
4646

47-
TextAreaItem automationBefore = ItemFactory.newTextAreaItemForAutomation("automationBefore", "whenemailprocessing",
48-
account.getAutomation(), changedHandler, false);
47+
TextAreaItem automationBefore = ItemFactory.newTextAreaItemForAutomation("automationBefore",
48+
"whenemailprocessing", account.getAutomation(), changedHandler, false);
4949
automationBefore.setRequired(false);
5050
automationBefore.setWidth("*");
5151
automationBefore.setHeight("*");
5252
automationBefore.addChangedHandler(changedHandler);
5353

54-
TextAreaItem automationAfter = ItemFactory.newTextAreaItemForAutomation("automationAfter", "afteremailprocessed",
55-
account.getAutomationAfter(), changedHandler, false);
54+
TextAreaItem automationAfter = ItemFactory.newTextAreaItemForAutomation("automationAfter",
55+
"afteremailprocessed", account.getAutomationAfter(), changedHandler, false);
5656
automationAfter.setRequired(false);
5757
automationAfter.setWidth("*");
5858
automationAfter.setHeight("*");
5959
automationAfter.addChangedHandler(changedHandler);
60-
61-
form.setItems(automationBefore, automationAfter);
60+
61+
TextAreaItem automationEnd = ItemFactory.newTextAreaItemForAutomation("automationEnd", "aftercrawlingprocessed",
62+
account.getAutomationEnd(), changedHandler, false);
63+
automationEnd.setRequired(false);
64+
automationEnd.setWidth("*");
65+
automationEnd.setHeight("*");
66+
automationEnd.addChangedHandler(changedHandler);
67+
68+
form.setItems(automationBefore, automationAfter, automationEnd);
6269

6370
container.addMember(form);
6471
}
@@ -70,6 +77,7 @@ boolean validate() {
7077
if (Boolean.FALSE.equals(form.hasErrors())) {
7178
account.setAutomation((String) values.get("automationBefore"));
7279
account.setAutomationAfter((String) values.get("automationAfter"));
80+
account.setAutomationEnd((String) values.get("automationEnd"));
7381
}
7482
return !form.hasErrors();
7583
}

logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/impex/folders/ImportFolderAutomationPanel.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ public void onDraw() {
5757
automationAfter.setWidth("*");
5858
automationAfter.setHeight("*");
5959
automationAfter.addChangedHandler(changedHandler);
60+
61+
TextAreaItem automationEnd = ItemFactory.newTextAreaItemForAutomation("automationEnd",
62+
"aftercrawlingprocessed", importFolder.getAutomationEnd(), changedHandler, false);
63+
automationEnd.setRequired(false);
64+
automationEnd.setWidth("*");
65+
automationEnd.setHeight("*");
66+
automationAfter.addChangedHandler(changedHandler);
6067

61-
form.setItems(automationBefore, automationAfter);
68+
form.setItems(automationBefore, automationAfter, automationEnd);
6269

6370
container.addMember(form);
6471
}
@@ -70,6 +77,7 @@ boolean validate() {
7077
if (Boolean.FALSE.equals(form.hasErrors())) {
7178
importFolder.setAutomation((String) values.get("automationBefore"));
7279
importFolder.setAutomationAfter((String) values.get("automationAfter"));
80+
importFolder.setAutomationEnd((String) values.get("automationEnd"));
7381
}
7482
return !form.hasErrors();
7583
}

logicaldoc-i18n/src/main/resources/i18n/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,6 +2443,7 @@ onerrormarkunindexable=On error, mark unindexable
24432443
onerrormarkunindexablehint=In case of error, the document gets marked as unindexable
24442444
whendocumentprocessing=When the document is being processed
24452445
afterdocumentprocessed=After the document has been processed
2446+
aftercrawlingprocessed=After the crawling has been completed
24462447
indexable=Indexable
24472448
metadata=metadata
24482449
all=all

logicaldoc-webapp/src/main/java/com/logicaldoc/web/data/AttributeSetsDataServlet.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ protected void service(HttpServletRequest request, HttpServletResponse response,
5959
* Iterate over the collection of templates
6060
*/
6161
for (AttributeSet set : sets) {
62-
6362
writer.print("<attributeset>");
6463
writer.print("<id>" + set.getId() + "</id>");
6564
writer.print("<name><![CDATA[" + set.getName() + "]]></name>");

0 commit comments

Comments
 (0)