Fixes and performance tweaks to new calendar APIs in relation to fixes merged in rev 30797.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30805 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2011-09-27 13:59:51 +00:00
parent e556b1070f
commit 4a3dedf7b1
2 changed files with 18 additions and 2 deletions

View File

@@ -111,6 +111,16 @@ public abstract class AbstractCalendarWebScript extends DeclarativeWebScript
return null;
}
// todays date - ignore time as we want all of today
if (date.equalsIgnoreCase("NOW"))
{
Date ddate = new Date();
ddate.setHours(0);;
ddate.setMinutes(0);
ddate.setSeconds(0);
return ddate;
}
// Try as ISO8601
try
{

View File

@@ -123,8 +123,14 @@ public class UserCalendarEntriesGet extends AbstractCalendarWebScript
}
else
{
// All their sites
sites = siteService.listSites(AuthenticationUtil.getRunAsUser());
// All their sites (with optional limit)
int max = 0;
String strMax = req.getParameter("size");
if (strMax != null && strMax.length() != 0)
{
max = Integer.parseInt(strMax);
}
sites = siteService.listSites(AuthenticationUtil.getRunAsUser(), max);
}
// We need to know the Site Names, and the NodeRefs of the calendar containers