Class ProfileHome
- java.lang.Object
-
- fr.paris.lutece.plugins.profiles.business.ProfileHome
-
public final class ProfileHome extends Object
ProfileHome
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddRightForProfile(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a right for a profilestatic voidaddRoleForProfile(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a role for a profilestatic voidaddUserForProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add an user for a profilestatic voidaddWorkgroupForProfile(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Add a workgroup for a profilestatic booleancheckExistProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile already exists or notstatic booleancheckProfileAttributed(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the profile is attributed to any userstatic Profilecreate(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)Creation of an instance of profilestatic List<Profile>findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns a collection of profiles objectsstatic ProfilefindByPrimaryKey(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Returns an instance of a profile whose identifier is specified in parameterstatic List<Profile>findProfileByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Load the profile by a given ID userstatic List<Profile>findProfilesByFilter(ProfileFilter pFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find profile by filterstatic fr.paris.lutece.util.ReferenceListgetProfilesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of profilesstatic List<fr.paris.lutece.portal.business.right.Right>getRightsListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of rights associated to the profilestatic List<fr.paris.lutece.portal.business.rbac.RBACRole>getRolesListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of roles associated to the profilestatic List<fr.paris.lutece.portal.business.user.AdminUser>getUsersListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of users associated to the profilestatic ViewgetViewForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the view associated to the profilestatic List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup>getWorkgroupsListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Get the list of workgroups associated to the profilestatic booleanhasProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if the given user has a given profile or notstatic booleanhasRight(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given right.static booleanhasRole(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given role.static booleanhasUser(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given user.static booleanhasWorkgroup(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Check if a profile has the given workgroup.static voidremove(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove the Profile whose identifier is specified in parameterstatic voidremoveProfilesFromUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all profiles associated to an userstatic voidremoveRightFromProfile(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a right from a profilestatic voidremoveRights(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all rights from profilestatic voidremoveRoleFromProfile(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a role from a profilestatic voidremoveRoles(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all roles from profilestatic voidremoveUserFromProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a user from a profilestatic voidremoveUsers(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all users from profilestatic voidremoveView(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove profile from a viewstatic voidremoveWorkgroupFromProfile(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove a workgroup from a profilestatic voidremoveWorkgroups(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all workgroups from profilestatic Profileupdate(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)Update of the profile which is specified in parameter
-
-
-
Method Detail
-
create
public static Profile create(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Creation of an instance of profile- Parameters:
profile- The instance of the profile which contains the informations to storeplugin- Plugin- Returns:
- The instance of profile which has been created with its primary key.
-
update
public static Profile update(Profile profile, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update of the profile which is specified in parameter- Parameters:
profile- The instance of the profile which contains the new data to storeplugin- Plugin- Returns:
- The instance of the profile which has been updated
-
remove
public static void remove(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove the Profile whose identifier is specified in parameter- Parameters:
strProfileKey- The Profile object to removeplugin- Plugin
-
findByPrimaryKey
public static Profile findByPrimaryKey(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a profile whose identifier is specified in parameter- Parameters:
strProfileKey- The key of the profileplugin- Plugin- Returns:
- An instance of profile
-
findAll
public static List<Profile> findAll(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns a collection of profiles objects- Parameters:
plugin- Plugin- Returns:
- A collection of profiles
-
findProfilesByFilter
public static List<Profile> findProfilesByFilter(ProfileFilter pFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Find profile by filter- Parameters:
pFilter- the Filterplugin- Plugin- Returns:
- List of profiles
-
checkExistProfile
public static boolean checkExistProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a profile already exists or not- Parameters:
strProfileKey- The profile keyplugin- Plugin- Returns:
- true if it already exists
-
getProfilesList
public static fr.paris.lutece.util.ReferenceList getProfilesList(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of profiles- Parameters:
plugin- Plugin- Returns:
- the list of profiles
-
checkProfileAttributed
public static boolean checkProfileAttributed(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the profile is attributed to any user- Parameters:
strProfileKey- the profile keyplugin- Plugin- Returns:
- true if it is attributed to at least one user, false otherwise
-
findProfileByIdUser
public static List<Profile> findProfileByIdUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load the profile by a given ID user- Parameters:
nIdUser- the ID userplugin- Plugin- Returns:
- a profile
-
getRightsListForProfile
public static List<fr.paris.lutece.portal.business.right.Right> getRightsListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of rights associated to the profile- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of Right
-
hasRight
public static boolean hasRight(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a profile has the given right.- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin- Returns:
- true if the profile has the right, false otherwise
-
addRightForProfile
public static void addRightForProfile(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add a right for a profile- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin
-
removeRightFromProfile
public static void removeRightFromProfile(String strProfileKey, String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a right from a profile- Parameters:
strProfileKey- The profile KeystrIdRight- The Right IDplugin- Plugin
-
removeRights
public static void removeRights(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove all rights from profile- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
getWorkgroupsListForProfile
public static List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup> getWorkgroupsListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of workgroups associated to the profile- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of workgroups
-
hasWorkgroup
public static boolean hasWorkgroup(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a profile has the given workgroup.- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The Workgroup keyplugin- Plugin- Returns:
- true if the profile has the workgroup, false otherwise
-
addWorkgroupForProfile
public static void addWorkgroupForProfile(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add a workgroup for a profile- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The WorkgroupKeyplugin- Plugin
-
removeWorkgroupFromProfile
public static void removeWorkgroupFromProfile(String strProfileKey, String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a workgroup from a profile- Parameters:
strProfileKey- The profile KeystrWorkgroupKey- The Workgroup keyplugin- Plugin
-
removeWorkgroups
public static void removeWorkgroups(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove all workgroups from profile- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
getRolesListForProfile
public static List<fr.paris.lutece.portal.business.rbac.RBACRole> getRolesListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of roles associated to the profile- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of roles
-
hasRole
public static boolean hasRole(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a profile has the given role.- Parameters:
strProfileKey- The profile KeystrRoleKey- The Role keyplugin- Plugin- Returns:
- true if the profile has the role, false otherwise
-
addRoleForProfile
public static void addRoleForProfile(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add a role for a profile- Parameters:
strProfileKey- The profile KeystrRoleKey- The RoleKeyplugin- Plugin
-
removeRoleFromProfile
public static void removeRoleFromProfile(String strProfileKey, String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a role from a profile- Parameters:
strProfileKey- The profile KeystrRoleKey- The role keyplugin- Plugin
-
removeRoles
public static void removeRoles(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove all roles from profile- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
getUsersListForProfile
public static List<fr.paris.lutece.portal.business.user.AdminUser> getUsersListForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of users associated to the profile- Parameters:
strProfileKey- The profile Keyplugin- Plugin- Returns:
- The list of users
-
hasUser
public static boolean hasUser(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if a profile has the given user.- Parameters:
strProfileKey- The profile KeynIdUser- The User IDplugin- Plugin- Returns:
- true if the profile has the user, false otherwise
-
addUserForProfile
public static void addUserForProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Add an user for a profile- Parameters:
strProfileKey- The profile KeynIdUser- The User IDplugin- Plugin
-
removeUserFromProfile
public static void removeUserFromProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a user from a profile- Parameters:
strProfileKey- The key of the profilenIdUser- The User IDplugin- Plugin
-
removeUsers
public static void removeUsers(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove all users from profile- Parameters:
strProfileKey- The profile keyplugin- Plugin
-
removeProfilesFromUser
public static void removeProfilesFromUser(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)Remove all profiles associated to an user- Parameters:
nIdUser- The User IDplugin- Plugin
-
hasProfile
public static boolean hasProfile(String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Check if the given user has a given profile or not- Parameters:
strProfileKey- The key of the profilenIdUser- the ID userplugin- Plugin- Returns:
- true if the user has the profile, false otherwise
-
getViewForProfile
public static View getViewForProfile(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the view associated to the profile- Parameters:
strProfileKey- the profile keyplugin- Plugin- Returns:
- the view
-
removeView
public static void removeView(String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove profile from a view- Parameters:
strProfileKey- the profile keyplugin- Plugin
-
-