@Override
public boolean buildWeeklyTask(String name, String domain, Date period) {
ServiceReport serviceReport = queryDailyReportsByDuration(domain, period, new Date(period.getTime()
+ TimeHelper.ONE_WEEK));
WeeklyReport report = new WeeklyReport();
report.setContent("");
report.setCreationDate(new Date());
report.setDomain(domain);
report.setIp(NetworkInterfaceManager.INSTANCE.getLocalHostAddress());
report.setName(name);
report.setPeriod(period);
report.setType(1);
byte[] binaryContent = DefaultNativeBuilder.build(serviceReport);
return m_reportService.insertWeeklyReport(report, binaryContent);
}