Class SQLDriver
- java.lang.Object
-
- org.silverpeas.core.admin.domain.AbstractDomainDriver
-
- org.silverpeas.core.admin.domain.driver.sqldriver.SQLDriver
-
- All Implemented Interfaces:
DomainDriver
public class SQLDriver extends AbstractDomainDriver
-
-
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 SQLSettings
drvSettings
static String
GROUP
protected SQLGroupTable
localGroupMgr
protected SQLGroupUserRelTable
localGroupUserRelMgr
protected SQLUserTable
localUserMgr
-
Constructor Summary
Constructors Modifier Constructor Description protected
SQLDriver()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addUserInGroup(String userId, String groupId)
String
createGroup(GroupDetail group)
String
createUser(UserDetail ud)
void
deleteGroup(String groupId)
void
deleteUser(String userId)
GroupDetail[]
getAllGroups()
GroupDetail[]
getAllRootGroups()
UserDetail[]
getAllUsers()
GroupDetail
getGroup(String specificId)
GroupDetail
getGroupByName(String groupName)
String[]
getGroupMemberGroupIds(String groupId)
GroupDetail[]
getGroups(String groupId)
UserDetail
getUser(String specificId)
Retrieves common user information from database.List<String>
getUserAttributes()
UserFull
getUserFull(String id)
Retrieves common user information from database with the additional data.String[]
getUserMemberGroupIds(String specificId)
UserDetail[]
getUsersByQuery(Map<String,String> query)
UserDetail[]
getUsersBySpecificProperty(String propertyName, String propertyValue)
GroupDetail
importGroup(String groupName)
UserDetail
importUser(String userLogin)
void
initFromProperties(org.silverpeas.kernel.bundle.SettingBundle rs)
Virtual method that performs extra initialization from a properties file.List<UserFull>
listUserFulls(Collection<String> ids)
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)
void
removeUser(String userId)
void
removeUserFromGroup(String userId, String groupId)
void
resetEncryptedPassword(UserDetail user, String encryptedPassword)
void
resetPassword(UserDetail user, String password)
GroupDetail
synchroGroup(String groupId)
UserDetail
synchroUser(String userId)
void
updateGroup(GroupDetail group)
void
updateUserDetail(UserDetail ud)
void
updateUserFull(UserFull uf)
Update the data inside domain <DOMAIN_NAME>_user table-
Methods inherited from class org.silverpeas.core.admin.domain.AbstractDomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDomainId, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, idAsInt, idAsString, init, isGroupsInheritProfiles, isSynchroInProcess, isSynchroOnLoginEnabled, isSynchroOnLoginRecursToGroups, isSynchroThreaded, isX509CertificateEnabled, isX509Enabled, mustImportUsers, setSynchroInProcess
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.admin.domain.DomainDriver
getUserFilterManager
-
-
-
-
Field Detail
-
GROUP
public static final String GROUP
- See Also:
- Constant Field Values
-
drvSettings
protected SQLSettings drvSettings
-
localUserMgr
protected SQLUserTable localUserMgr
-
localGroupMgr
protected SQLGroupTable localGroupMgr
-
localGroupUserRelMgr
protected SQLGroupUserRelTable localGroupUserRelMgr
-
-
Method Detail
-
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String groupId) throws AdminException
- Throws:
AdminException
-
initFromProperties
public void initFromProperties(org.silverpeas.kernel.bundle.SettingBundle rs) throws AdminException
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- Throws:
AdminException
-
importUser
public UserDetail importUser(String userLogin) throws AdminException
- Throws:
AdminException
-
removeUser
public void removeUser(String userId) throws AdminException
- Throws:
AdminException
-
synchroUser
public UserDetail synchroUser(String userId) throws AdminException
- Throws:
AdminException
-
createUser
public String createUser(UserDetail ud) throws AdminException
- Throws:
AdminException
-
resetPassword
public void resetPassword(UserDetail user, String password) throws AdminException
- Throws:
AdminException
-
resetEncryptedPassword
public void resetEncryptedPassword(UserDetail user, String encryptedPassword) throws AdminException
- Throws:
AdminException
-
deleteUser
public void deleteUser(String userId) throws AdminException
- Throws:
AdminException
-
updateUserFull
public void updateUserFull(UserFull uf) throws AdminException
Update the data inside domain <DOMAIN_NAME>_user table- Parameters:
uf
- a UserFull object- Throws:
AdminException
-
updateUserDetail
public void updateUserDetail(UserDetail ud) throws AdminException
- Throws:
AdminException
-
getUser
public UserDetail getUser(String specificId) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information from database.- Parameters:
specificId
- The user id as stored in the database.- Returns:
- The full User object that contain ALL user information.
- Throws:
AdminException
-
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
-
getUserFull
public UserFull getUserFull(String id) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information from database with the additional data.- Parameters:
id
- The user id as stored in the database.- Returns:
- The full User object that contain ALL user information.
- Throws:
AdminException
-
listUserFulls
public List<UserFull> listUserFulls(Collection<String> ids) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information with the additional data from database against the given identifiers.- Parameters:
ids
- The user ids as stored in the database.- Returns:
- a list of full User object.
- Throws:
AdminException
-
getUserMemberGroupIds
public String[] getUserMemberGroupIds(String specificId) throws AdminException
- Throws:
AdminException
-
getAllUsers
public UserDetail[] getAllUsers() throws AdminException
- Throws:
AdminException
-
getUsersBySpecificProperty
public UserDetail[] getUsersBySpecificProperty(String propertyName, String propertyValue) throws AdminException
- Throws:
AdminException
-
getUsersByQuery
public UserDetail[] getUsersByQuery(Map<String,String> query) throws AdminException
- Throws:
AdminException
-
importGroup
public GroupDetail importGroup(String groupName) throws AdminException
- Throws:
AdminException
-
removeGroup
public void removeGroup(String groupId) throws AdminException
- Throws:
AdminException
-
synchroGroup
public GroupDetail synchroGroup(String groupId) throws AdminException
- Throws:
AdminException
-
createGroup
public String createGroup(GroupDetail group) throws AdminException
- Throws:
AdminException
-
deleteGroup
public void deleteGroup(String groupId) throws AdminException
- Throws:
AdminException
-
updateGroup
public void updateGroup(GroupDetail group) throws AdminException
- Throws:
AdminException
-
getGroup
public GroupDetail getGroup(String specificId) throws AdminException
- Throws:
AdminException
-
getGroupByName
public GroupDetail getGroupByName(String groupName) throws AdminException
- Throws:
AdminException
-
getGroups
public GroupDetail[] getGroups(String groupId) throws AdminException
- Throws:
AdminException
-
getAllGroups
public GroupDetail[] getAllGroups() throws AdminException
- Throws:
AdminException
-
getAllRootGroups
public GroupDetail[] getAllRootGroups() throws AdminException
- Throws:
AdminException
-
addUserInGroup
public void addUserInGroup(String userId, String groupId) throws AdminException
- Throws:
AdminException
-
removeUserFromGroup
public void removeUserFromGroup(String userId, String groupId) throws AdminException
- Throws:
AdminException
-
getUserAttributes
public List<String> getUserAttributes() throws AdminException
- Throws:
AdminException
-
-