Package org.silverpeas.components.delegatednews.control

# Class DelegatedNewsSessionController

java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.components.delegatednews.control.DelegatedNewsSessionController

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

public class DelegatedNewsSessionController 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
  `DelegatedNewsSessionController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)`
  Standard Session Controller Constructeur

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<DelegatedNews>`
  `getAllAvailDelegatedNews()`
  Récupère toutes les actualités déléguées inter Theme Tracker dont l'utilisateur courant a des droits
  `String`
  `getListDelegatedNewsJSON(List<DelegatedNews> listDelegatedNews)`
  Converts the list of Delegated News into its JSON representation.
  `boolean`
  `isAdmin()`
  `boolean`
  `isUser()`
  `void`
  `refuseDelegatedNews(String pubId, String refuseReasonText)`
  Refuse delegated news identified by pubId
  `void`
  `updateDateDelegatedNews(String pubId, Date beginDate, Date endDate)`
  Met à jour les dates de visibilité de l'actualité déléguée passée en paramètre
  `void`
  `validateDelegatedNews(String pubId)`
  Validate delegated news identified by pubId

  ### 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 Details

  - ### DelegatedNewsSessionController

    public DelegatedNewsSessionController(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 Details

  - ### isUser

    public boolean isUser()

  - ### isAdmin

    public boolean isAdmin()

  - ### getAllAvailDelegatedNews

    public List<DelegatedNews> getAllAvailDelegatedNews()
    Récupère toutes les actualités déléguées inter Theme Tracker dont l'utilisateur courant a des droits
    Returns:
      a `List<DelegatedNews>` : liste d'actualités déléguées

  - ### validateDelegatedNews

    public void validateDelegatedNews(String pubId)
    Validate delegated news identified by pubId
    Parameters:
      `pubId` - the delegated news identifier to validate

  - ### refuseDelegatedNews

    public void refuseDelegatedNews(String pubId, String refuseReasonText)
    Refuse delegated news identified by pubId
    Parameters:
      `pubId` - the delegated news identifier to refuse
      `refuseReasonText` - the reason why delegated news has been refused

  - ### updateDateDelegatedNews

    public void updateDateDelegatedNews(String pubId, Date beginDate, Date endDate)
    Met à jour les dates de visibilité de l'actualité déléguée passée en paramètre

  - ### getListDelegatedNewsJSON

    public String getListDelegatedNewsJSON(List<DelegatedNews> listDelegatedNews)
    Converts the list of Delegated News into its JSON representation.
    Returns:
      a JSON representation of the list of Delegated News (as string)
    Throws:
      `DelegatedNewsRuntimeException` - if an error occurs