Package org.silverpeas.mobile.server.services

## Class ServiceNews

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

- 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/news/{appId}")
      public class ServiceNews
      extends AbstractRestWebService

- - ### 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
    --- | ---
    `ServiceNews()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `NewsDTO` | `createNews​(NewsDTO news)` |
    `String` | `getComponentId()` |
    `List<NewsDTO>` | `getNews()` |
    `NewsDTO` | `getNewsByPubId​(String appId, String pubId)` |
    `protected String` | `getResourceBasePath()` |
    `void` | `updateNews​(NewsDTO news)` |

    - ### 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.ProtectedWebResource

      `validateUserAuthorization`

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

      `validateUserAuthentication`

- - ### Constructor Detail

    - #### ServiceNews

          public ServiceNews()

  - ### Method Detail

    - #### updateNews

          @PUT
          @Consumes("application/json")
          @Path("update")
          public void updateNews​(NewsDTO news)

    - #### createNews

          @POST
          @Consumes("application/json")
          @Path("create")
          public NewsDTO createNews​(NewsDTO news)

    - #### getNews

          @GET
          @Produces("application/json")
          @Path("all")
          public List<NewsDTO> getNews()

    - #### getNewsByPubId

          @GET
          @Produces("application/json")
          @Path("byPubId/{pubId}")
          public NewsDTO getNewsByPubId​(@PathParam("appId")
                                        String appId,
                                        @PathParam("pubId")
                                        String pubId)

    - #### getResourceBasePath

          protected String getResourceBasePath()

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

    - #### getComponentId

          public String getComponentId()