Class ProfileInstManager

    • Constructor Detail

      • ProfileInstManager

        protected ProfileInstManager()
        Constructor
    • Method Detail

      • createProfileInst

        public String createProfileInst​(ProfileInst profileInst,
                                        int fatherCompLocalId)
                                 throws AdminException
        Create a new user access profile instance into the database.
        Parameters:
        profileInst - the profile instance ot persist.
        fatherCompLocalId - the unique identifier of the resource on which the profile is about.
        Returns:
        the unique identifier of the profile once persisted.
        Throws:
        AdminException - if an error occurs while creating the profile instance.
      • getProfileInst

        public ProfileInst getProfileInst​(String sProfileId,
                                          boolean includeRemovedUsersAndGroups)
                                   throws AdminException
        Get Profile information from database with the given id and creates a new Profile instance
        Parameters:
        sProfileId - identifier of the profile.
        includeRemovedUsersAndGroups - true to take into account removed groups and removed users.
        Returns:
        the corresponding ProfileInst if any, null otherwise.
        Throws:
        AdminException - if an error occurred.
      • deleteProfileInst

        public void deleteProfileInst​(ProfileInst profileInst)
                               throws AdminException
        Deletes the specified profile instance.
        Parameters:
        profileInst - the profile instance to delete.
        Throws:
        AdminException - if an error occurs while deleting the profile instance in Silverpeas.
      • updateProfileInst

        public String updateProfileInst​(ProfileInst profileInstNew)
                                 throws AdminException
        Updates the specified profile instance. The method takes into account the access rights on nodes of the users or groups of users in the profile.
        Parameters:
        profileInstNew - the profile instance from which its persisted counterpart will be updated in the database.
        Throws:
        AdminException - if an error occurs while updating the profile instance.
      • getProfileIdsOfUser

        public String[] getProfileIdsOfUser​(String sUserId,
                                            List<String> groupIds)
                                     throws AdminException
        Gets the identifiers of all the profiles related to the specified user and to the groups of users.
        Parameters:
        sUserId - the unique identifier of a user.
        groupIds - a list of identifiers of groups of users.
        Returns:
        an array with the identifiers of the profiles matching the request.
        Throws:
        AdminException - if an error occurs while getting the profile identifiers.
      • getAllComponentObjectProfileIdsOfUser

        public String[] getAllComponentObjectProfileIdsOfUser​(String sUserId,
                                                              List<String> groupIds)
                                                       throws AdminException
        Gets the identifiers of all the profiles of a component related to the given user and/or groups of users.
        Parameters:
        sUserId - the unique identifier of a user.
        groupIds - a list of unique identifiers of groups of users.
        Returns:
        an array with the identifiers of the profiles matching the request.
        Throws:
        AdminException - if an error occurs while getting the profiles of a component.
      • getProfileIdsOfGroup

        public String[] getProfileIdsOfGroup​(String sGroupId)
                                      throws AdminException
        Gets the identifiers of all the profiles related to the specified group of users.
        Parameters:
        sGroupId - the unique identifier of a group of user.
        Returns:
        an array with the identifiers of the profiles matching the request.
        Throws:
        AdminException - if an error occurs while getting the profiles.
      • getAllComponentObjectProfileIdsOfGroup

        public String[] getAllComponentObjectProfileIdsOfGroup​(String groupId)
                                                        throws AdminException
        Gets the identifiers all the profiles of nodes related to the given group of users.
        Parameters:
        groupId - the unique identifier of a group.
        Returns:
        an array with the identifiers of the profiles matching the request.
        Throws:
        AdminException - if an error occurs while getting the profiles matching the request.