Package org.silverpeas.components.quickinfo.web

## Class NewsResource

- java.lang.Object
- - org.silverpeas.core.web.rs.RESTWebService
  - - org.silverpeas.components.quickinfo.web.NewsResource

- 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
      @Path("news/{componentId}")
      @Authorized
      public class NewsResource
      extends org.silverpeas.core.web.rs.RESTWebService

- - ### 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
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected String` | `componentId` |

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `acknowledge​(String onNewsId)` |
    `jakarta.ws.rs.core.Response` | `deleteNews​(String onNewsId)` |
    `List<NewsEntity>` | `getAllNews()` |
    `String` | `getComponentId()` |
    `NewsEntity` | `getNews​(String onNewsId)` |
    `protected String` | `getResourceBasePath()` |

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

      `createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getLanguage, 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`

- - ### Field Detail

    - #### componentId

          @PathParam("componentId")
          protected String componentId

  - ### Constructor Detail

    - #### NewsResource

          public NewsResource()

  - ### Method Detail

    - #### getComponentId

          public String getComponentId()

    - #### getAllNews

          @GET
          @Produces("application/json")
          public List<NewsEntity> getAllNews()

    - #### getNews

          @GET
          @Path("{newsId}")
          @Produces("application/json")
          public NewsEntity getNews​(@PathParam("newsId")
                                    String onNewsId)

    - #### acknowledge

          @POST
          @Path("{newsId}/acknowledge")
          public void acknowledge​(@PathParam("newsId")
                                  String onNewsId)

    - #### deleteNews

          @DELETE
          @Path("{newsId}")
          public jakarta.ws.rs.core.Response deleteNews​(@PathParam("newsId")
                                                        String onNewsId)

    - #### getResourceBasePath

          protected String getResourceBasePath()

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