Class ProfileDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.profiles.business.ProfileDAO
-
- All Implemented Interfaces:
IProfileDAO
public class ProfileDAO extends java.lang.Object implements IProfileDAO
ProfileDAO
-
-
Constructor Summary
Constructors Constructor Description ProfileDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckExistProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile already exists or notbooleancheckProfileAttributed(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the profile is attributed to any uservoiddelete(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the tablevoiddeleteProfilesFromUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all profiles associated to an uservoiddeleteRightFromProfile(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a right from a profilevoiddeleteRights(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all rights from profilevoiddeleteRoleFromProfile(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a roles from a profilevoiddeleteRoles(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all roles from profilevoiddeleteUserFromProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove an user from a profilevoiddeleteUsers(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all users from profilevoiddeleteView(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove profile from a viewvoiddeleteWorkgroupFromProfile(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a workgroup from a profilevoiddeleteWorkgroups(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all workgroups from profilefr.paris.lutece.util.ReferenceListgetProfileList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of profilesbooleanhasProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the given user has a given profile or notbooleanhasRight(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given right.booleanhasRole(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given role.booleanhasUser(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given user.booleanhasWorkgroup(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given workgroup.voidinsert(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert a new record in the table.voidinsertRightForProfile(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a right for a profilevoidinsertRoleForProfile(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a roles for a profilevoidinsertUserForProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add an user for a profilevoidinsertWorkgroupForProfile(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a workgroup for a profileProfileload(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the data of Profile from the tablejava.util.List<Profile>selectProfileByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the profiles by a given ID userjava.util.List<Profile>selectProfileList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the list of profilesjava.util.List<Profile>selectProfilesByFilter(ProfileFilter pFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find profile by filterjava.util.List<fr.paris.lutece.portal.business.right.Right>selectRightsListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of rights associated to the profilejava.util.List<fr.paris.lutece.portal.business.rbac.RBACRole>selectRolesListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of roles associated to the profilejava.util.List<fr.paris.lutece.portal.business.user.AdminUser>selectUsersListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of users associated to the profileViewselectViewForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the view associated to the profilejava.util.List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup>selectWorkgroupsListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of workgroups associated to the profilevoidstore(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update the record identified by the given profile key with the given profile in the table
-
-
-
Method Detail
-
insert
public void insert(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert a new record in the table.- Specified by:
insertin interfaceIProfileDAO- Parameters:
profile- The profile objectplugin- Plugin
-
load
public Profile load(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the data of Profile from the table- Specified by:
loadin interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin- Returns:
- the instance of the Profile
-
delete
public void delete(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete a record from the table- Specified by:
deletein interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
store
public void store(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update the record identified by the given profile key with the given profile in the table- Specified by:
storein interfaceIProfileDAO- Parameters:
profile- The reference of profile to be the new oneplugin- Plugin
-
selectProfileList
public java.util.List<Profile> selectProfileList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the list of profiles- Specified by:
selectProfileListin interfaceIProfileDAO- Parameters:
plugin- Plugin- Returns:
- The List of the profiles
-
selectProfilesByFilter
public java.util.List<Profile> selectProfilesByFilter(ProfileFilter pFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find profile by filter- Specified by:
selectProfilesByFilterin interfaceIProfileDAO- Parameters:
pFilter- the Filterplugin- Plugin- Returns:
- List of profiles
-
checkExistProfile
public boolean checkExistProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile already exists or not- Specified by:
checkExistProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin- Returns:
- true if it already exists
-
getProfileList
public fr.paris.lutece.util.ReferenceList getProfileList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of profiles- Specified by:
getProfileListin interfaceIProfileDAO- Parameters:
plugin- Plugin- Returns:
- the list of profiles
-
checkProfileAttributed
public boolean checkProfileAttributed(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the profile is attributed to any user- Specified by:
checkProfileAttributedin interfaceIProfileDAO- Parameters:
strProfileKey- the profile keyplugin- Plugin- Returns:
- true if it is attributed to at least one user, false otherwise
-
selectProfileByIdUser
public java.util.List<Profile> selectProfileByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the profiles by a given ID user- Specified by:
selectProfileByIdUserin interfaceIProfileDAO- Parameters:
nIdUser- the ID userplugin- Plugin- Returns:
- the list of profiles of the user
-
selectRightsListForProfile
public java.util.List<fr.paris.lutece.portal.business.right.Right> selectRightsListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of rights associated to the profile- Specified by:
selectRightsListForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of Right
-
hasRight
public boolean hasRight(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given right.- Specified by:
hasRightin interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin- Returns:
- true if the profile has the right, false otherwise
-
insertRightForProfile
public void insertRightForProfile(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a right for a profile- Specified by:
insertRightForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin
-
deleteRightFromProfile
public void deleteRightFromProfile(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a right from a profile- Specified by:
deleteRightFromProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin
-
deleteRights
public void deleteRights(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all rights from profile- Specified by:
deleteRightsin interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
selectWorkgroupsListForProfile
public java.util.List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup> selectWorkgroupsListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of workgroups associated to the profile- Specified by:
selectWorkgroupsListForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of workgroups
-
hasWorkgroup
public boolean hasWorkgroup(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given workgroup.- Specified by:
hasWorkgroupin interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The Workgroup keyplugin- Plugin- Returns:
- true if the profile has the workgroup, false otherwise
-
insertWorkgroupForProfile
public void insertWorkgroupForProfile(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a workgroup for a profile- Specified by:
insertWorkgroupForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The WorkgroupKeyplugin- Plugin
-
deleteWorkgroupFromProfile
public void deleteWorkgroupFromProfile(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a workgroup from a profile- Specified by:
deleteWorkgroupFromProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The Right IDplugin- Plugin
-
deleteWorkgroups
public void deleteWorkgroups(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all workgroups from profile- Specified by:
deleteWorkgroupsin interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
selectRolesListForProfile
public java.util.List<fr.paris.lutece.portal.business.rbac.RBACRole> selectRolesListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of roles associated to the profile- Specified by:
selectRolesListForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of roles
-
hasRole
public boolean hasRole(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given role.- Specified by:
hasRolein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrRoleKey- The Role keyplugin- Plugin- Returns:
- true if the profile has the workgroup, false otherwise
-
insertRoleForProfile
public void insertRoleForProfile(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a roles for a profile- Specified by:
insertRoleForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrRoleKey- The WorkgroupKeyplugin- Plugin
-
deleteRoleFromProfile
public void deleteRoleFromProfile(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a roles from a profile- Specified by:
deleteRoleFromProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeystrRoleKey- The Right IDplugin- Plugin
-
deleteRoles
public void deleteRoles(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all roles from profile- Specified by:
deleteRolesin interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
selectUsersListForProfile
public java.util.List<fr.paris.lutece.portal.business.user.AdminUser> selectUsersListForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of users associated to the profile- Specified by:
selectUsersListForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of users
-
hasUser
public boolean hasUser(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given user.- Specified by:
hasUserin interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeynIdUser- The User IDplugin- Plugin- Returns:
- true if the profile has the user, false otherwise
-
insertUserForProfile
public void insertUserForProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add an user for a profile- Specified by:
insertUserForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The profile KeynIdUser- The User IDplugin- Plugin
-
deleteUserFromProfile
public void deleteUserFromProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove an user from a profile- Specified by:
deleteUserFromProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The key of the profilenIdUser- The User IDplugin- Plugin
-
deleteUsers
public void deleteUsers(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all users from profile- Specified by:
deleteUsersin interfaceIProfileDAO- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
deleteProfilesFromUser
public void deleteProfilesFromUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all profiles associated to an user- Specified by:
deleteProfilesFromUserin interfaceIProfileDAO- Parameters:
nIdUser- The User IDplugin- Plugin
-
hasProfile
public boolean hasProfile(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the given user has a given profile or not- Specified by:
hasProfilein interfaceIProfileDAO- Parameters:
strProfileKey- The key of the profilenIdUser- the ID userplugin- Plugin- Returns:
- true if the user has the profile, false otherwise
-
selectViewForProfile
public View selectViewForProfile(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the view associated to the profile- Specified by:
selectViewForProfilein interfaceIProfileDAO- Parameters:
strProfileKey- the profile keyplugin- Plugin- Returns:
- the view
-
deleteView
public void deleteView(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove profile from a view- Specified by:
deleteViewin interfaceIProfileDAO- Parameters:
strProfileKey- the profile keyplugin- Plugin
-
-