fr.paris.lutece.plugins.mylutece.modules.directory.authentication.business
Class MyluteceDirectoryDAO

java.lang.Object
  extended by fr.paris.lutece.plugins.mylutece.modules.directory.authentication.business.MyluteceDirectoryDAO
All Implemented Interfaces:
IMyluteceDirectoryDAO

public class MyluteceDirectoryDAO
extends Object
implements IMyluteceDirectoryDAO

This class provides Data Access methods for authentication (role retrieval).


Constructor Summary
MyluteceDirectoryDAO()
           
 
Method Summary
 void assignDirectory(int nIdDirectory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a directory as a user directory
 void createGroupForUser(int nIdRecord, String strGroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a group to user
 void createRoleForUser(int nIdRecord, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Assign a role to user
 void deleteGroupsForUser(int nIdRecord, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete groups for a user
 void deleteRolesForUser(int nIdRecord, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          boolean selectResetPasswordFromLogin( String strLogin, Plugin plugin ); /** Delete roles for a user
 int findUserIdFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the id of a user from his login
 boolean isMapped(int nIdDirectory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if the specified directory is mapped for managing users
 Collection<String> selectLoginListForRoleKey(String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load the list of DirectoryUsers for a Lutece role
 Collection<Integer> selectMappedDirectories(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the list of directory identifier which are mapped as user directory
 Timestamp selectPasswordMaxValideDateFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Gets the password max valid date of a user from his login.
 boolean selectResetPasswordFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Check if a user has reset his password from his login
 List<String> selectUserGroupsFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's groups by login
 List<String> selectUserRolesFromLogin(String strLogin, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Find user's roles by login
 void unAssignDirectories(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Unassign all directories
 void unAssignDirectory(int nIdDirectory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Unassign a directory
 void updateResetPasswordFromLogin(String strUserName, boolean bNewValue, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update the reset password attribut of a user from his login
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyluteceDirectoryDAO

public MyluteceDirectoryDAO()
Method Detail

selectUserRolesFromLogin

public List<String> selectUserRolesFromLogin(String strLogin,
                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find user's roles by login

Specified by:
selectUserRolesFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strLogin - the login
plugin - The Plugin using this data access service
Returns:
ArrayList the roles key list corresponding to the login

selectResetPasswordFromLogin

public boolean selectResetPasswordFromLogin(String strLogin,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a user has reset his password from his login

Specified by:
selectResetPasswordFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strLogin - the login
plugin - The Plugin using this data access service
Returns:
boolean true if the password vhas been reset, false otherwise

selectPasswordMaxValideDateFromLogin

public Timestamp selectPasswordMaxValideDateFromLogin(String strLogin,
                                                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Gets the password max valid date of a user from his login.

Specified by:
selectPasswordMaxValideDateFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strLogin - the login of the user
plugin - The plugin
Returns:
The date of end of validity of the password of the user, or null if none has been set.

deleteRolesForUser

public void deleteRolesForUser(int nIdRecord,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
boolean selectResetPasswordFromLogin( String strLogin, Plugin plugin ); /** Delete roles for a user

Specified by:
deleteRolesForUser in interface IMyluteceDirectoryDAO
Parameters:
nIdRecord - The id of the user
plugin - The Plugin using this data access service

createRoleForUser

public void createRoleForUser(int nIdRecord,
                              String strRoleKey,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Assign a role to user

Specified by:
createRoleForUser in interface IMyluteceDirectoryDAO
Parameters:
nIdRecord - The id of the user
strRoleKey - The key of the role
plugin - The Plugin using this data access service

selectUserGroupsFromLogin

public List<String> selectUserGroupsFromLogin(String strLogin,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find user's groups by login

Specified by:
selectUserGroupsFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strLogin - The login
plugin - The Plugin using this data access service
Returns:
ArrayList the group key list corresponding to the login

selectLoginListForRoleKey

public Collection<String> selectLoginListForRoleKey(String strRoleKey,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of DirectoryUsers for a Lutece role

Specified by:
selectLoginListForRoleKey in interface IMyluteceDirectoryDAO
Parameters:
strRoleKey - The role key of DirectoryUser
plugin - The Plugin using this data access service
Returns:
The Collection of the DirectoryUsers

deleteGroupsForUser

public void deleteGroupsForUser(int nIdRecord,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete groups for a user

Specified by:
deleteGroupsForUser in interface IMyluteceDirectoryDAO
Parameters:
nIdRecord - The id of the user
plugin - The Plugin using this data access service

createGroupForUser

public void createGroupForUser(int nIdRecord,
                               String strGroupKey,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Assign a group to user

Specified by:
createGroupForUser in interface IMyluteceDirectoryDAO
Parameters:
nIdRecord - The id of the user
strGroupKey - The key of the group
plugin - The Plugin using this data access service

isMapped

public boolean isMapped(int nIdDirectory,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the specified directory is mapped for managing users

Specified by:
isMapped in interface IMyluteceDirectoryDAO
Parameters:
nIdDirectory - The directory identifier
plugin - The Plugin using this data access service
Returns:
true if the directory is mapped, false else

selectMappedDirectories

public Collection<Integer> selectMappedDirectories(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the list of directory identifier which are mapped as user directory

Specified by:
selectMappedDirectories in interface IMyluteceDirectoryDAO
Parameters:
plugin - The Plugin using this data access service
Returns:
The Collection of id directory

assignDirectory

public void assignDirectory(int nIdDirectory,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Assign a directory as a user directory

Specified by:
assignDirectory in interface IMyluteceDirectoryDAO
Parameters:
nIdDirectory - The directory identifier
plugin - The Plugin using this data access service

unAssignDirectories

public void unAssignDirectories(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassign all directories

Specified by:
unAssignDirectories in interface IMyluteceDirectoryDAO
Parameters:
plugin - The Plugin using this data access service

unAssignDirectory

public void unAssignDirectory(int nIdDirectory,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
Unassign a directory

Specified by:
unAssignDirectory in interface IMyluteceDirectoryDAO
Parameters:
nIdDirectory - The directory identifier
plugin - The Plugin using this data access service

updateResetPasswordFromLogin

public void updateResetPasswordFromLogin(String strUserName,
                                         boolean bNewValue,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the reset password attribut of a user from his login

Specified by:
updateResetPasswordFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strUserName - Login of the user to update
bNewValue - New value
plugin - The plugin

findUserIdFromLogin

public int findUserIdFromLogin(String strLogin,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the id of a user from his login

Specified by:
findUserIdFromLogin in interface IMyluteceDirectoryDAO
Parameters:
strLogin - Login of the user
plugin - The plugin
Returns:
The id of the user


Copyright © 2014 Mairie de Paris. All Rights Reserved.