fr.paris.lutece.portal.business.user
Class AdminUserHome

java.lang.Object
  extended by fr.paris.lutece.portal.business.user.AdminUserHome

public class AdminUserHome
extends java.lang.Object

This class provides instances management methods (create, find, ...) for AdminUser objects


Method Summary
static boolean checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
           
static boolean checkRoleAttributed(java.lang.String strRoleKey)
          Checks wether the role is in use or not
static void create(AdminUser user)
           
static void create(LuteceDefaultAdminUser user)
           
static void createRightForUser(int nUserId, java.lang.String strRightId)
           
static void createRoleForUser(int nUserId, java.lang.String strRightId)
           
static AdminUser findByPrimaryKey(int nUserId)
          Get the user infos from user id
static java.util.Collection<AdminUser> findByRole(java.lang.String strRoleKey)
          Get all users having a given role
static LuteceDefaultAdminUser findLuteceDefaultAdminUserByPrimaryKey(int nUserId)
          Get the user infos from user id
static AdminUser findUserByLogin(java.lang.String strUserLogin)
          Get the user infos from the access code.
static java.util.Collection<AdminUser> findUserList()
           
static java.util.Map<java.lang.String,Right> getRightsListForUser(int nUserId)
          Get the right list associated to a given user id
static java.util.Map<java.lang.String,AdminRole> getRolesListForUser(int nUserId)
          Get the role list associated to a given user id
static void remove(int nUserId)
           
static void removeAllDelegatedRightsForUser(AdminUser user)
           
static void removeAllOwnRightsForUser(AdminUser user)
           
static void removeAllRightsForUser(int nUserId)
           
static void removeAllRolesForUser(int nUserId)
           
static void update(AdminUser user)
           
static void update(LuteceDefaultAdminUser user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findUserByLogin

public static AdminUser findUserByLogin(java.lang.String strUserLogin)
Get the user infos from the access code.

Parameters:
-
Returns:

findByPrimaryKey

public static AdminUser findByPrimaryKey(int nUserId)
Get the user infos from user id

Parameters:
-
Returns:

findUserList

public static java.util.Collection<AdminUser> findUserList()
Returns:

create

public static void create(AdminUser user)
Parameters:
user -

update

public static void update(AdminUser user)
Parameters:
user -

remove

public static void remove(int nUserId)
Parameters:
nUserId -

getRightsListForUser

public static java.util.Map<java.lang.String,Right> getRightsListForUser(int nUserId)
Get the right list associated to a given user id

Parameters:
nUserId - the id of the user to retrieve rights
Returns:
the right list

createRightForUser

public static void createRightForUser(int nUserId,
                                      java.lang.String strRightId)
Parameters:
nUserId -
strRightId -

removeAllRightsForUser

public static void removeAllRightsForUser(int nUserId)
Parameters:
nUserId -

removeAllDelegatedRightsForUser

public static void removeAllDelegatedRightsForUser(AdminUser user)
Parameters:
nUserId -

removeAllOwnRightsForUser

public static void removeAllOwnRightsForUser(AdminUser user)
Parameters:
nUserId -

getRolesListForUser

public static java.util.Map<java.lang.String,AdminRole> getRolesListForUser(int nUserId)
Get the role list associated to a given user id

Parameters:
nUserId - the id of the user to retrieve rights
Returns:
the role list

createRoleForUser

public static void createRoleForUser(int nUserId,
                                     java.lang.String strRightId)
Parameters:
nUserId -
strRightId -

removeAllRolesForUser

public static void removeAllRolesForUser(int nUserId)
Parameters:
nUserId -

checkRoleAttributed

public static boolean checkRoleAttributed(java.lang.String strRoleKey)
Checks wether the role is in use or not

Parameters:
strRoleKey - the role key to check
Returns:
true if the role is attributed, false otherwise

checkAccessCodeAlreadyInUse

public static boolean checkAccessCodeAlreadyInUse(java.lang.String strAccessCode)
Parameters:
strAccessCode -

create

public static void create(LuteceDefaultAdminUser user)
Parameters:
user -

update

public static void update(LuteceDefaultAdminUser user)
Parameters:
user -

findLuteceDefaultAdminUserByPrimaryKey

public static LuteceDefaultAdminUser findLuteceDefaultAdminUserByPrimaryKey(int nUserId)
Get the user infos from user id

Parameters:
-
Returns:

findByRole

public static java.util.Collection<AdminUser> findByRole(java.lang.String strRoleKey)
Get all users having a given role

Parameters:
strRoleKey - The role key
Returns:
A collection of AdminUser


Copyright © 2007 Mairie de Paris. All Rights Reserved.