Package org.silverpeas.core.webapi.node
Class AbstractNodeResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.core.webapi.node.AbstractNodeResource
-
- All Implemented Interfaces:
ProtectedWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
,SilverpeasWebResource
- Direct Known Subclasses:
NodeResource
,SharedNodeResource
public abstract class AbstractNodeResource extends RESTWebService
A REST Web resource providing access to a node.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService
RESTWebService.WebProcess<R>, RESTWebService.WebTreatment<R>
-
-
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 AbstractNodeResource()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected NodeEntity[]
getChildren(String path)
Get all children of any node of the application.String
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to.protected NodeEntity
getNode(String path)
Get any node of the application and its children.protected NodeEntity
getRoot()
Get the root of the application and its children.protected abstract boolean
isNodeReadable(NodeDetail node)
-
Methods inherited from class org.silverpeas.core.web.rs.RESTWebService
createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getResourceBasePath, 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
-
-
Method Detail
-
getComponentId
public String getComponentId()
Description copied from interface:SilverpeasWebResource
Gets the identifier of the component instance to which the requested resource belongs to.- Returns:
- the identifier of the Silverpeas component instance.
-
getRoot
protected NodeEntity getRoot()
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.- Returns:
- the application root and its children
-
getNode
protected NodeEntity getNode(String path)
Get any node of the application and its children.- Returns:
- NodeEntity representing asking node
-
getChildren
protected NodeEntity[] getChildren(String path)
Get all children of any node of the application.- Returns:
- an array of NodeEntity representing children
-
isNodeReadable
protected abstract boolean isNodeReadable(NodeDetail node)
-
-