Package org.silverpeas.mobile.server.services

## Class ServiceNotifications

- java.lang.Object
- - org.silverpeas.core.web.rs.RESTWebService
  - - org.silverpeas.mobile.server.services.AbstractRestWebService
    - - org.silverpeas.mobile.server.services.ServiceNotifications

- All Implemented Interfaces:
    `org.silverpeas.core.web.rs.ProtectedWebResource`, `org.silverpeas.core.web.rs.WebAuthenticationValidation`, `org.silverpeas.core.web.rs.WebAuthorizationValidation`, `org.silverpeas.core.web.SilverpeasWebResource`

      @WebService
      @Authorized
      @Path("mobile/notification")
      public class ServiceNotifications
      extends AbstractRestWebService

  Service de gestion des Notifications.
  Author:
    svuillet

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService

      `org.silverpeas.core.web.rs.RESTWebService.WebProcess<R extends Object>, org.silverpeas.core.web.rs.RESTWebService.WebTreatment<R extends Object>`

  - ### Field Summary

    - ### Fields inherited from class org.silverpeas.mobile.server.services.AbstractRestWebService

      `MAINSESSIONCONTROLLER_ATTRIBUT_NAME`

    - ### Fields inherited from class org.silverpeas.core.web.rs.RESTWebService

      `RESPONSE_HEADER_ARRAYSIZE`

    - ### Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource

      `BASE_PATH`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ServiceNotifications()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `delete​(List<NotificationBoxDTO> selection)` |
    `List<BaseDTO>` | `getAllowedUsersAndGroups​(String componentId, String contentId)` |
    `String` | `getComponentId()` |
    `protected String` | `getResourceBasePath()` |
    `StreamingList<NotificationReceivedDTO>` | `getUserNotifications​(int callNumber)` |
    `StreamingList<NotificationSendedDTO>` | `getUserSendedNotifications​(int callNumber)` |
    `void` | `markAsRead​(List<NotificationBoxDTO> selection)` |
    `void` | `markAsReaden​(long id)` |
    `void` | `send​(NotificationToSendDTO notificationToSendDTO)` |
    `void` | `validateUserAuthorization​(org.silverpeas.core.web.rs.UserPrivilegeValidation validation)` |

    - ### Methods inherited from class org.silverpeas.mobile.server.services.AbstractRestWebService

      `createStreamingList, getMainSessionController, getSettings, initSilverpeasSession, makeStreamingList, setMainsessioncontroller`

    - ### Methods inherited from class org.silverpeas.core.web.rs.RESTWebService

      `createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getSilverpeasContext, getUri, getUser, getUserPreferences, getUserRoles, identifiedBy, identifiedBy, initContext, initWebResourceUri, isUserDefined, process`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation

      `validateUserAuthentication`

- - ### Constructor Detail

    - #### ServiceNotifications

          public ServiceNotifications()

  - ### Method Detail

    - #### getUserSendedNotifications

          @GET
          @Produces("application/json")
          @Path("sended/{callNumber}")
          public StreamingList<NotificationSendedDTO> getUserSendedNotifications​(@PathParam("callNumber")
                                                                                 int callNumber)
                                                                          throws Exception

      Throws:
        `Exception`

    - #### getUserNotifications

          @GET
          @Produces("application/json")
          @Path("received/{callNumber}")
          public StreamingList<NotificationReceivedDTO> getUserNotifications​(@PathParam("callNumber")
                                                                             int callNumber)

    - #### getAllowedUsersAndGroups

          @GET
          @Produces("application/json")
          @Path("allowedUsersAndGroups/{componentId}/{contentId}")
          public List<BaseDTO> getAllowedUsersAndGroups​(@PathParam("componentId")
                                                        String componentId,
                                                        @PathParam("contentId")
                                                        String contentId)
                                                 throws Exception

      Throws:
        `Exception`

    - #### markAsReaden

          @PUT
          @Produces("application/json")
          @Consumes("application/json")
          @Path("readed/{id}")
          public void markAsReaden​(@PathParam("id")
                                   long id)

    - #### markAsRead

          @PUT
          @Produces("application/json")
          @Consumes("application/json")
          @Path("readed/")
          public void markAsRead​(List<NotificationBoxDTO> selection)

    - #### delete

          @DELETE
          @Produces("application/json")
          @Consumes("application/json")
          @Path("")
          public void delete​(List<NotificationBoxDTO> selection)

    - #### send

          @PUT
          @Produces("application/json")
          @Consumes("application/json")
          @Path("send/")
          public void send​(NotificationToSendDTO notificationToSendDTO)
                    throws Exception

      Throws:
        `Exception`

    - #### getResourceBasePath

          protected String getResourceBasePath()

      Specified by:
        `getResourceBasePath` in class `org.silverpeas.core.web.rs.RESTWebService`

    - #### getComponentId

          public String getComponentId()

    - #### validateUserAuthorization

          public void validateUserAuthorization​(org.silverpeas.core.web.rs.UserPrivilegeValidation validation)