org.silverpeas.node.web
Class AbstractNodeResource

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.node.web.AbstractNodeResource
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 com.silverpeas.web.RESTWebService
RESTWebService.WebProcess<RETURN_VALUE>, RESTWebService.WebTreatment<RETURN_VALUE>
 
Field Summary
protected  String componentId
           
 
Fields inherited from class com.silverpeas.web.RESTWebService
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE
 
Constructor Summary
AbstractNodeResource()
           
 
Method Summary
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 com.silverpeas.web.RESTWebService
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentId

protected String componentId
Constructor Detail

AbstractNodeResource

public AbstractNodeResource()
Method Detail

getComponentId

public String getComponentId()
Description copied from class: RESTWebService
Gets the identifier of the component instance to which the requested resource belongs to.

Specified by:
getComponentId in class RESTWebService
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)


Copyright © 2016 Silverpeas. All Rights Reserved.