Class GoogleDriver
- java.lang.Object
-
- org.silverpeas.core.admin.domain.AbstractDomainDriver
-
- org.silverpeas.core.admin.domain.driver.googledriver.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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.admin.domain.DomainDriver
DomainDriver.ActionConstants, DomainDriver.UserFilterManager
-
-
Field Summary
Fields Modifier and Type Field Description protected org.silverpeas.kernel.bundle.SettingBundle
settings
-
Constructor Summary
Constructors Constructor Description GoogleDriver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createGroup(GroupDetail group)
String
createUser(UserDetail user)
void
deleteGroup(String groupId)
void
deleteUser(String userId)
GroupDetail[]
getAllGroups()
Retrieve all groups from the databaseGroupDetail[]
getAllRootGroups()
Retrieve all root groups from the databaseUserDetail[]
getAllUsers()
Retrieve all users from the databaselong
getDriverActions()
Gets all the actions this driver supports.GroupDetail
getGroup(String specificId)
Retrieve group information from databaseGroupDetail
getGroupByName(String groupName)
String[]
getGroupMemberGroupIds(String groupId)
GroupDetail[]
getGroups(String groupId)
Retrieve all groups contained in the given groupUserDetail
getUser(String specificId)
Retrieve user information from databaseList<String>
getUserAttributes()
Optional<DomainDriver.UserFilterManager>
getUserFilterManager()
Gets an optionalDomainDriver.UserFilterManager
which permits to manage a filter to apply on the user request results obtained from external user account repository.UserFull
getUserFull(String specificId)
Retrieve user information from databaseString[]
getUserMemberGroupIds(String specificId)
Retrieve user's groupsUserDetail[]
getUsersByQuery(Map<String,String> query)
UserDetail[]
getUsersBySpecificProperty(String propertyName, String propertyValue)
GroupDetail
importGroup(String groupName)
Import a given group in Database from the referenceUserDetail
importUser(String userLogin)
Import a given user in Database from the referencevoid
initFromProperties(org.silverpeas.kernel.bundle.SettingBundle rs)
Virtual method that performs extra initialization from a properties file.boolean
isSynchroThreaded()
List<UserFull>
listUserFulls(Collection<String> specificIds)
Retrieves common user information with the additional data from database against the given identifiers.List<UserDetail>
listUsers(Collection<String> specificIds)
Retrieves the common user information from database against the given identifiers.void
removeGroup(String groupId)
Remove a given group from databasevoid
removeUser(String userId)
Remove a given user from databasevoid
resetEncryptedPassword(UserDetail user, String encryptedPassword)
void
resetPassword(UserDetail user, String password)
GroupDetail
synchroGroup(String groupId)
Update group information in databaseUserDetail
synchroUser(String userId)
Update user information in databasevoid
updateGroup(GroupDetail group)
void
updateUserDetail(UserDetail user)
void
updateUserFull(UserFull user)
-
Methods inherited from class org.silverpeas.core.admin.domain.AbstractDomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDomainId, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, idAsInt, idAsString, init, isGroupsInheritProfiles, isSynchroInProcess, isSynchroOnLoginEnabled, isSynchroOnLoginRecursToGroups, isX509CertificateEnabled, isX509Enabled, mustImportUsers, setSynchroInProcess
-
-
-
-
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 interfaceDomainDriver
- Overrides:
initFromProperties
in classAbstractDomainDriver
- Parameters:
rs
- name of resource file
-
getDriverActions
public long getDriverActions()
Gets all the actions this driver supports.- Specified by:
getDriverActions
in interfaceDomainDriver
- Overrides:
getDriverActions
in classAbstractDomainDriver
- Returns:
- a bit mask identifying the supported actions.
-
isSynchroThreaded
public boolean isSynchroThreaded()
- Specified by:
isSynchroThreaded
in interfaceDomainDriver
- Overrides:
isSynchroThreaded
in classAbstractDomainDriver
-
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
-
createUser
public String createUser(UserDetail user)
-
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.
-
getUsersBySpecificProperty
public UserDetail[] getUsersBySpecificProperty(String propertyName, String propertyValue) throws AdminException
- Throws:
AdminException
-
getUsersByQuery
public UserDetail[] getUsersByQuery(Map<String,String> query)
-
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
-
createGroup
public String createGroup(GroupDetail group)
-
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
-
getGroupByName
public GroupDetail getGroupByName(String groupName)
-
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
-
resetPassword
public void resetPassword(UserDetail user, String password)
-
resetEncryptedPassword
public void resetEncryptedPassword(UserDetail user, String encryptedPassword)
-
getUserFilterManager
public Optional<DomainDriver.UserFilterManager> getUserFilterManager()
Description copied from interface:DomainDriver
Gets an optionalDomainDriver.UserFilterManager
which permits to manage a filter to apply on the user request results obtained from external user account repository.- Returns:
- an optional
DomainDriver.UserFilterManager
implementation.
-
-