Class CalendarWebService

java.lang.Object
org.apache.openmeetings.webservice.BaseWebService
org.apache.openmeetings.webservice.CalendarWebService

@Service("calendarWebService") @Produces("application/json") @Path("/calendar") public class CalendarWebService extends BaseWebService
CalendarService contains methods to create, edit delete calendar meetings
Author:
sebawagner
  • Constructor Details

    • CalendarWebService

      public CalendarWebService()
  • Method Details

    • range

      @GET @Path("/{start}/{end}") public List<AppointmentDTO> range(@QueryParam("sid") String sid, @PathParam("start") Calendar start, @PathParam("end") Calendar end) throws ServiceException
      Load appointments by a start / end range for the current SID
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      start - start time
      end - end time
      Returns:
      - list of appointments in range
      Throws:
      ServiceException
    • rangeForUser

      @GET @Path("/{userid}/{start}/{end}") public List<AppointmentDTO> rangeForUser(@QueryParam("sid") String sid, @PathParam("userid") long userid, @PathParam("start") Calendar start, @PathParam("end") Calendar end) throws ServiceException
      Load appointments by a start / end range for the userId
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      userid - the userId the calendar events should be loaded
      start - start time
      end - end time
      Returns:
      - list of appointments in range
      Throws:
      ServiceException
    • next

      @GET @Path("/next") public AppointmentDTO next(@QueryParam("sid") String sid) throws ServiceException
      Get the next Calendar event for the current USER of the SID
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      Returns:
      - next Calendar event
      Throws:
      ServiceException
    • nextForUser

      @GET @Path("/next/{userid}") public AppointmentDTO nextForUser(@QueryParam("sid") String sid, @PathParam("userid") long userid) throws ServiceException
      Get the next Calendar event for userId
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      userid - the userId the calendar events should be loaded
      Returns:
      - next Calendar event
      Throws:
      ServiceException
    • getByRoom

      @GET @Path("/room/{roomid}") public AppointmentDTO getByRoom(@QueryParam("sid") String sid, @PathParam("roomid") long roomid) throws ServiceException
      Load a calendar event by its room id
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      roomid - id of appointment special room
      Returns:
      - calendar event by its room id
      Throws:
      ServiceException
    • getByTitle

      @GET @Path("/title/{title}") public List<AppointmentDTO> getByTitle(@QueryParam("sid") String sid, @PathParam("title") String title) throws ServiceException
      Search a calendar event for the current SID
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      title - the search string
      Returns:
      - calendar event list
      Throws:
      ServiceException
    • save

      @POST @Path("/") public AppointmentDTO save(@QueryParam("sid") String sid, @FormParam("appointment") AppointmentDTO appointment) throws ServiceException
      Create an appointment
      Parameters:
      sid - The SID of the User. This SID must be marked as Loggedin
      appointment - calendar event
      Returns:
      - appointment saved
      Throws:
      ServiceException
    • delete

      @DELETE @Path("/{id}") public ServiceResult delete(@QueryParam("sid") String sid, @PathParam("id") Long id) throws ServiceException
      delete a calendar event If the given sid is from an Administrator or Web-Service USER, the USER can delete any appointment. If the sid is assigned to a regular USER, he can only delete appointments where he is also the owner/creator of the appointment
      Parameters:
      sid - an authenticated SID
      id - the id to delete
      Returns:
      ServiceResult with result type
      Throws:
      ServiceException