@Override
public List<WorkDay> getWorkDaysForPeriod(Calendar begin, Calendar end, User user) {
if (begin == null) {
throw new PTException(
ErrorCode.ERR_WRONG_PARAMETER,
messageHelper.getErrorMessage(
ErrorCode.ERR_WRONG_PARAMETER,
new Object[]{"begin", begin},
"begin of the parameter is null."));
}
if (end == null || end.before(begin)) {
throw new PTException(
ErrorCode.ERR_WRONG_PARAMETER,
messageHelper.getErrorMessage(
ErrorCode.ERR_WRONG_PARAMETER,
new Object[]{"end", end},
"end of the parameter is null or period's end is before the period's begin."));
}
if (user == null) {
throw new PTException(
ErrorCode.ERR_WRONG_PARAMETER,
messageHelper.getErrorMessage(
ErrorCode.ERR_WRONG_PARAMETER,
new Object[]{"user", user},
"user of the parameter is null."));