|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.webservice.cs.calendar.CalendarWebservice
public class CalendarWebservice
The CalendarWebservice class contains services to interact with the Calendar application and its data in a RESTFull manner. These services are accessible from within the Platform and outside. For example, Gadgets and Mobile applications can use them.
| Field Summary | |
|---|---|
static String |
BASE_EVENT_URL
|
static String |
BASE_RSS_URL
|
static String |
BASE_URL
|
static String |
BASE_URL_PRIVATE
|
static String |
BASE_URL_PUBLIC
|
static String |
PRIVATE
|
| Constructor Summary | |
|---|---|
CalendarWebservice()
|
|
| Method Summary | |
|---|---|
javax.ws.rs.core.Response |
checkPermission(String username,
String calendarId,
String type)
Checks permission of the currently logged 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 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 basing 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, a list of calendar Ids, from time, to time and the size limitation. |
javax.ws.rs.core.Response |
getOccurrenceEvent(String eventId,
String recurId)
Produces the content of an occurrence of repetitive event basing on its event id and recur id It requires authentication and permission of the _Users_ group only. |
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)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
public CalendarWebservice()
| Method Detail |
|---|
@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 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 - User name of requested usereventFeedName - Contain _eventId_ and _CalType_.
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.
Exception
public 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 Calendar ID of the subscribed calendar.type - 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 - Require the user Id for authentication and look 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. 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 eventrecurid - The id of the occurrence
Exception
public javax.ws.rs.core.Response processInvitationReply(String calendarId,
String calType,
String eventId,
String inviter,
String invitee,
String eXoId,
String answer)
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 user Id of the inviter (owner of invitation).invitee - The user Id of the receiver/participant.eXoId - The user Id when being logged in.answer - The answer of invitation, such as _accept_, _refuse_, or _not sure_.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||