Interface IUnitUserService

All Known Implementing Classes:
UnitUserService

public interface IUnitUserService
IUnitUserService
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addUserToUnit(int nIdUnit, int nIdUser)
    Add an user to an unit
    void
    doProcessAddUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
    Do process adding the user to the unit
    void
    doProcessModifyUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
    Do process modifying the user
    void
    doProcessRemoveUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
    Do process removing an user from an unit
    List<fr.paris.lutece.portal.business.user.AdminUser>
    getAvailableUsers(fr.paris.lutece.portal.business.user.AdminUser currentUser, int nIdUnit)
    Get the list of available users for a given unit.
    List<fr.paris.lutece.portal.business.user.AdminUser>
    getAvailableUsers(fr.paris.lutece.portal.business.user.AdminUser currentUser, int nIdUnit, boolean bMultiAffectationEnabled)
    Get the list of available users for a given unit.
    fr.paris.lutece.portal.business.user.AdminUser
    getUser(int nIdUser)
    Get the user from a given id user
    List<fr.paris.lutece.portal.business.user.AdminUser>
    getUsers(int nIdUnit, Map<String,Unit> mapIdUserUnit, boolean isInDepthSearch)
    Get the list of AdminUser from a given id unit
    boolean
    Check if users can be affected to several units at the same time or not
    boolean
    isUserInUnit(int nIdUser, int nIdUnit)
    Check if the given user is in a given unit
    void
    removeUserFromUnit(int nIdUser, int nIdUnit)
    Remove the user from a unit
    void
    removeUsersFromUnit(int nIdUnit)
    Remove users from a given id unit
  • Method Details

    • getUser

      fr.paris.lutece.portal.business.user.AdminUser getUser(int nIdUser)
      Get the user from a given id user
      Parameters:
      nIdUser - the id user
      Returns:
      an AdminUser
    • getUsers

      List<fr.paris.lutece.portal.business.user.AdminUser> getUsers(int nIdUnit, Map<String,Unit> mapIdUserUnit, boolean isInDepthSearch)
      Get the list of AdminUser from a given id unit
      Parameters:
      nIdUnit - the id unit
      mapIdUserUnit - the map of <idUser, Unit>
      isInDepthSearch - true if it is an in depth search (search in the sub units too)
      Returns:
      a list of AdminUser
    • getAvailableUsers

      List<fr.paris.lutece.portal.business.user.AdminUser> getAvailableUsers(fr.paris.lutece.portal.business.user.AdminUser currentUser, int nIdUnit)
      Get the list of available users for a given unit. current user can administer.
      Parameters:
      currentUser - the current user
      nIdUnit - The id of the unit
      Returns:
      a list of AdminUser. If multi affectation is not enabled, return users that can be administered by the current user and that are not associated with any unit. Otherwise returns users that are not associated directly or transitively to the unit and that the current user can administer.
    • getAvailableUsers

      List<fr.paris.lutece.portal.business.user.AdminUser> getAvailableUsers(fr.paris.lutece.portal.business.user.AdminUser currentUser, int nIdUnit, boolean bMultiAffectationEnabled)
      Get the list of available users for a given unit.
      Parameters:
      currentUser - The current user
      nIdUnit - The id of the unit
      bMultiAffectationEnabled - True to include users already associated to a unit, false to ignore them.
      Returns:
      a list of AdminUser
    • doProcessAddUser

      void doProcessAddUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
      Do process adding the user to the unit
      Parameters:
      nIdUser - the id user
      currentUser - the current user
      request - the HTTP requesst
    • doProcessModifyUser

      void doProcessModifyUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
      Do process modifying the user
      Parameters:
      nIdUser - the id user
      currentUser - the current user
      request - the HTTP request
    • doProcessRemoveUser

      void doProcessRemoveUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, jakarta.servlet.http.HttpServletRequest request)
      Do process removing an user from an unit
      Parameters:
      nIdUser - the id user
      currentUser - the current user
      request - the HTTP request
    • isUserInUnit

      boolean isUserInUnit(int nIdUser, int nIdUnit)
      Check if the given user is in a given unit
      Parameters:
      nIdUser - the id user
      nIdUnit - The id of the unit
      Returns:
      true if the user is in an unit, false otherwise
    • addUserToUnit

      boolean addUserToUnit(int nIdUnit, int nIdUser)
      Add an user to an unit
      Parameters:
      nIdUnit - the id unit
      nIdUser - the id user
      Returns:
      true if the user is added to the unit, false otherwise
    • removeUserFromUnit

      void removeUserFromUnit(int nIdUser, int nIdUnit)
      Remove the user from a unit
      Parameters:
      nIdUser - the id user
      nIdUnit - The id of the unit
    • removeUsersFromUnit

      void removeUsersFromUnit(int nIdUnit)
      Remove users from a given id unit
      Parameters:
      nIdUnit - the id unit
    • isMultiAffectationEnabled

      boolean isMultiAffectationEnabled()
      Check if users can be affected to several units at the same time or not
      Returns:
      True if multi affectation is enabled, false otherwise. If the property is not defined, the default value is used which is false.