Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 67fe46a6 authored by Guillaume Thomazon's avatar Guillaume Thomazon
Browse files

Add date personnalisation

git-svn-id: https://scm.gforge.inria.fr/authscm/ycadoret/svn/gazelle/Maven/gazelle-proxy/trunk@34259 356b4b1a-1d2b-0410-8bf1-ffa24008f01e
parent d95b7687
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,34 @@ public class MessageFilterStep<T extends AbstractMessage> implements MessageFilt
private boolean filterPathFrom = true;
private boolean filterDates = true;
private boolean filterPersoDate = false;
public Date startDate = null;
public Date endDate = null;
public boolean isFilterPersoDate() {
return filterPersoDate;
}
public void setFilterPersoDate(boolean filterPersoDate) {
this.filterPersoDate = filterPersoDate;
}
public Date getStartDate() {
return startDate;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public static String NEW_LINE = "\r\n";
public MessageFilterStep(Step step) {
......@@ -251,10 +279,19 @@ public class MessageFilterStep<T extends AbstractMessage> implements MessageFilt
Crit oneOfPath = new CritLogical(false, pathsArray);
criterions.add(oneOfPath);
}
if (filterPersoDate) {
if (endDate.before(startDate)){
endDate=startDate;
}
criterions.add(new CritSimple("dateReceived", "date", startDate, CritSimpleType.GE));
criterions.add(new CritSimple("dateReceived", "date", endDate, CritSimpleType.LE));
}
if (filterDates) {
Date startDate = getStartDate(testInstance);
Date endDate = step.getDate();
startDate = getStartDate(testInstance);
endDate = step.getDate();
criterions.add(new CritSimple("dateReceived", "date", startDate, CritSimpleType.GE));
criterions.add(new CritSimple("dateReceived", "date", endDate, CritSimpleType.LE));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment