Package org.silverpeas.components.kmelia.web

# Class FolderResource

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

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("folders/{componentId}") public class FolderResource extends org.silverpeas.core.web.rs.RESTWebService
A REST Web resource representing a given node. It is a web service that provides access to a node referenced by its URL.

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `jakarta.ws.rs.core.Response`
  `createNode(String path, org.silverpeas.core.webapi.node.NodeEntity nodeEntity)`
  Creates a node corresponding to the given node entity and whose parent matches the specified path.
  `List<org.silverpeas.core.webapi.node.NodeEntity>`
  `getChildren(String path, String language)`
  Get all children of any node of the application.
  `String`
  `getComponentId()`
  `org.silverpeas.core.webapi.node.NodeEntity`
  `getNode(String path, String language)`
  Get any node of the application and its children.
  `List<org.silverpeas.core.webapi.node.NodeEntity>`
  `getPath(String path, String language)`
  Get all children of any node of the application.
  `protected String`
  `getResourceBasePath()`
  `org.silverpeas.core.webapi.node.NodeEntity`
  `getRoot(String language)`
  Get the root of the application and its children.
  `org.silverpeas.core.webapi.node.NodeEntity`
  `getTreeview(String path, String language)`
  Get all children of any node of the application.

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

  - ### FolderResource

    public FolderResource()

- ## Method Details

  - ### getRoot

    @GET @Produces("application/json") public org.silverpeas.core.webapi.node.NodeEntity getRoot(@QueryParam("lang") String language)
    Get the root of the application and its children.
    Returns:
      the application root and its children

  - ### getNode

    @GET @Path("{path: \\d+(/\\d+)*}") @Produces("application/json") public org.silverpeas.core.webapi.node.NodeEntity getNode(@PathParam("path") String path, @QueryParam("lang") String language)
    Get any node of the application and its children.
    Returns:
      NodeEntity representing asking node

  - ### getPath

    @GET @Path("{path: \\d+(/\\d+)*/path}") @Produces("application/json") public List<org.silverpeas.core.webapi.node.NodeEntity> getPath(@PathParam("path") String path, @QueryParam("lang") String language)
    Get all children of any node of the application.
    Returns:
      a list of NodeEntity representing children

  - ### getChildren

    @GET @Path("{path: \\d+(/\\d+)*/children}") @Produces("application/json") public List<org.silverpeas.core.webapi.node.NodeEntity> getChildren(@PathParam("path") String path, @QueryParam("lang") String language)
    Get all children of any node of the application.
    Returns:
      a list of NodeEntity representing children

  - ### createNode

    @Path("{path: \\d+(/\\d+)*}") @POST @Produces("application/json") @Consumes("application/json") public jakarta.ws.rs.core.Response createNode(@PathParam("path") String path, org.silverpeas.core.webapi.node.NodeEntity nodeEntity)
    Creates a node corresponding to the given node entity and whose parent matches the specified path.
    Parameters:
      `path` - The path of the parent node.
      `nodeEntity` - The description of the node to create.
    Returns:
      a response containing the entity describing the newly created node.

  - ### getTreeview

    @GET @Path("{path: \\d+/treeview}") @Produces("application/json") public org.silverpeas.core.webapi.node.NodeEntity getTreeview(@PathParam("path") String path, @QueryParam("lang") String language)
    Get all children of any node of the application.
    Returns:
      an array of NodeEntity representing children

  - ### getResourceBasePath

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

  - ### getComponentId

    public String getComponentId()