org.silverpeas.resourcesmanager.web
Class AbstractResourceManagerResource

java.lang.Object
  extended by com.silverpeas.web.RESTWebService
      extended by org.silverpeas.resourcesmanager.web.AbstractResourceManagerResource
Direct Known Subclasses:
ResourceManagerResource

public abstract class AbstractResourceManagerResource
extends com.silverpeas.web.RESTWebService

Author:
Yohann Chastagnier

Nested Class Summary
 
Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService
com.silverpeas.web.RESTWebService.WebProcess<RETURN_VALUE>, com.silverpeas.web.RESTWebService.WebTreatment<RETURN_VALUE>
 
Field Summary
 
Fields inherited from class com.silverpeas.web.RESTWebService
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE
 
Constructor Summary
AbstractResourceManagerResource()
           
 
Method Summary
protected  Collection<ReservationEntity> asWebEntities(List<Reservation> reservations)
          Converts the reservations into its corresponding web entity list.
protected  Collection<ReservedResourceEntity> asWebEntities(Long reservationId, List<Resource> resources)
          Converts the resources into its corresponding web entity list.
protected  ResourceCategoryEntity asWebEntity(Category category)
          Converts the category into its corresponding web entity.
protected  ReservedResourceEntity asWebEntity(Long reservationId, Resource resource)
          Converts the reserved resource into its corresponding web entity.
protected  ReservationEntity asWebEntity(Reservation reservation)
          Converts the reservation into its corresponding web entity.
protected  ResourceEntity asWebEntity(Resource resource)
          Converts the resource into its corresponding web entity.
protected  URI buildReservationURI(Reservation reservation)
          Centralized build of reservation URI.
protected  URI buildResourceCategoryURI(Category category)
          Centralized build of resource reservation URI.
protected  URI buildResourceReservationURI(Reservation reservation)
          Centralized build of resource reservation URI.
protected  URI buildResourceURI(Resource resource)
          Centralized build of resource reservation URI.
 String getComponentId()
           
protected  ResourcesManager getResourceManager()
          Gets Gallery EJB.
 
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
 

Constructor Detail

AbstractResourceManagerResource

public AbstractResourceManagerResource()
Method Detail

getComponentId

public String getComponentId()
Specified by:
getComponentId in class com.silverpeas.web.RESTWebService

asWebEntities

protected Collection<ReservedResourceEntity> asWebEntities(Long reservationId,
                                                           List<Resource> resources)
Converts the resources into its corresponding web entity list.

Parameters:
reservationId - the identifier of the linked reservation.
resources - the resources to convert.
Returns:
the corresponding list of resource entity.

asWebEntity

protected ReservedResourceEntity asWebEntity(Long reservationId,
                                             Resource resource)
Converts the reserved resource into its corresponding web entity.

Parameters:
reservationId - the identifier of the linked reservation.
resource - the resource to convert.
Returns:
the corresponding resource entity.

asWebEntity

protected ResourceEntity asWebEntity(Resource resource)
Converts the resource into its corresponding web entity.

Parameters:
resource - the resource to convert.
Returns:
the corresponding resource entity.

asWebEntities

protected Collection<ReservationEntity> asWebEntities(List<Reservation> reservations)
Converts the reservations into its corresponding web entity list.

Parameters:
reservations - the reservation events to convert.
Returns:
the corresponding list of reservation entity.

asWebEntity

protected ReservationEntity asWebEntity(Reservation reservation)
Converts the reservation into its corresponding web entity.

Parameters:
reservation - the reservation event to convert.
Returns:
the corresponding reservation entity.

asWebEntity

protected ResourceCategoryEntity asWebEntity(Category category)
Converts the category into its corresponding web entity.

Parameters:
category - the category to convert.
Returns:
the corresponding category entity.

buildReservationURI

protected URI buildReservationURI(Reservation reservation)
Centralized build of reservation URI.

Parameters:
reservation -
Returns:
reservation URI

buildResourceReservationURI

protected URI buildResourceReservationURI(Reservation reservation)
Centralized build of resource reservation URI.

Parameters:
reservation -
Returns:
reservation URI

buildResourceCategoryURI

protected URI buildResourceCategoryURI(Category category)
Centralized build of resource reservation URI.

Parameters:
category -
Returns:
reservation URI

buildResourceURI

protected URI buildResourceURI(Resource resource)
Centralized build of resource reservation URI.

Parameters:
resource -
Returns:
reservation URI

getResourceManager

protected ResourcesManager getResourceManager()
Gets Gallery EJB.

Returns:


Copyright © 2016 Silverpeas. All Rights Reserved.