org.silverpeas.publication.web
Class AbstractPublicationResource

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.publication.web.AbstractPublicationResource
Direct Known Subclasses:
PublicationResource, SharedPublicationResource

public abstract class AbstractPublicationResource
extends RESTWebService

A REST Web resource providing access to publications.


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
AbstractPublicationResource()
           
 
Method Summary
 String getComponentId()
          Gets the identifier of the component instance to which the requested resource belongs to.
protected  NodeBm getNodeBm()
           
protected  PublicationBm getPublicationBm()
           
protected  PublicationEntity getPublicationEntity(PublicationDetail publication, boolean withAttachments)
           
protected  List<PublicationEntity> getPublications(String nodeId, boolean withAttachments)
          Gets the nodes that are children of a parent node.
protected abstract  boolean isNodeReadable(NodePK nodePK)
           
 
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

AbstractPublicationResource

public AbstractPublicationResource()
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.

getPublications

protected List<PublicationEntity> getPublications(String nodeId,
                                                  boolean withAttachments)
Gets the nodes that are children of a parent node.

Parameters:
nodeId - The ID of the parent node.
withAttachments - Indicated whether attachments related to publications are required.
Returns:
An array of the nodes whose parent is the node matching the specified ID.

getPublicationEntity

protected PublicationEntity getPublicationEntity(PublicationDetail publication,
                                                 boolean withAttachments)

isNodeReadable

protected abstract boolean isNodeReadable(NodePK nodePK)

getNodeBm

protected NodeBm getNodeBm()

getPublicationBm

protected PublicationBm getPublicationBm()


Copyright © 2016 Silverpeas. All Rights Reserved.