Class RestUtils


  • public class RestUtils
    extends Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkCalendar​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.rest.model.EventEntity eventEntity)  
      static void cleanupAttachedEntitiesIds​(org.exoplatform.agenda.rest.model.EventEntity eventEntity)  
      static org.exoplatform.agenda.model.Event createEventEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId, String timeZoneId)  
      static void fillAttendees​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, ZonedDateTime occurrenceId, Map<Long,​org.exoplatform.agenda.model.EventAttendeeList> attendeesByParentEventId, long userIdentityId)  
      static void fillConferences​(org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, Map<Long,​List<org.exoplatform.agenda.model.EventConference>> conferencesByParentEventId)  
      static void fillDateOptions​(org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, ZoneId userTimeZone, Map<Long,​List<org.exoplatform.agenda.rest.model.EventDateOptionEntity>> dateOptionsByParentEventId)  
      static void fillReminders​(org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId)  
      static void fillReminders​(org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId, Map<Long,​List<org.exoplatform.agenda.model.EventReminder>> remindersByParentEventId)  
      static void fillRemoteEvent​(org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId)  
      static void fillRemoteEvent​(org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService, org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId, Map<Long,​org.exoplatform.agenda.model.RemoteEvent> remoteEventByParentEventId)  
      static String getBasePortalURI()  
      static String getBaseRestURI()  
      static String getCurrentUser()  
      static org.exoplatform.social.core.identity.model.Identity getCurrentUserIdentity​(org.exoplatform.social.core.manager.IdentityManager identityManager)  
      static long getCurrentUserIdentityId​(org.exoplatform.social.core.manager.IdentityManager identityManager)  
      static org.exoplatform.agenda.rest.model.EventEntity getEventByIdAndUser​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService, org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.service.AgendaEventGuestService agendaEventGuestService, long eventId, boolean firstOccurrence, long identityId, ZonedDateTime occurrenceId, ZoneId userTimeZone, List<String> expandProperties)  
      static org.exoplatform.agenda.rest.model.EventEntity getEventEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService, org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.service.AgendaEventGuestService agendaEventGuestService, org.exoplatform.agenda.model.Event event, ZonedDateTime occurrenceId, ZoneId userTimeZone, List<String> expandProperties)  
      static org.exoplatform.agenda.rest.model.EventSearchResultEntity getEventSearchResultEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService, org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService, org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService, org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService, org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService, org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService, org.exoplatform.agenda.model.EventSearchResult eventSearchResult, ZonedDateTime occurrenceId, ZoneId userTimeZone, List<String> expandProperties)  
      static String getIdentityId​(org.exoplatform.social.rest.entity.IdentityEntity identityEntity, org.exoplatform.social.core.manager.IdentityManager identityManager)  
      static Integer getIntegerValue​(javax.ws.rs.core.UriInfo uriInfo, String name)  
      static String getQueryParam​(javax.ws.rs.core.UriInfo uriInfo, String name)  
      static org.exoplatform.agenda.model.RemoteEvent getRemoteEvent​(org.exoplatform.agenda.rest.model.EventEntity eventEntity, long userIdentityId)  
      static boolean isComputedOccurrence​(org.exoplatform.agenda.rest.model.EventEntity eventEntity)  
    • Method Detail

      • getCurrentUser

        public static final String getCurrentUser()
      • getCurrentUserIdentity

        public static final org.exoplatform.social.core.identity.model.Identity getCurrentUserIdentity​(org.exoplatform.social.core.manager.IdentityManager identityManager)
      • getCurrentUserIdentityId

        public static final long getCurrentUserIdentityId​(org.exoplatform.social.core.manager.IdentityManager identityManager)
      • getBaseRestURI

        public static String getBaseRestURI()
      • getBasePortalURI

        public static String getBasePortalURI()
      • getIdentityId

        public static String getIdentityId​(org.exoplatform.social.rest.entity.IdentityEntity identityEntity,
                                           org.exoplatform.social.core.manager.IdentityManager identityManager)
      • getIntegerValue

        public static Integer getIntegerValue​(javax.ws.rs.core.UriInfo uriInfo,
                                              String name)
      • getQueryParam

        public static String getQueryParam​(javax.ws.rs.core.UriInfo uriInfo,
                                           String name)
      • createEventEntity

        public static org.exoplatform.agenda.model.Event createEventEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                                                           org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService,
                                                                           org.exoplatform.agenda.service.AgendaEventService agendaEventService,
                                                                           org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                                                           long userIdentityId,
                                                                           String timeZoneId)
                                                                    throws org.exoplatform.agenda.exception.AgendaException,
                                                                           IllegalAccessException
        Throws:
        org.exoplatform.agenda.exception.AgendaException
        IllegalAccessException
      • checkCalendar

        public static void checkCalendar​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                         org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService,
                                         org.exoplatform.agenda.rest.model.EventEntity eventEntity)
                                  throws org.exoplatform.agenda.exception.AgendaException
        Throws:
        org.exoplatform.agenda.exception.AgendaException
      • getEventByIdAndUser

        public static org.exoplatform.agenda.rest.model.EventEntity getEventByIdAndUser​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                                                                        org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService,
                                                                                        org.exoplatform.agenda.service.AgendaEventService agendaEventService,
                                                                                        org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService,
                                                                                        org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService,
                                                                                        org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService,
                                                                                        org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService,
                                                                                        org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService,
                                                                                        org.exoplatform.agenda.service.AgendaEventGuestService agendaEventGuestService,
                                                                                        long eventId,
                                                                                        boolean firstOccurrence,
                                                                                        long identityId,
                                                                                        ZonedDateTime occurrenceId,
                                                                                        ZoneId userTimeZone,
                                                                                        List<String> expandProperties)
                                                                                 throws IllegalAccessException
        Throws:
        IllegalAccessException
      • getEventEntity

        public static org.exoplatform.agenda.rest.model.EventEntity getEventEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                                                                   org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService,
                                                                                   org.exoplatform.agenda.service.AgendaEventService agendaEventService,
                                                                                   org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService,
                                                                                   org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService,
                                                                                   org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService,
                                                                                   org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService,
                                                                                   org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService,
                                                                                   org.exoplatform.agenda.service.AgendaEventGuestService agendaEventGuestService,
                                                                                   org.exoplatform.agenda.model.Event event,
                                                                                   ZonedDateTime occurrenceId,
                                                                                   ZoneId userTimeZone,
                                                                                   List<String> expandProperties)
      • getEventSearchResultEntity

        public static org.exoplatform.agenda.rest.model.EventSearchResultEntity getEventSearchResultEntity​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                                                                                           org.exoplatform.agenda.service.AgendaCalendarService agendaCalendarService,
                                                                                                           org.exoplatform.agenda.service.AgendaEventService agendaEventService,
                                                                                                           org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService,
                                                                                                           org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService,
                                                                                                           org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService,
                                                                                                           org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService,
                                                                                                           org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService,
                                                                                                           org.exoplatform.agenda.model.EventSearchResult eventSearchResult,
                                                                                                           ZonedDateTime occurrenceId,
                                                                                                           ZoneId userTimeZone,
                                                                                                           List<String> expandProperties)
      • fillAttendees

        public static void fillAttendees​(org.exoplatform.social.core.manager.IdentityManager identityManager,
                                         org.exoplatform.agenda.service.AgendaEventAttendeeService agendaEventAttendeeService,
                                         org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                         ZonedDateTime occurrenceId,
                                         Map<Long,​org.exoplatform.agenda.model.EventAttendeeList> attendeesByParentEventId,
                                         long userIdentityId)
      • fillConferences

        public static void fillConferences​(org.exoplatform.agenda.service.AgendaEventConferenceService agendaEventConferenceService,
                                           org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                           Map<Long,​List<org.exoplatform.agenda.model.EventConference>> conferencesByParentEventId)
      • fillReminders

        public static void fillReminders​(org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService,
                                         org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                         long userIdentityId,
                                         Map<Long,​List<org.exoplatform.agenda.model.EventReminder>> remindersByParentEventId)
      • fillDateOptions

        public static void fillDateOptions​(org.exoplatform.agenda.service.AgendaEventDatePollService agendaEventDatePollService,
                                           org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                           ZoneId userTimeZone,
                                           Map<Long,​List<org.exoplatform.agenda.rest.model.EventDateOptionEntity>> dateOptionsByParentEventId)
      • fillRemoteEvent

        public static void fillRemoteEvent​(org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService,
                                           org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                           long userIdentityId)
      • fillRemoteEvent

        public static void fillRemoteEvent​(org.exoplatform.agenda.service.AgendaRemoteEventService agendaRemoteEventService,
                                           org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                           long userIdentityId,
                                           Map<Long,​org.exoplatform.agenda.model.RemoteEvent> remoteEventByParentEventId)
      • getRemoteEvent

        public static org.exoplatform.agenda.model.RemoteEvent getRemoteEvent​(org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                                                              long userIdentityId)
      • fillReminders

        public static void fillReminders​(org.exoplatform.agenda.service.AgendaEventReminderService agendaEventReminderService,
                                         org.exoplatform.agenda.rest.model.EventEntity eventEntity,
                                         long userIdentityId)
      • isComputedOccurrence

        public static boolean isComputedOccurrence​(org.exoplatform.agenda.rest.model.EventEntity eventEntity)
      • cleanupAttachedEntitiesIds

        public static void cleanupAttachedEntitiesIds​(org.exoplatform.agenda.rest.model.EventEntity eventEntity)