Package org.silverpeas.core.webapi.node
Class NodeResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.core.webapi.node.AbstractNodeResource
-
- org.silverpeas.core.webapi.node.NodeResource
-
- All Implemented Interfaces:
ProtectedWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
,SilverpeasWebResource
@WebService @Path("private/nodes/{componentId}") @Authorized public class NodeResource extends AbstractNodeResource
A REST Web resource providing access to a node through private mode.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService
RESTWebService.WebProcess<R>, RESTWebService.WebTreatment<R>
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.webapi.node.AbstractNodeResource
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 NodeResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeEntity[]
getChildren(String path)
Get all children of any node of the application.NodeEntity
getNode(String path)
Get any node of the application and its children.protected String
getResourceBasePath()
Gets the base path of the web resource relative to the root path of all the web resources in Silverpeas as given bySilverpeasWebResource.getBasePath()
.NodeEntity
getRoot()
Get the root of the application and its children.protected boolean
isNodeReadable(NodeDetail node)
-
Methods inherited from class org.silverpeas.core.webapi.node.AbstractNodeResource
getComponentId
-
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
-
-
-
-
Method Detail
-
getResourceBasePath
protected String getResourceBasePath()
Description copied from class:RESTWebService
Gets the base path of the web resource relative to the root path of all the web resources in Silverpeas as given bySilverpeasWebResource.getBasePath()
.- Specified by:
getResourceBasePath
in classRESTWebService
- Returns:
- the relative path that identifies this REST web service among all other REST web services.
-
getRoot
@GET @Produces("application/json") public NodeEntity getRoot()
Description copied from class:AbstractNodeResource
Get the root of the application and its children. As this service works only in non authenticated mode for the moment, children do not contain special nodes.- Overrides:
getRoot
in classAbstractNodeResource
- Returns:
- the application root and its children
-
getNode
@GET @Path("{path: [0-9]+(/[0-9]+)*}") @Produces("application/json") public NodeEntity getNode(@PathParam("path") String path)
Description copied from class:AbstractNodeResource
Get any node of the application and its children.- Overrides:
getNode
in classAbstractNodeResource
- Returns:
- NodeEntity representing asking node
-
getChildren
@GET @Path("{path: [0-9]+(/[0-9]+)*/children}") @Produces("application/json") public NodeEntity[] getChildren(@PathParam("path") String path)
Get all children of any node of the application.- Overrides:
getChildren
in classAbstractNodeResource
- Returns:
- an array of NodeEntity representing children
-
isNodeReadable
protected boolean isNodeReadable(NodeDetail node)
- Specified by:
isNodeReadable
in classAbstractNodeResource
-
-