Interface IProfilesService

  • All Known Implementing Classes:
    ProfilesService

    public interface IProfilesService
    IProfilesService
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addRightForProfile​(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add a right for a profile
      void addRoleForProfile​(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add a role for a profile
      void addUserForProfile​(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add an user for a profile
      void addWorkgroupForProfile​(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Add a workgroup for a profile
      boolean checkExistProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if a profile already exists or not
      boolean checkProfileAttributed​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if the profile is attributed to any user
      Profile create​(Profile profile, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Creation of an instance of profile
      void doAssignUserToProfile​(int nIdUser, javax.servlet.http.HttpServletRequest request, java.util.Locale locale)
      Do assign user to a profile
      void doUnassignUserFromProfile​(int nIdUser, java.lang.String strProfileKey, fr.paris.lutece.portal.business.user.AdminUser currentUser, javax.servlet.http.HttpServletRequest request, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Do unassign user from profile
      java.util.List<Profile> findAll​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns a collection of profiles objects
      Profile findByPrimaryKey​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Returns an instance of a profile whose identifier is specified in parameter
      java.util.List<Profile> findProfileByIdUser​(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Load the list of profiles by a given ID user
      java.util.List<Profile> findProfilesByFilter​(ProfileFilter pFilter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find profile by filter
      fr.paris.lutece.util.html.ItemNavigator getItemNavigator​(ProfileFilter pFilter, Profile profile, fr.paris.lutece.util.url.UrlItem url)
      Get the item navigator
      java.util.List<ProfileAction> getListActions​(fr.paris.lutece.portal.business.user.AdminUser user, Profile profile, java.lang.String strPermission, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of actions
      fr.paris.lutece.util.ReferenceList getProfilesList​(fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of profiles
      java.util.List<fr.paris.lutece.portal.business.right.Right> getRightsListForProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of rights associated to the profile
      java.util.List<fr.paris.lutece.portal.business.rbac.RBACRole> getRolesListForProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of roles associated to the profile
      java.util.List<fr.paris.lutece.portal.business.user.AdminUser> getUsersListForProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of users associated to the profile
      View getViewForProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the view associated to the profile
      java.util.List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup> getWorkgroupsListForProfile​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Get the list of workgroups associated to the profile
      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
      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.
      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.
      boolean hasUser​(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Check if a profile has the given user.
      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.
      void remove​(java.lang.String strProfileKey, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove the Profile whose identifier is specified in parameter
      void removeProfilesFromUser​(int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all profiles associated to an user
      void removeRightFromProfile​(java.lang.String strProfileKey, java.lang.String strIdRight, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a right from a profile
      void removeRights​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all rights from profile
      void removeRoleFromProfile​(java.lang.String strProfileKey, java.lang.String strRoleKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a role from a profile
      void removeRoles​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all roles from profile
      void removeUserFromProfile​(java.lang.String strProfileKey, int nIdUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a user from a profile
      void removeUsers​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all users from profile
      void removeView​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove profile from a view
      void removeWorkgroupFromProfile​(java.lang.String strProfileKey, java.lang.String strWorkgroupKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove a workgroup from a profile
      void removeWorkgroups​(java.lang.String strProfileKey, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Remove all workgroups from profile
      Profile update​(Profile profile, java.util.Locale locale, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Update of the profile which is specified in parameter
    • Method Detail

      • getItemNavigator

        fr.paris.lutece.util.html.ItemNavigator getItemNavigator​(ProfileFilter pFilter,
                                                                 Profile profile,
                                                                 fr.paris.lutece.util.url.UrlItem url)
        Get the item navigator
        Parameters:
        pFilter - the profile filter
        profile - the profile
        url - the url
        Returns:
        the item navigator
      • getListActions

        java.util.List<ProfileAction> getListActions​(fr.paris.lutece.portal.business.user.AdminUser user,
                                                     Profile profile,
                                                     java.lang.String strPermission,
                                                     java.util.Locale locale,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of actions
        Parameters:
        user - the current user
        profile - the profile
        strPermission - the permission name
        locale - Locale
        plugin - Plugin
        Returns:
        the list of actions
      • doAssignUserToProfile

        void doAssignUserToProfile​(int nIdUser,
                                   javax.servlet.http.HttpServletRequest request,
                                   java.util.Locale locale)
        Do assign user to a profile
        Parameters:
        nIdUser - the id suer
        request - the HTTP request
        locale - the Locale
      • doUnassignUserFromProfile

        void doUnassignUserFromProfile​(int nIdUser,
                                       java.lang.String strProfileKey,
                                       fr.paris.lutece.portal.business.user.AdminUser currentUser,
                                       javax.servlet.http.HttpServletRequest request,
                                       java.util.Locale locale,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Do unassign user from profile
        Parameters:
        nIdUser - the id user
        strProfileKey - the profile key
        currentUser - the current user
        request - the HTTP request
        locale - the locale
        plugin - the plugin
      • create

        Profile create​(Profile profile,
                       java.util.Locale locale,
                       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 store
        locale - the Locale
        plugin - Plugin
        Returns:
        The instance of profile which has been created with its primary key.
      • update

        Profile update​(Profile profile,
                       java.util.Locale locale,
                       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 store
        locale - the Locale
        plugin - Plugin
        Returns:
        The instance of the profile which has been updated
      • remove

        void remove​(java.lang.String strProfileKey,
                    java.util.Locale locale,
                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove the Profile whose identifier is specified in parameter
        Parameters:
        strProfileKey - The Profile object to remove
        locale - the Locale
        plugin - Plugin
      • findByPrimaryKey

        Profile findByPrimaryKey​(java.lang.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 profile
        plugin - Plugin
        Returns:
        An instance of profile
      • findAll

        java.util.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

        java.util.List<Profile> findProfilesByFilter​(ProfileFilter pFilter,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Find profile by filter
        Parameters:
        pFilter - the Filter
        plugin - Plugin
        Returns:
        List of profiles
      • checkExistProfile

        boolean checkExistProfile​(java.lang.String strProfileKey,
                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if a profile already exists or not
        Parameters:
        strProfileKey - The profile key
        plugin - Plugin
        Returns:
        true if it already exists
      • getProfilesList

        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

        boolean checkProfileAttributed​(java.lang.String strProfileKey,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if the profile is attributed to any user
        Parameters:
        strProfileKey - the profile key
        plugin - Plugin
        Returns:
        true if it is attributed to at least one user, false otherwise
      • findProfileByIdUser

        java.util.List<Profile> findProfileByIdUser​(int nIdUser,
                                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Load the list of profiles by a given ID user
        Parameters:
        nIdUser - the ID user
        plugin - Plugin
        Returns:
        The list of profiles
      • getRightsListForProfile

        java.util.List<fr.paris.lutece.portal.business.right.Right> getRightsListForProfile​(java.lang.String strProfileKey,
                                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of rights associated to the profile
        Parameters:
        strProfileKey - The profile Key
        plugin - Plugin
        Returns:
        The list of Right
      • hasRight

        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.
        Parameters:
        strProfileKey - The profile Key
        strIdRight - The Right ID
        plugin - Plugin
        Returns:
        true if the profile has the right, false otherwise
      • addRightForProfile

        void addRightForProfile​(java.lang.String strProfileKey,
                                java.lang.String strIdRight,
                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add a right for a profile
        Parameters:
        strProfileKey - The profile Key
        strIdRight - The Right ID
        plugin - Plugin
      • removeRightFromProfile

        void removeRightFromProfile​(java.lang.String strProfileKey,
                                    java.lang.String strIdRight,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove a right from a profile
        Parameters:
        strProfileKey - The profile Key
        strIdRight - The Right ID
        plugin - Plugin
      • removeRights

        void removeRights​(java.lang.String strProfileKey,
                          fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all rights from profile
        Parameters:
        strProfileKey - The profile key
        plugin - Plugin
      • getWorkgroupsListForProfile

        java.util.List<fr.paris.lutece.portal.business.workgroup.AdminWorkgroup> getWorkgroupsListForProfile​(java.lang.String strProfileKey,
                                                                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of workgroups associated to the profile
        Parameters:
        strProfileKey - The profile Key
        plugin - Plugin
        Returns:
        The list of workgroups
      • hasWorkgroup

        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.
        Parameters:
        strProfileKey - The profile Key
        strWorkgroupKey - The Workgroup key
        plugin - Plugin
        Returns:
        true if the profile has the workgroup, false otherwise
      • addWorkgroupForProfile

        void addWorkgroupForProfile​(java.lang.String strProfileKey,
                                    java.lang.String strWorkgroupKey,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add a workgroup for a profile
        Parameters:
        strProfileKey - The profile Key
        strWorkgroupKey - The WorkgroupKey
        plugin - Plugin
      • removeWorkgroupFromProfile

        void removeWorkgroupFromProfile​(java.lang.String strProfileKey,
                                        java.lang.String strWorkgroupKey,
                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove a workgroup from a profile
        Parameters:
        strProfileKey - The profile Key
        strWorkgroupKey - The Workgroup key
        plugin - Plugin
      • removeWorkgroups

        void removeWorkgroups​(java.lang.String strProfileKey,
                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all workgroups from profile
        Parameters:
        strProfileKey - The profile key
        plugin - Plugin
      • getRolesListForProfile

        java.util.List<fr.paris.lutece.portal.business.rbac.RBACRole> getRolesListForProfile​(java.lang.String strProfileKey,
                                                                                             fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of roles associated to the profile
        Parameters:
        strProfileKey - The profile Key
        plugin - Plugin
        Returns:
        The list of roles
      • hasRole

        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.
        Parameters:
        strProfileKey - The profile Key
        strRoleKey - The Role key
        plugin - Plugin
        Returns:
        true if the profile has the role, false otherwise
      • addRoleForProfile

        void addRoleForProfile​(java.lang.String strProfileKey,
                               java.lang.String strRoleKey,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add a role for a profile
        Parameters:
        strProfileKey - The profile Key
        strRoleKey - The RoleKey
        plugin - Plugin
      • removeRoleFromProfile

        void removeRoleFromProfile​(java.lang.String strProfileKey,
                                   java.lang.String strRoleKey,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove a role from a profile
        Parameters:
        strProfileKey - The profile Key
        strRoleKey - The role key
        plugin - Plugin
      • removeRoles

        void removeRoles​(java.lang.String strProfileKey,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all roles from profile
        Parameters:
        strProfileKey - The profile key
        plugin - Plugin
      • getUsersListForProfile

        java.util.List<fr.paris.lutece.portal.business.user.AdminUser> getUsersListForProfile​(java.lang.String strProfileKey,
                                                                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the list of users associated to the profile
        Parameters:
        strProfileKey - The profile Key
        plugin - Plugin
        Returns:
        The list of users
      • hasUser

        boolean hasUser​(java.lang.String strProfileKey,
                        int nIdUser,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Check if a profile has the given user.
        Parameters:
        strProfileKey - The profile Key
        nIdUser - The User ID
        plugin - Plugin
        Returns:
        true if the profile has the user, false otherwise
      • addUserForProfile

        void addUserForProfile​(java.lang.String strProfileKey,
                               int nIdUser,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Add an user for a profile
        Parameters:
        strProfileKey - The profile Key
        nIdUser - The User ID
        plugin - Plugin
      • removeUserFromProfile

        void removeUserFromProfile​(java.lang.String strProfileKey,
                                   int nIdUser,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove a user from a profile
        Parameters:
        strProfileKey - The key of the profile
        nIdUser - The User ID
        plugin - Plugin
      • removeUsers

        void removeUsers​(java.lang.String strProfileKey,
                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all users from profile
        Parameters:
        strProfileKey - The profile key
        plugin - Plugin
      • removeProfilesFromUser

        void removeProfilesFromUser​(int nIdUser,
                                    fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove all profiles associated to an user
        Parameters:
        nIdUser - The User ID
        plugin - Plugin
      • hasProfile

        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
        Parameters:
        strProfileKey - The key of the profile
        nIdUser - the ID user
        plugin - Plugin
        Returns:
        true if the user has the profile, false otherwise
      • getViewForProfile

        View getViewForProfile​(java.lang.String strProfileKey,
                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Get the view associated to the profile
        Parameters:
        strProfileKey - the profile key
        plugin - Plugin
        Returns:
        the view
      • removeView

        void removeView​(java.lang.String strProfileKey,
                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Remove profile from a view
        Parameters:
        strProfileKey - the profile key
        plugin - Plugin