Class GoogleDriver

  • All Implemented Interfaces:
    DomainDriver

    public class GoogleDriver
    extends AbstractDomainDriver
    Domain driver for LDAP access. Could be used to access any type of LDAP DB (even exchange) IMPORTANT : For the moment, it is not possible to add, remove or update a group neither add or remove an user. However, it is possible to update an user...
    Author:
    tleroi
    • Field Detail

      • settings

        protected org.silverpeas.kernel.bundle.SettingBundle settings
    • Constructor Detail

      • GoogleDriver

        public GoogleDriver()
    • Method Detail

      • initFromProperties

        public void initFromProperties​(org.silverpeas.kernel.bundle.SettingBundle rs)
        Virtual method that performs extra initialization from a properties file. To overload by the class who need it.
        Specified by:
        initFromProperties in interface DomainDriver
        Overrides:
        initFromProperties in class AbstractDomainDriver
        Parameters:
        rs - name of resource file
      • importUser

        public UserDetail importUser​(String userLogin)
        Import a given user in Database from the reference
        Parameters:
        userLogin - The User Login to import
        Returns:
        The User object that contain new user information
      • removeUser

        public void removeUser​(String userId)
        Remove a given user from database
        Parameters:
        userId - The user id To remove synchro
      • synchroUser

        public UserDetail synchroUser​(String userId)
                               throws AdminException
        Update user information in database
        Parameters:
        userId - The User Id to synchronize
        Returns:
        The User object that contain new user information
        Throws:
        AdminException
      • deleteUser

        public void deleteUser​(String userId)
      • updateUserFull

        public void updateUserFull​(UserFull user)
      • updateUserDetail

        public void updateUserDetail​(UserDetail user)
      • getUserFull

        public UserFull getUserFull​(String specificId)
                             throws AdminException
        Retrieve user information from database
        Parameters:
        specificId - The user id as stored in the database
        Returns:
        The User object that contain new user information
        Throws:
        AdminException - on error.
      • listUserFulls

        public List<UserFull> listUserFulls​(Collection<String> specificIds)
                                     throws AdminException
        Description copied from interface: DomainDriver
        Retrieves common user information with the additional data from database against the given identifiers.
        Parameters:
        specificIds - The user ids as stored in the database.
        Returns:
        a list of full User object.
        Throws:
        AdminException
      • getUser

        public UserDetail getUser​(String specificId)
                           throws AdminException
        Retrieve user information from database
        Parameters:
        specificId - The user id as stored in the database
        Returns:
        The User object that contain new user information
        Throws:
        AdminException - on error.
      • listUsers

        public List<UserDetail> listUsers​(Collection<String> specificIds)
                                   throws AdminException
        Description copied from interface: DomainDriver
        Retrieves the common user information from database against the given identifiers.
        Parameters:
        specificIds - The user ids as stored in the database.
        Returns:
        a list of common User object.
        Throws:
        AdminException
      • getAllUsers

        public UserDetail[] getAllUsers()
                                 throws AdminException
        Retrieve all users from the database
        Returns:
        User[] An array of User Objects that contain users information
        Throws:
        AdminException - on error.
      • getUserMemberGroupIds

        public String[] getUserMemberGroupIds​(String specificId)
        Retrieve user's groups
        Parameters:
        specificId - The user id as stored in the database
        Returns:
        The User's groups specific Ids
      • importGroup

        public GroupDetail importGroup​(String groupName)
        Import a given group in Database from the reference
        Parameters:
        groupName - The group name to import
        Returns:
        The group object that contain new group information
      • removeGroup

        public void removeGroup​(String groupId)
        Remove a given group from database
        Parameters:
        groupId - The group id To remove synchro
      • synchroGroup

        public GroupDetail synchroGroup​(String groupId)
        Update group information in database
        Parameters:
        groupId - The group Id to synchronize
        Returns:
        The group object that contain new group information
      • deleteGroup

        public void deleteGroup​(String groupId)
      • updateGroup

        public void updateGroup​(GroupDetail group)
      • getGroup

        public GroupDetail getGroup​(String specificId)
        Retrieve group information from database
        Parameters:
        specificId - The group id as stored in the database
        Returns:
        The GroupDetail object that contains user information
      • getGroups

        public GroupDetail[] getGroups​(String groupId)
        Retrieve all groups contained in the given group
        Parameters:
        groupId - The group id as stored in the database
        Returns:
        GroupDetail[] An array of GroupDetail Objects that contain groups information
      • getAllGroups

        public GroupDetail[] getAllGroups()
        Retrieve all groups from the database
        Returns:
        GroupDetail[] An array of GroupDetail Objects that contain groups information
      • getAllRootGroups

        public GroupDetail[] getAllRootGroups()
        Retrieve all root groups from the database
        Returns:
        GroupDetail[] An array of GroupDetail Objects that contain root groups information
      • getGroupMemberGroupIds

        public String[] getGroupMemberGroupIds​(String groupId)
      • getUserAttributes

        public List<String> getUserAttributes()
      • resetPassword

        public void resetPassword​(UserDetail user,
                                  String password)
      • resetEncryptedPassword

        public void resetEncryptedPassword​(UserDetail user,
                                           String encryptedPassword)