Package org.silverpeas.components.resourcesmanager.control

## Class ResourcesManagerSessionController

- java.lang.Object
- - org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
  - - org.silverpeas.components.resourcesmanager.control.ResourcesManagerSessionController

- All Implemented Interfaces:
    `Serializable`, `org.silverpeas.core.web.mvc.controller.ComponentSessionController`, `org.silverpeas.core.web.session.SessionCloseable`

      public class ResourcesManagerSessionController
      extends org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

      `context`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ResourcesManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)` | Standard Session Controller Constructeur

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `areCommentsEnabled()` |
    `void` | `createCategory​(Category category)` | Creating a new Category.
    `void` | `createReservation​(Reservation reservation)` |
    `void` | `createResource​(Resource resource)` | Create a new resource.
    `void` | `deleteCategory​(Long id)` |
    `void` | `deleteReservation​(Long id)` |
    `void` | `deleteResource​(Long id)` |
    `Date` | `getBeginDateReservation()` |
    `List<Category>` | `getCategories()` |
    `Category` | `getCategory​(Long id)` |
    `Long` | `getCategoryIdForResource()` |
    `Long` | `getCurrentResource()` |
    `String` | `getDefaultView()` |
    `Date` | `getEndDateReservation()` |
    `List<String>` | `getManagerIds​(Long resourceId)` |
    `List<org.silverpeas.core.admin.user.model.UserDetail>` | `getManagers​(Long resourceId)` |
    `org.silverpeas.core.notification.user.client.NotificationSender` | `getNotificationSender()` |
    `String` | `getProvenanceResource()` |
    `Reservation` | `getReservation​(Long reservationId)` |
    `Reservation` | `getReservationCourante()` |
    `Long` | `getReservationIdForResource()` |
    `List<Reservation>` | `getReservationUser()` |
    `Resource` | `getResource​(Long id)` |
    `Long` | `getResourceIdForResource()` |
    `org.silverpeas.core.util.MultiSilverpeasBundle` | `getResources()` | Gets the resources associated with this session controller.
    `List<Resource>` | `getResourcesByCategory​(Long categoryId)` |
    `List<Resource>` | `getResourcesofReservation​(Long reservationId)` |
    `List<Resource>` | `getResourcesReservable​(Date startDate, Date endDate)` |
    `org.silverpeas.core.admin.user.model.UserDetail` | `getSelectedUser()` |
    `ReservationTimeWindowViewContext` | `getViewContext()` |
    `String` | `initUPToSelectManager​(String pubId)` |
    `String` | `initUserPanelOtherPlanning()` |
    `String` | `initUserSelect​(Collection<String> currentManagers)` |
    `boolean` | `isResponsible()` |
    `boolean` | `isWeekendNotVisible()` |
    `List<ResourceValidator>` | `listValidators​(Long resourceId)` |
    `void` | `refuseResource​(Long resourceId, Long reservationId, String motive)` |
    `void` | `saveReservation()` |
    `void` | `sendNotificationForValidation​(Long resourceId, Long reservationId)` |
    `void` | `sendNotificationRefuseReservation​(Reservation reservation, Long resourceId, String motive)` |
    `void` | `sendNotificationValidateReservation​(Reservation reservation)` |
    `void` | `setBeginDateReservation​(Date beginDateReservation)` |
    `void` | `setCategoryIdForResource​(Long categoryIdForResource)` |
    `void` | `setCurrentResource​(Long currentResource)` |
    `void` | `setEndDateReservation​(Date endDateReservation)` |
    `void` | `setListReservationCurrent​(List<Long> listReservationCurrent)` |
    `void` | `setProvenanceResource​(String provenanceResource)` |
    `void` | `setReservationIdForResource​(Long reservationIdForResource)` |
    `void` | `setResourceIdForResource​(Long resourceIdForResource)` |
    `void` | `updateCategory​(Category category)` |
    `void` | `updateReservation​(Reservation reservation, List<Long> resourceIds, boolean updateDate)` |
    `void` | `updateResource​(Resource resource, List<Long> managers)` |
    `void` | `validateResource​(Long resourceId, Long reservationId)` |
    `List<Resource>` | `verifyUnavailableResources​(List<Long> aimedResources)` |
    `List<Resource>` | `verifyUnavailableResources​(List<Long> aimedResources, Date beginDate, Date endDate, Long reservationId)` |

    - ### Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

      `addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourcesManagerSessionController

          public ResourcesManagerSessionController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                                   org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)

      Standard Session Controller Constructeur
      Parameters:
        `mainSessionCtrl` - The user's profile
        `componentContext` - The component's profile

  - ### Method Detail

    - #### getViewContext

          public ReservationTimeWindowViewContext getViewContext()

    - #### getCurrentResource

          public Long getCurrentResource()

    - #### setCurrentResource

          public void setCurrentResource​(Long currentResource)

    - #### getCategoryIdForResource

          public Long getCategoryIdForResource()

    - #### setCategoryIdForResource

          public void setCategoryIdForResource​(Long categoryIdForResource)

    - #### getReservationIdForResource

          public Long getReservationIdForResource()

    - #### setReservationIdForResource

          public void setReservationIdForResource​(Long reservationIdForResource)

    - #### getResourceIdForResource

          public Long getResourceIdForResource()

    - #### setResourceIdForResource

          public void setResourceIdForResource​(Long resourceIdForResource)

    - #### getProvenanceResource

          public String getProvenanceResource()

    - #### setProvenanceResource

          public void setProvenanceResource​(String provenanceResource)

    - #### isResponsible

          public boolean isResponsible()

    - #### createCategory

          public void createCategory​(Category category)

      Creating a new Category.
      Parameters:
        `category` - the category to create.

    - #### updateCategory

          public void updateCategory​(Category category)

    - #### getCategories

          public List<Category> getCategories()

    - #### getCategory

          public Category getCategory​(Long id)

    - #### deleteCategory

          public void deleteCategory​(Long id)

    - #### createResource

          public void createResource​(Resource resource)

      Create a new resource.
      Parameters:
        `resource` - the resource to create

    - #### updateResource

          public void updateResource​(Resource resource,
                                     List<Long> managers)

    - #### getResource

          public Resource getResource​(Long id)

    - #### deleteResource

          public void deleteResource​(Long id)

    - #### getResourcesByCategory

          public List<Resource> getResourcesByCategory​(Long categoryId)

    - #### getResourcesReservable

          public List<Resource> getResourcesReservable​(Date startDate,
                                                       Date endDate)

    - #### getResourcesofReservation

          public List<Resource> getResourcesofReservation​(Long reservationId)

    - #### createReservation

          public void createReservation​(Reservation reservation)

    - #### saveReservation

          public void saveReservation()

    - #### verifyUnavailableResources

          public List<Resource> verifyUnavailableResources​(List<Long> aimedResources)

    - #### verifyUnavailableResources

          public List<Resource> verifyUnavailableResources​(List<Long> aimedResources,
                                                           Date beginDate,
                                                           Date endDate,
                                                           Long reservationId)

    - #### getReservationUser

          public List<Reservation> getReservationUser()

    - #### getReservation

          public Reservation getReservation​(Long reservationId)

    - #### updateReservation

          public void updateReservation​(Reservation reservation,
                                        List<Long> resourceIds,
                                        boolean updateDate)

    - #### deleteReservation

          public void deleteReservation​(Long id)

    - #### sendNotificationForValidation

          public void sendNotificationForValidation​(Long resourceId,
                                                    Long reservationId)
                                             throws org.silverpeas.core.notification.NotificationException

      Throws:
        `org.silverpeas.core.notification.NotificationException`

    - #### getNotificationSender

          public org.silverpeas.core.notification.user.client.NotificationSender getNotificationSender()

    - #### getManagerIds

          public List<String> getManagerIds​(Long resourceId)

    - #### getManagers

          public List<org.silverpeas.core.admin.user.model.UserDetail> getManagers​(Long resourceId)

    - #### listValidators

          public List<ResourceValidator> listValidators​(Long resourceId)

    - #### initUserSelect

          public String initUserSelect​(Collection<String> currentManagers)

    - #### getReservationCourante

          public Reservation getReservationCourante()

    - #### getBeginDateReservation

          public Date getBeginDateReservation()

    - #### setBeginDateReservation

          public void setBeginDateReservation​(Date beginDateReservation)

    - #### getEndDateReservation

          public Date getEndDateReservation()

    - #### setEndDateReservation

          public void setEndDateReservation​(Date endDateReservation)

    - #### setListReservationCurrent

          public void setListReservationCurrent​(List<Long> listReservationCurrent)

    - #### isWeekendNotVisible

          public boolean isWeekendNotVisible()

    - #### getDefaultView

          public String getDefaultView()

    - #### initUPToSelectManager

          public String initUPToSelectManager​(String pubId)

    - #### initUserPanelOtherPlanning

          public String initUserPanelOtherPlanning()

    - #### getSelectedUser

          public org.silverpeas.core.admin.user.model.UserDetail getSelectedUser()

    - #### areCommentsEnabled

          public boolean areCommentsEnabled()

    - #### validateResource

          public void validateResource​(Long resourceId,
                                       Long reservationId)
                                throws org.silverpeas.core.notification.NotificationException

      Throws:
        `org.silverpeas.core.notification.NotificationException`

    - #### refuseResource

          public void refuseResource​(Long resourceId,
                                     Long reservationId,
                                     String motive)
                              throws org.silverpeas.core.notification.NotificationException

      Throws:
        `org.silverpeas.core.notification.NotificationException`

    - #### sendNotificationValidateReservation

          public void sendNotificationValidateReservation​(Reservation reservation)
                                                   throws org.silverpeas.core.notification.NotificationException

      Throws:
        `org.silverpeas.core.notification.NotificationException`

    - #### sendNotificationRefuseReservation

          public void sendNotificationRefuseReservation​(Reservation reservation,
                                                        Long resourceId,
                                                        String motive)
                                                 throws org.silverpeas.core.notification.NotificationException

      Throws:
        `org.silverpeas.core.notification.NotificationException`

    - #### getResources

          public org.silverpeas.core.util.MultiSilverpeasBundle getResources()

      Gets the resources associated with this session controller.
      Returns:
        all of the resources (messages, settings, icons, ...)