Skip to content

Commit

Permalink
automation at the end of the crawling
Browse files Browse the repository at this point in the history
  • Loading branch information
car031 committed Oct 23, 2024
1 parent ff2eb54 commit 856bf55
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public class GUIEmailAccount implements Serializable {

private String automationAfter;

private String automationEnd;

public GUIEmailAccount() {
super();
target = null;
Expand Down Expand Up @@ -293,4 +295,12 @@ public String getClientTenant() {
public void setClientTenant(String clientTenant) {
this.clientTenant = clientTenant;
}

public String getAutomationEnd() {
return automationEnd;
}

public void setAutomationEnd(String automationEnd) {
this.automationEnd = automationEnd;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public class GUIImportFolder implements Serializable {
private String automation;

private String automationAfter;

private String automationEnd;

public GUIImportFolder() {
super();
Expand Down Expand Up @@ -360,4 +362,12 @@ public String getAutomationAfter() {
public void setAutomationAfter(String automationAfter) {
this.automationAfter = automationAfter;
}

public String getAutomationEnd() {
return automationEnd;
}

public void setAutomationEnd(String automationEnd) {
this.automationEnd = automationEnd;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onDraw() {
form.clearErrors(false);
form.destroy();

if (Boolean.TRUE.equals(container.contains(form)))
if (Boolean.TRUE.equals(container.contains(form)))
container.removeChild(form);

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

TextAreaItem automationBefore = ItemFactory.newTextAreaItemForAutomation("automationBefore", "whenemailprocessing",
account.getAutomation(), changedHandler, false);
TextAreaItem automationBefore = ItemFactory.newTextAreaItemForAutomation("automationBefore",
"whenemailprocessing", account.getAutomation(), changedHandler, false);
automationBefore.setRequired(false);
automationBefore.setWidth("*");
automationBefore.setHeight("*");
automationBefore.addChangedHandler(changedHandler);

TextAreaItem automationAfter = ItemFactory.newTextAreaItemForAutomation("automationAfter", "afteremailprocessed",
account.getAutomationAfter(), changedHandler, false);
TextAreaItem automationAfter = ItemFactory.newTextAreaItemForAutomation("automationAfter",
"afteremailprocessed", account.getAutomationAfter(), changedHandler, false);
automationAfter.setRequired(false);
automationAfter.setWidth("*");
automationAfter.setHeight("*");
automationAfter.addChangedHandler(changedHandler);

form.setItems(automationBefore, automationAfter);

TextAreaItem automationEnd = ItemFactory.newTextAreaItemForAutomation("automationEnd", "aftercrawlingprocessed",
account.getAutomationEnd(), changedHandler, false);
automationEnd.setRequired(false);
automationEnd.setWidth("*");
automationEnd.setHeight("*");
automationEnd.addChangedHandler(changedHandler);

form.setItems(automationBefore, automationAfter, automationEnd);

container.addMember(form);
}
Expand All @@ -70,6 +77,7 @@ boolean validate() {
if (Boolean.FALSE.equals(form.hasErrors())) {
account.setAutomation((String) values.get("automationBefore"));
account.setAutomationAfter((String) values.get("automationAfter"));
account.setAutomationEnd((String) values.get("automationEnd"));
}
return !form.hasErrors();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,15 @@ public void onDraw() {
automationAfter.setWidth("*");
automationAfter.setHeight("*");
automationAfter.addChangedHandler(changedHandler);

TextAreaItem automationEnd = ItemFactory.newTextAreaItemForAutomation("automationEnd",
"aftercrawlingprocessed", importFolder.getAutomationEnd(), changedHandler, false);
automationEnd.setRequired(false);
automationEnd.setWidth("*");
automationEnd.setHeight("*");
automationAfter.addChangedHandler(changedHandler);

form.setItems(automationBefore, automationAfter);
form.setItems(automationBefore, automationAfter, automationEnd);

container.addMember(form);
}
Expand All @@ -70,6 +77,7 @@ boolean validate() {
if (Boolean.FALSE.equals(form.hasErrors())) {
importFolder.setAutomation((String) values.get("automationBefore"));
importFolder.setAutomationAfter((String) values.get("automationAfter"));
importFolder.setAutomationEnd((String) values.get("automationEnd"));
}
return !form.hasErrors();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2443,6 +2443,7 @@ onerrormarkunindexable=On error, mark unindexable
onerrormarkunindexablehint=In case of error, the document gets marked as unindexable
whendocumentprocessing=When the document is being processed
afterdocumentprocessed=After the document has been processed
aftercrawlingprocessed=After the crawling has been completed
indexable=Indexable
metadata=metadata
all=all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ protected void service(HttpServletRequest request, HttpServletResponse response,
* Iterate over the collection of templates
*/
for (AttributeSet set : sets) {

writer.print("<attributeset>");
writer.print("<id>" + set.getId() + "</id>");
writer.print("<name><![CDATA[" + set.getName() + "]]></name>");
Expand Down

0 comments on commit 856bf55

Please sign in to comment.