Class AbstractResourceManagerResource

java.lang.Object
org.silverpeas.core.web.rs.RESTWebService
org.silverpeas.components.resourcesmanager.web.AbstractResourceManagerResource
All Implemented Interfaces:
org.silverpeas.core.web.rs.ProtectedWebResource, org.silverpeas.core.web.rs.WebAuthenticationValidation, org.silverpeas.core.web.rs.WebAuthorizationValidation, org.silverpeas.core.web.SilverpeasWebResource
Direct Known Subclasses:
ResourceManagerResource

public abstract class AbstractResourceManagerResource extends org.silverpeas.core.web.rs.RESTWebService
Author:
Yohann Chastagnier
  • Constructor Details

    • AbstractResourceManagerResource

      public AbstractResourceManagerResource()
  • Method Details

    • getResourceBasePath

      protected String getResourceBasePath()
      Specified by:
      getResourceBasePath in class org.silverpeas.core.web.rs.RESTWebService
    • getComponentId

      public String getComponentId()
    • 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 - a reservation
      Returns:
      reservation URI
    • buildResourceReservationURI

      protected URI buildResourceReservationURI(Reservation reservation)
      Centralized build of resource reservation URI.
      Parameters:
      reservation - a reservation
      Returns:
      reservation URI
    • buildResourceCategoryURI

      protected URI buildResourceCategoryURI(Category category)
      Centralized build of resource reservation URI.
      Parameters:
      category - a category
      Returns:
      reservation URI
    • buildResourceURI

      protected URI buildResourceURI(Resource resource)
      Centralized build of resource reservation URI.
      Parameters:
      resource - a resource
      Returns:
      reservation URI
    • getResourceManager

      protected ResourcesManager getResourceManager()
      Returns:
      Resource manager service layer