Package org.silverpeas.components.kmelia.web

# Class KmeliaResource

java.lang.Object
org.silverpeas.core.web.rs.RESTWebService
org.silverpeas.components.kmelia.web.KmeliaResource

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("publications/{componentId}") @Authorized public class KmeliaResource extends org.silverpeas.core.web.rs.RESTWebService
A REST Web resource allowing to update data related to a publication.

- ## Nested Class Summary

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

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

- ## Field Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getComponentId()`
  `protected String`
  `getResourceBasePath()`
  `jakarta.ws.rs.core.Response`
  `savePublication(String nodeId, org.silverpeas.core.webapi.publication.PublicationEntity publicationEntity)`
  Creates a publication corresponding to the given publication entity and whose parent node matches the specified node ID.
  `jakarta.ws.rs.core.Response`
  `updatePublication(org.silverpeas.core.webapi.publication.PublicationEntity publicationEntity)`
  Updates the publication described by the given publication entity.

  ### 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`

- ## Constructor Details

  - ### KmeliaResource

    public KmeliaResource()

- ## Method Details

  - ### getResourceBasePath

    protected String getResourceBasePath()
    Specified by:
      `getResourceBasePath` in class `org.silverpeas.core.web.rs.RESTWebService`

  - ### getComponentId

    public String getComponentId()

  - ### savePublication

    @Path("/{nodeId}") @POST @Produces("application/json") @Consumes("application/json") public jakarta.ws.rs.core.Response savePublication(@PathParam("nodeId") String nodeId, org.silverpeas.core.webapi.publication.PublicationEntity publicationEntity)
    Creates a publication corresponding to the given publication entity and whose parent node matches the specified node ID.
    Parameters:
      `nodeId` - The ID of the publication's parent node.
      `publicationEntity` - The description of the publication to create.
    Returns:
      HTTP response

  - ### updatePublication

    @POST @Produces("application/json") @Consumes("application/json") public jakarta.ws.rs.core.Response updatePublication(org.silverpeas.core.webapi.publication.PublicationEntity publicationEntity)
    Updates the publication described by the given publication entity.
    Parameters:
      `publicationEntity` - The description of the publication to update.
    Returns:
      a response containing the entity describing the updated publication.