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 BaseWebServiceCalendarService contains methods to create, edit delete calendar meetings- Author:
- sebawagner
-
-
Field Summary
-
Fields inherited from class org.apache.openmeetings.webservice.BaseWebService
fileDao, roomDao, sessionDao, userDao
-
-
Constructor Summary
Constructors Constructor Description CalendarWebService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceResultdelete(String sid, Long id)delete a calendar event If the given sid is from an Administrator or Web-Service USER, the USER can delete any appointment.AppointmentDTOgetByRoom(String sid, long roomid)Load a calendar event by its room idList<AppointmentDTO>getByTitle(String sid, String title)Search a calendar event for the current SIDAppointmentDTOnext(String sid)Get the next Calendar event for the current USER of the SIDAppointmentDTOnextForUser(String sid, long userid)Get the next Calendar event for userIdList<AppointmentDTO>range(String sid, Calendar start, Calendar end)Load appointments by a start / end range for the current SIDList<AppointmentDTO>rangeForUser(String sid, long userid, Calendar start, Calendar end)Load appointments by a start / end range for the userIdAppointmentDTOsave(String sid, AppointmentDTO appointment)Create an appointment
-
-
-
Method Detail
-
range
@GET @Path("/{start}/{end}") public List<AppointmentDTO> range(@QueryParam("sid") String sid, @PathParam("start") Calendar start, @PathParam("end") Calendar end) throws ServiceExceptionLoad appointments by a start / end range for the current SID- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinstart- start timeend- 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 ServiceExceptionLoad appointments by a start / end range for the userId- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinuserid- the userId the calendar events should be loadedstart- start timeend- end time- Returns:
- - list of appointments in range
- Throws:
ServiceException
-
next
@GET @Path("/next") public AppointmentDTO next(@QueryParam("sid") String sid) throws ServiceExceptionGet 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 ServiceExceptionGet the next Calendar event for userId- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinuserid- 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 ServiceExceptionLoad a calendar event by its room id- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinroomid- 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 ServiceExceptionSearch a calendar event for the current SID- Parameters:
sid- The SID of the User. This SID must be marked as Loggedintitle- the search string- Returns:
- - calendar event list
- Throws:
ServiceException
-
save
@POST @Path("/") public AppointmentDTO save(@QueryParam("sid") String sid, @FormParam("appointment") AppointmentDTO appointment) throws ServiceExceptionCreate an appointment- Parameters:
sid- The SID of the User. This SID must be marked as Loggedinappointment- calendar event- Returns:
- - appointment saved
- Throws:
ServiceException
-
delete
@DELETE @Path("/{id}") public ServiceResult delete(@QueryParam("sid") String sid, @PathParam("id") Long id) throws ServiceExceptiondelete 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 SIDid- the id to delete- Returns:
ServiceResultwith result type- Throws:
ServiceException
-
-