public class CalendarWebservice extends Object implements org.exoplatform.services.rest.resource.ResourceContainer
| Modifier and Type | Field and Description |
|---|---|
static String |
BASE_EVENT_URL |
static String |
BASE_RSS_URL |
static String |
BASE_URL |
static String |
BASE_URL_PRIVATE |
static String |
BASE_URL_PUBLIC |
protected static javax.ws.rs.core.CacheControl |
cc |
static String |
PRIVATE |
| Constructor and Description |
|---|
CalendarWebservice(org.exoplatform.calendar.service.ExtendedCalendarService xCalService) |
| Modifier and Type | Method and Description |
|---|---|
static org.exoplatform.calendar.service.CalendarService |
calendarServiceInstance() |
javax.ws.rs.core.Response |
checkPermission(String username,
String calendarId,
String type)
Checks permission of the currently logged-in user on any calendar by the given calendar Id.
|
javax.ws.rs.core.Response |
event(String username,
String eventFeedName)
Provides details of an event with the given username and the event Id.
|
javax.ws.rs.core.Response |
feed(String username,
String feedname,
String filename,
javax.ws.rs.core.UriInfo uri)
Returns the XML RSS feed data of one user's calendar.
|
javax.ws.rs.core.Response |
getCalendars()
Retrieves all data of a private (personal) calendar of a logged-in user.
|
javax.ws.rs.core.Response |
getEvent(String eventid)
Produces the content of a given private event, based on its Id.
|
javax.ws.rs.core.Response |
getEventById(String eventid)
Returns the details of an event identified by its Id.
|
javax.ws.rs.core.Response |
getEvents(String type,
String calids,
long from,
long to,
long limit)
Gets a list of personal events by their type, calendar Ids, the starting/ending time, and the maximum number of returned events.
|
javax.ws.rs.core.Response |
getOccurrenceEvent(String eventId,
String recurId)
Produces the content of an occurrence of a repetitive event, based on its event Id and occurrence Id.
|
protected String |
makeFeed(String author,
List<org.exoplatform.calendar.service.CalendarEvent> events,
org.exoplatform.calendar.service.FeedData feedData,
javax.ws.rs.core.UriInfo uri) |
javax.ws.rs.core.Response |
privateProcess(String username,
String calendarId,
String type)
Generates the ICalendar data from a given calendar Id.
|
javax.ws.rs.core.Response |
processInvitationReply(String calendarId,
String calType,
String eventId,
String inviter,
String invitee,
String eXoId,
String answer,
javax.ws.rs.core.HttpHeaders headers,
String language)
Provides the end-point to answer or reply an invitation to join any given event by its Id.
|
javax.ws.rs.core.Response |
publicProcess(String username,
String calendarId,
String type)
Provides an end-point to subscribe a calendar of the platform.
|
javax.ws.rs.core.Response |
upcomingEvent(String currentdatetime,
String type,
int limit)
Lists upcoming events or tasks by the current date.
|
javax.ws.rs.core.Response |
updateStatus(String taskid,
int statusId)
Allows users to update the status of a task.
|
public static final String PRIVATE
public static final String BASE_URL
public static final String BASE_RSS_URL
public static final String BASE_EVENT_URL
public static final String BASE_URL_PUBLIC
public static final String BASE_URL_PRIVATE
protected static final javax.ws.rs.core.CacheControl cc
public CalendarWebservice(org.exoplatform.calendar.service.ExtendedCalendarService xCalService)
public static org.exoplatform.calendar.service.CalendarService calendarServiceInstance()
@RolesAllowed(value="users") public javax.ws.rs.core.Response checkPermission(String username, String calendarId, String type) throws Exception
username - The given user's Id, or the currently logged-in user.calendarId - The given calendar Id on which the permission is checked.type - The calendar type: _private_, _public_ or _shared_.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response event(String username, String eventFeedName) throws Exception
username - The username of the requested user.eventFeedName - A string which contains the event Id and the calendar type.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response feed(String username, String feedname, String filename, @Context javax.ws.rs.core.UriInfo uri) throws Exception
username - The requested username.feedname - The name of the RSS feed.filename - The file name.Exceptionprotected String makeFeed(String author, List<org.exoplatform.calendar.service.CalendarEvent> events, org.exoplatform.calendar.service.FeedData feedData, javax.ws.rs.core.UriInfo uri) throws Exception
author - : the feed createevents - : list of event from dataExceptionpublic javax.ws.rs.core.Response publicProcess(String username, String calendarId, String type) throws Exception
username - The given Id of the user who wants to get data.calendarId - The Id of the subscribed calendar.type - The type of the subscribed calendar, such as _personal_, _shared_, and _public_.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response privateProcess(String username, String calendarId, String type) throws Exception
username - Requires the user Id for authentication and looks up the personal calendar.calendarId - The given calendar Id to look up.type - The calendar type, such as _private_, _shared_, _public_.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getEvents(String type, String calids, long from, long to, long limit)
type - The type of the events. The possible values are "_Event_" and "_Task_".calids - A string of calendar Ids separated by commas (,).from - A value of period (in miliseconds) during which the events are started.to - A value of period (in miliseconds) during which the events are ended.limit - The maximum number of returned events.@RolesAllowed(value="users") public javax.ws.rs.core.Response upcomingEvent(String currentdatetime, String type, int limit) throws Exception
currentdatetime - The current date using the ISO 8601 format (_yyyyMMdd_).type - The event or task.limit - The maximum number of events returned by the current date.Exception - : HTTPStatus.INTERNAL_ERROR , HTTPStatus.UNAUTHORIZED , HTTPStatus.NO_CONTENT@RolesAllowed(value="users") public javax.ws.rs.core.Response updateStatus(String taskid, int statusId) throws Exception
taskid - The given task Id.statusId - The Id of the status. The possible values are 1 - _Need action_, 2 - _In Progress_, 3 - _Completed_, and 4 - _Cancelled_.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getCalendars() throws Exception
Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getEvent(String eventid) throws Exception
eventid - The event Id.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getEventById(String eventid) throws Exception
eventid - The event Id.Exception@RolesAllowed(value="users") public javax.ws.rs.core.Response getOccurrenceEvent(String eventId, String recurId) throws Exception
eventId - The Id of the original event.recurId - The occurrence Id of the event.Exceptionpublic javax.ws.rs.core.Response processInvitationReply(String calendarId, String calType, String eventId, String inviter, String invitee, String eXoId, String answer, @Context javax.ws.rs.core.HttpHeaders headers, String language) throws Exception
calendarId - The calendar Id to which the event belongs.calType - The calendar type, such as _public_, _private_, and _shared_.eventId - The Id which retrieves the event data.inviter - The Id of the invitation sender.invitee - The Id of the receiver/participant.eXoId - The logged-in user Id.answer - The answer of invitation, such as _accept_, _refuse_, or _not sure_.ExceptionCopyright © 2003–2017 eXo Platform SAS. All rights reserved.