Skip to content

Commit

Permalink
SAK-31127 let's be more flexible with CSV import and accept DAY or day (
Browse files Browse the repository at this point in the history
  • Loading branch information
ottenhoff committed May 6, 2016
1 parent 8fc874b commit b63a131
Showing 1 changed file with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,43 +1019,43 @@ public void cancelCalendar(CalendarEdit edit)
*/
public RecurrenceRule newRecurrence(String frequency)
{
if (frequency.equals(DailyRecurrenceRule.FREQ))
if (frequency.equalsIgnoreCase(DailyRecurrenceRule.FREQ))
{
return new DailyRecurrenceRule();
}
else if (frequency.equals(WeeklyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(WeeklyRecurrenceRule.FREQ))
{
return new WeeklyRecurrenceRule();
}
else if (frequency.equals(TThRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(TThRecurrenceRule.FREQ))
{
return new TThRecurrenceRule();
}
else if (frequency.equals(MWFRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWFRecurrenceRule.FREQ))
{
return new MWFRecurrenceRule();
}
else if (frequency.equals(MonthlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MonthlyRecurrenceRule.FREQ))
{
return new MonthlyRecurrenceRule();
}
else if (frequency.equals(YearlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(YearlyRecurrenceRule.FREQ))
{
return new YearlyRecurrenceRule();
}
else if (frequency.equals(MWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWRecurrenceRule.FREQ))
{
return new MWRecurrenceRule();
}
else if (frequency.equals(SMWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMWRecurrenceRule.FREQ))
{
return new SMWRecurrenceRule();
}
else if (frequency.equals(SMTWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMTWRecurrenceRule.FREQ))
{
return new SMTWRecurrenceRule();
}
else if (frequency.equals(STTRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(STTRecurrenceRule.FREQ))
{
return new STTRecurrenceRule();
}
Expand All @@ -1069,43 +1069,43 @@ else if (frequency.equals(STTRecurrenceRule.FREQ))
*/
public RecurrenceRule newRecurrence(String frequency, int interval)
{
if (frequency.equals(DailyRecurrenceRule.FREQ))
if (frequency.equalsIgnoreCase(DailyRecurrenceRule.FREQ))
{
return new DailyRecurrenceRule(interval);
}
else if (frequency.equals(WeeklyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(WeeklyRecurrenceRule.FREQ))
{
return new WeeklyRecurrenceRule(interval);
}
else if (frequency.equals(TThRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(TThRecurrenceRule.FREQ))
{
return new TThRecurrenceRule(interval);
}
else if (frequency.equals(MWFRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWFRecurrenceRule.FREQ))
{
return new MWFRecurrenceRule(interval);
}
else if (frequency.equals(MonthlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MonthlyRecurrenceRule.FREQ))
{
return new MonthlyRecurrenceRule(interval);
}
else if (frequency.equals(YearlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(YearlyRecurrenceRule.FREQ))
{
return new YearlyRecurrenceRule(interval);
}
else if (frequency.equals(MWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWRecurrenceRule.FREQ))
{
return new MWRecurrenceRule(interval);
}
else if (frequency.equals(SMWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMWRecurrenceRule.FREQ))
{
return new SMWRecurrenceRule(interval);
}
else if (frequency.equals(SMTWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMTWRecurrenceRule.FREQ))
{
return new SMTWRecurrenceRule(interval);
}
else if (frequency.equals(STTRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(STTRecurrenceRule.FREQ))
{
return new STTRecurrenceRule(interval);
}
Expand All @@ -1120,43 +1120,43 @@ else if (frequency.equals(STTRecurrenceRule.FREQ))
public RecurrenceRule newRecurrence(String frequency, int interval, int count)
{
M_log.debug("\n"+ frequency +"\nand Internval is \n "+ interval +"count is\n " + count);
if (frequency.equals(DailyRecurrenceRule.FREQ))
if (frequency.equalsIgnoreCase(DailyRecurrenceRule.FREQ))
{
return new DailyRecurrenceRule(interval, count);
}
else if (frequency.equals(WeeklyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(WeeklyRecurrenceRule.FREQ))
{
return new WeeklyRecurrenceRule(interval, count);
}
else if (frequency.equals(TThRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(TThRecurrenceRule.FREQ))
{
return new TThRecurrenceRule(interval,count);
}
else if (frequency.equals(MWFRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWFRecurrenceRule.FREQ))
{
return new MWFRecurrenceRule(interval,count);
}
else if (frequency.equals(MonthlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MonthlyRecurrenceRule.FREQ))
{
return new MonthlyRecurrenceRule(interval, count);
}
else if (frequency.equals(YearlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(YearlyRecurrenceRule.FREQ))
{
return new YearlyRecurrenceRule(interval, count);
}
else if (frequency.equals(MWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWRecurrenceRule.FREQ))
{
return new MWRecurrenceRule(interval, count);
}
else if (frequency.equals(SMWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMWRecurrenceRule.FREQ))
{
return new SMWRecurrenceRule(interval, count);
}
else if (frequency.equals(SMTWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMTWRecurrenceRule.FREQ))
{
return new SMTWRecurrenceRule(interval, count);
}
else if (frequency.equals(STTRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(STTRecurrenceRule.FREQ))
{
return new STTRecurrenceRule(interval, count);
}
Expand All @@ -1169,43 +1169,43 @@ else if (frequency.equals(STTRecurrenceRule.FREQ))
*/
public RecurrenceRule newRecurrence(String frequency, int interval, Time until)
{
if (frequency.equals(DailyRecurrenceRule.FREQ))
if (frequency.equalsIgnoreCase(DailyRecurrenceRule.FREQ))
{
return new DailyRecurrenceRule(interval, until);
}
else if (frequency.equals(WeeklyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(WeeklyRecurrenceRule.FREQ))
{
return new WeeklyRecurrenceRule(interval, until);
}
else if (frequency.equals(TThRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(TThRecurrenceRule.FREQ))
{
return new TThRecurrenceRule(interval,until);
}
else if (frequency.equals(MWFRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWFRecurrenceRule.FREQ))
{
return new MWFRecurrenceRule(interval,until);
}
else if (frequency.equals(MonthlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MonthlyRecurrenceRule.FREQ))
{
return new MonthlyRecurrenceRule(interval, until);
}
else if (frequency.equals(YearlyRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(YearlyRecurrenceRule.FREQ))
{
return new YearlyRecurrenceRule(interval, until);
}
else if (frequency.equals(MWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(MWRecurrenceRule.FREQ))
{
return new MWRecurrenceRule(interval, until);
}
else if (frequency.equals(SMWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMWRecurrenceRule.FREQ))
{
return new SMWRecurrenceRule(interval, until);
}
else if (frequency.equals(SMTWRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(SMTWRecurrenceRule.FREQ))
{
return new SMTWRecurrenceRule(interval, until);
}
else if (frequency.equals(STTRecurrenceRule.FREQ))
else if (frequency.equalsIgnoreCase(STTRecurrenceRule.FREQ))
{
return new STTRecurrenceRule(interval, until);
}
Expand Down

0 comments on commit b63a131

Please sign in to comment.