Class CalendarWebService


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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.openmeetings.db.dto.basic.ServiceResult delete​(java.lang.String sid, java.lang.Long id)
      delete a calendar event If the given sid is from an Administrator or Web-Service user, the user can delete any appointment.
      org.apache.openmeetings.db.dto.calendar.AppointmentDTO getByRoom​(java.lang.String sid, long roomid)
      Load a calendar event by its room id
      java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> getByTitle​(java.lang.String sid, java.lang.String title)
      Search a calendar event for the current SID
      org.apache.openmeetings.db.dto.calendar.AppointmentDTO next​(java.lang.String sid)
      Get the next Calendar event for the current user of the SID
      org.apache.openmeetings.db.dto.calendar.AppointmentDTO nextForUser​(java.lang.String sid, long userid)
      Get the next Calendar event for userId
      java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> range​(java.lang.String sid, java.util.Calendar start, java.util.Calendar end)
      Load appointments by a start / end range for the current SID
      java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> rangeForUser​(java.lang.String sid, long userid, java.util.Calendar start, java.util.Calendar end)
      Load appointments by a start / end range for the userId
      org.apache.openmeetings.db.dto.calendar.AppointmentDTO save​(java.lang.String sid, org.apache.openmeetings.db.dto.calendar.AppointmentDTO appointment)
      Save an appointment
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CalendarWebService

        public CalendarWebService()
    • Method Detail

      • range

        @GET
        @Path("/{start}/{end}")
        public java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> range​(@QueryParam("sid")
                                                                                            java.lang.String sid,
                                                                                            @PathParam("start")
                                                                                            java.util.Calendar start,
                                                                                            @PathParam("end")
                                                                                            java.util.Calendar end)
        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
      • rangeForUser

        @GET
        @Path("/{userid}/{start}/{end}")
        public java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> rangeForUser​(@QueryParam("sid")
                                                                                                   java.lang.String sid,
                                                                                                   @PathParam("userid")
                                                                                                   long userid,
                                                                                                   @PathParam("start")
                                                                                                   java.util.Calendar start,
                                                                                                   @PathParam("end")
                                                                                                   java.util.Calendar end)
        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
      • next

        @GET
        @Path("/next")
        public org.apache.openmeetings.db.dto.calendar.AppointmentDTO next​(@QueryParam("sid")
                                                                           java.lang.String sid)
        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
      • nextForUser

        @GET
        @Path("/next/{userid}")
        public org.apache.openmeetings.db.dto.calendar.AppointmentDTO nextForUser​(@QueryParam("sid")
                                                                                  java.lang.String sid,
                                                                                  @PathParam("userid")
                                                                                  long userid)
        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
      • getByRoom

        @GET
        @Path("/room/{roomid}")
        public org.apache.openmeetings.db.dto.calendar.AppointmentDTO getByRoom​(@QueryParam("sid")
                                                                                java.lang.String sid,
                                                                                @PathParam("roomid")
                                                                                long roomid)
        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
      • getByTitle

        @GET
        @Path("/title/{title}")
        public java.util.List<org.apache.openmeetings.db.dto.calendar.AppointmentDTO> getByTitle​(@QueryParam("sid")
                                                                                                 java.lang.String sid,
                                                                                                 @PathParam("title")
                                                                                                 java.lang.String title)
        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
      • save

        @POST
        @Path("/")
        public org.apache.openmeetings.db.dto.calendar.AppointmentDTO save​(@QueryParam("sid")
                                                                           java.lang.String sid,
                                                                           @FormParam("appointment")
                                                                           org.apache.openmeetings.db.dto.calendar.AppointmentDTO appointment)
        Save an appointment
        Parameters:
        sid - The SID of the User. This SID must be marked as Loggedin
        appointment - calendar event
        Returns:
        - appointment saved
      • delete

        @DELETE
        @Path("/{id}")
        public org.apache.openmeetings.db.dto.basic.ServiceResult delete​(@QueryParam("sid")
                                                                         java.lang.String sid,
                                                                         @PathParam("id")
                                                                         java.lang.Long id)
        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