Interface IUnitUserService
-
- All Known Implementing Classes:
UnitUserService
public interface IUnitUserServiceIUnitUserService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddUserToUnit(int nIdUnit, int nIdUser)Add an user to an unitvoiddoProcessAddUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request)Do process adding the user to the unitvoiddoProcessModifyUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request)Do process modifying the uservoiddoProcessRemoveUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request)Do process removing an user from an unitjava.util.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.java.util.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.AdminUsergetUser(int nIdUser)Get the user from a given id userjava.util.List<fr.paris.lutece.portal.business.user.AdminUser>getUsers(int nIdUnit, java.util.Map<java.lang.String,Unit> mapIdUserUnit, boolean isInDepthSearch)Get the list ofAdminUserfrom a given id unitbooleanisMultiAffectationEnabled()Check if users can be affected to several units at the same time or notbooleanisUserInUnit(int nIdUser, int nIdUnit)Check if the given user is in a given unitvoidremoveUserFromUnit(int nIdUser, int nIdUnit)Remove the user from a unitvoidremoveUsersFromUnit(int nIdUnit)Remove users from a given id unit
-
-
-
Method Detail
-
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
java.util.List<fr.paris.lutece.portal.business.user.AdminUser> getUsers(int nIdUnit, java.util.Map<java.lang.String,Unit> mapIdUserUnit, boolean isInDepthSearch)Get the list ofAdminUserfrom a given id unit- Parameters:
nIdUnit- the id unitmapIdUserUnit- the map ofisInDepthSearch- true if it is an in depth search (search in the sub units too)- Returns:
- a list of
AdminUser
-
getAvailableUsers
java.util.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 usernIdUnit- 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
java.util.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 usernIdUnit- The id of the unitbMultiAffectationEnabled- 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, javax.servlet.http.HttpServletRequest request)Do process adding the user to the unit- Parameters:
nIdUser- the id usercurrentUser- the current userrequest- the HTTP requesst
-
doProcessModifyUser
void doProcessModifyUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request)Do process modifying the user- Parameters:
nIdUser- the id usercurrentUser- the current userrequest- the HTTP request
-
doProcessRemoveUser
void doProcessRemoveUser(int nIdUser, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request)Do process removing an user from an unit- Parameters:
nIdUser- the id usercurrentUser- the current userrequest- the HTTP request
-
isUserInUnit
boolean isUserInUnit(int nIdUser, int nIdUnit)Check if the given user is in a given unit- Parameters:
nIdUser- the id usernIdUnit- The id of the unit- Returns:
- true if the user is in an unit, false otherwise
-
addUserToUnit
@Transactional("unittree.transactionManager") boolean addUserToUnit(int nIdUnit, int nIdUser)Add an user to an unit- Parameters:
nIdUnit- the id unitnIdUser- the id user- Returns:
- true if the user is added to the unit, false otherwise
-
removeUserFromUnit
@Transactional("unittree.transactionManager") void removeUserFromUnit(int nIdUser, int nIdUnit)Remove the user from a unit- Parameters:
nIdUser- the id usernIdUnit- The id of the unit
-
removeUsersFromUnit
@Transactional("unittree.transactionManager") 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.
-
-