public abstract class AbstractCalendarWebScript
extends org.springframework.extensions.webscripts.DeclarativeWebScript
Modifier and Type | Field and Description |
---|---|
protected org.alfresco.service.cmr.activities.ActivityService |
activityService |
static String |
CALENDAR_SERVICE_ACTIVITY_APP_NAME |
protected org.alfresco.service.cmr.calendar.CalendarService |
calendarService |
protected static int |
MAX_QUERY_ENTRY_COUNT
When no maximum or paging info is given, what should we use?
|
protected static String |
MSG_EVENT_NOT_FOUND |
protected static String |
MSG_INVALID_JSON |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
protected static String |
PARAM_END_AT |
protected static String |
PARAM_ISO8601 |
protected static String |
PARAM_START_AT |
protected static String |
PARAM_TIMEZONE |
protected org.alfresco.service.cmr.site.SiteService |
siteService |
Constructor and Description |
---|
AbstractCalendarWebScript() |
Modifier and Type | Method and Description |
---|---|
protected String |
addActivityEntry(String event,
org.alfresco.service.cmr.calendar.CalendarEntry entry,
org.alfresco.service.cmr.site.SiteInfo site,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.json.simple.JSONObject json)
Generates an activity entry for the entry
|
protected Map<String,Object> |
buildError(String message)
Equivalent of jsonError in the old JavaScript controllers
|
protected org.alfresco.query.PagingRequest |
buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
Builds up a listing Paging request, either using the defaults or
the paging options specified
|
protected org.alfresco.service.cmr.repository.NodeRef |
createIgnoreEvent(org.springframework.extensions.webscripts.WebScriptRequest req,
org.alfresco.service.cmr.calendar.CalendarEntry parent)
For an event that is a recurring event, have an ignored child event
generated for it
|
protected abstract Map<String,Object> |
executeImpl(org.alfresco.service.cmr.site.SiteInfo site,
String eventName,
org.springframework.extensions.webscripts.WebScriptRequest req,
org.json.simple.JSONObject json,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache) |
protected Map<String,Object> |
executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req,
org.springframework.extensions.webscripts.Status status,
org.springframework.extensions.webscripts.Cache cache) |
protected boolean |
extractDates(org.alfresco.service.cmr.calendar.CalendarEntry entry,
org.json.simple.JSONObject json)
Extracts the Start and End details, along with the All Day flag
from the JSON, and returns if the event is all day or not
|
protected String |
getOrNull(org.json.simple.JSONObject json,
String key) |
protected Date |
parseDate(String date)
Gets the date from the String, trying the various formats
(New and Legacy) until one works...
|
protected String |
removeTimeZoneIfRequired(Date date,
Boolean isAllDay,
Boolean removeTimezone)
Removes the time zone for a given date if the Calendar Entry is an all day event
|
protected String |
removeTimeZoneIfRequired(Date date,
Boolean isAllDay,
Boolean removeTimezone,
String datePattern)
Removes the time zone for a given date if the Calendar Entry is an all day event
|
void |
setActivityService(org.alfresco.service.cmr.activities.ActivityService activityService) |
void |
setCalendarService(org.alfresco.service.cmr.calendar.CalendarService calendarService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setSiteService(org.alfresco.service.cmr.site.SiteService siteService) |
protected boolean |
useJSONErrors()
Normally the Calendar webscripts return a 200 with JSON
containing the error message.
|
execute, executeFinallyImpl, executeImpl, executeImpl, getTemplateModel, renderFormatTemplate
addModuleBundleToCache, checkModuleBundleCache, createArgs, createArgsM, createHeaders, createHeadersM, createScriptParameters, createStatusException, createTemplateParameters, executeScript, getContainer, getDescription, getExecuteScript, getResources, getStatusTemplate, init, renderString, renderString, renderTemplate, sendStatus, setURLModelFactory, toString
public static final String CALENDAR_SERVICE_ACTIVITY_APP_NAME
protected static final String MSG_EVENT_NOT_FOUND
protected static final String MSG_INVALID_JSON
protected static final String PARAM_TIMEZONE
protected static final String PARAM_START_AT
protected static final String PARAM_END_AT
protected static final String PARAM_ISO8601
protected static final int MAX_QUERY_ENTRY_COUNT
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected org.alfresco.service.cmr.site.SiteService siteService
protected org.alfresco.service.cmr.activities.ActivityService activityService
protected org.alfresco.service.cmr.calendar.CalendarService calendarService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
public void setActivityService(org.alfresco.service.cmr.activities.ActivityService activityService)
public void setCalendarService(org.alfresco.service.cmr.calendar.CalendarService calendarService)
protected Date parseDate(String date)
protected boolean extractDates(org.alfresco.service.cmr.calendar.CalendarEntry entry, org.json.simple.JSONObject json) throws org.json.JSONException
org.json.JSONException
protected String getOrNull(org.json.simple.JSONObject json, String key) throws org.json.JSONException
org.json.JSONException
protected org.alfresco.query.PagingRequest buildPagingRequest(org.springframework.extensions.webscripts.WebScriptRequest req)
protected boolean useJSONErrors()
protected Map<String,Object> buildError(String message)
protected String addActivityEntry(String event, org.alfresco.service.cmr.calendar.CalendarEntry entry, org.alfresco.service.cmr.site.SiteInfo site, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json)
protected org.alfresco.service.cmr.repository.NodeRef createIgnoreEvent(org.springframework.extensions.webscripts.WebScriptRequest req, org.alfresco.service.cmr.calendar.CalendarEntry parent)
protected Map<String,Object> executeImpl(org.springframework.extensions.webscripts.WebScriptRequest req, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
executeImpl
in class org.springframework.extensions.webscripts.DeclarativeWebScript
protected String removeTimeZoneIfRequired(Date date, Boolean isAllDay, Boolean removeTimezone)
protected String removeTimeZoneIfRequired(Date date, Boolean isAllDay, Boolean removeTimezone, String datePattern)
protected abstract Map<String,Object> executeImpl(org.alfresco.service.cmr.site.SiteInfo site, String eventName, org.springframework.extensions.webscripts.WebScriptRequest req, org.json.simple.JSONObject json, org.springframework.extensions.webscripts.Status status, org.springframework.extensions.webscripts.Cache cache)
Copyright © 2005–2017 Alfresco Software. All rights reserved.