org.exoplatform.webservice.cs.calendar
Class CalendarWebservice

java.lang.Object
  extended by org.exoplatform.webservice.cs.calendar.CalendarWebservice
All Implemented Interfaces:
org.exoplatform.services.rest.resource.ResourceContainer

public class CalendarWebservice
extends Object
implements org.exoplatform.services.rest.resource.ResourceContainer

Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Sep 15, 2009


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)
           
 javax.ws.rs.core.Response event(String username, String eventFeedName)
           
 javax.ws.rs.core.Response feed(String username, String feedname, String filename, javax.ws.rs.core.UriInfo uri)
           
 javax.ws.rs.core.Response getCalendars()
           
 javax.ws.rs.core.Response getEvent(String eventid)
           
 javax.ws.rs.core.Response getEvents(String type, String calids, long from, long to, long limit)
          get list of personal events by their type, list of calendar ids, from time, to time and the size limitation.
 javax.ws.rs.core.Response privateProcess(String username, String calendarId, String type)
           
 javax.ws.rs.core.Response processInvitationReply(String calendarId, String calType, String eventId, String inviter, String invitee, String eXoId, String answer)
           
 javax.ws.rs.core.Response publicProcess(String username, String calendarId, String type)
           
 javax.ws.rs.core.Response upcomingEvent(String currentdatetime, String type, int limit)
          listing up coming event or task given by current date time
 javax.ws.rs.core.Response updateStatus(String taskid, int statusId)
          Update status of a task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRIVATE

public static final String PRIVATE
See Also:
Constant Field Values

BASE_URL

public static final String BASE_URL

BASE_RSS_URL

public static final String BASE_RSS_URL

BASE_EVENT_URL

public static final String BASE_EVENT_URL

BASE_URL_PUBLIC

public static final String BASE_URL_PUBLIC

BASE_URL_PRIVATE

public static final String BASE_URL_PRIVATE
Constructor Detail

CalendarWebservice

public CalendarWebservice()
Method Detail

checkPermission

@RolesAllowed(value="users")
public javax.ws.rs.core.Response checkPermission(String username,
                                                              String calendarId,
                                                              String type)
                                          throws Exception
Parameters:
username - : user id
calendarId - : given calendar id
type - : calendar type private, public or share
Returns:
json data value
Throws:
Exception

event

@RolesAllowed(value="users")
public javax.ws.rs.core.Response event(String username,
                                                    String eventFeedName)
                                throws Exception
Parameters:
username - : requested user name
eventFeedName - : contains eventId and CalType
Returns:
: Rss feeds
Throws:
Exception

feed

@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
Parameters:
username - : requested user name
calendarId - : calendar id from system
type - : calendar type
Returns:
: Rss feeds
Throws:
Exception

publicProcess

public javax.ws.rs.core.Response publicProcess(String username,
                                               String calendarId,
                                               String type)
                                        throws Exception
Parameters:
username - :
calendarId -
type -
eventId -
Returns:
Icalendar data
Throws:
Exception

privateProcess

@RolesAllowed(value="users")
public javax.ws.rs.core.Response privateProcess(String username,
                                                             String calendarId,
                                                             String type)
                                         throws Exception
Parameters:
username - :
calendarId -
type -
eventId -
Returns:
Icalendar data
Throws:
Exception

getEvents

@RolesAllowed(value="users")
public javax.ws.rs.core.Response getEvents(String type,
                                                        String calids,
                                                        long from,
                                                        long to,
                                                        long limit)
get list of personal events by their type, list of calendar ids, from time, to time and the size limitation.

Parameters:
type - type of the events. The possible values are "Event" and "Task".
calids - a string contains calendar ids separated by commas (,).
from - long value of the time which the events are started after.
to - long value of the time which the events are started before.
limit - limit number of returned events.
Returns:
Response of a Json object. The json object includes the list of events saved in "info" property.

upcomingEvent

@RolesAllowed(value="users")
public javax.ws.rs.core.Response upcomingEvent(String currentdatetime,
                                                            String type,
                                                            int limit)
                                        throws Exception
listing up coming event or task given by current date time

Parameters:
username - : current loged-in user
currentdatetime - : current date time using ISO8601 format yyyyMMdd
type - : event or task
Returns:
page list of event or task
Throws:
Exception - : HTTPStatus.INTERNAL_ERROR , HTTPStatus.UNAUTHORIZED , HTTPStatus.NO_CONTENT

updateStatus

@RolesAllowed(value="users")
public javax.ws.rs.core.Response updateStatus(String taskid,
                                                           int statusId)
                                       throws Exception
Update status of a task

Parameters:
taskid -
statusId - id of the status. Possible values are: 1 - Need action, 2 - In Progress, 3 -Completed, 4 - Cancelled.
Returns:
true/false
Throws:
Exception

getCalendars

@RolesAllowed(value="users")
public javax.ws.rs.core.Response getCalendars()
                                       throws Exception
Throws:
Exception

getEvent

@RolesAllowed(value="users")
public javax.ws.rs.core.Response getEvent(String eventid)
                                   throws Exception
Throws:
Exception

processInvitationReply

public javax.ws.rs.core.Response processInvitationReply(String calendarId,
                                                        String calType,
                                                        String eventId,
                                                        String inviter,
                                                        String invitee,
                                                        String eXoId,
                                                        String answer)
                                                 throws Exception
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.