com.stratelia.silverpeas.domains.sqldriver
Class SQLDriver
java.lang.Object
com.stratelia.webactiv.beans.admin.AbstractDomainDriver
com.stratelia.silverpeas.domains.sqldriver.SQLDriver
- All Implemented Interfaces:
- DomainDriver
public class SQLDriver
- extends AbstractDomainDriver
Fields inherited from interface com.stratelia.webactiv.beans.admin.DomainDriver |
ACTION_CREATE_GROUP, ACTION_CREATE_USER, ACTION_DELETE_GROUP, ACTION_DELETE_USER, ACTION_EDIT_USER_IN_GROUP, ACTION_IMPORT_GROUP, ACTION_IMPORT_USER, ACTION_MASK_ALL, ACTION_MASK_MIXED_GROUPS, ACTION_MASK_RO, ACTION_MASK_RW, ACTION_NONE, ACTION_READ_GROUP, ACTION_READ_USER, ACTION_REMOVE_GROUP, ACTION_REMOVE_USER, ACTION_SYNCHRO_GROUP, ACTION_SYNCHRO_USER, ACTION_UPDATE_GROUP, ACTION_UPDATE_USER, ACTION_X509_USER |
Methods inherited from class com.stratelia.webactiv.beans.admin.AbstractDomainDriver |
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, getTimeStamp, getTimeStampField, idAsInt, idAsString, init, isGroupsInheritProfiles, isSynchroInProcess, isSynchroOnLoginEnabled, isSynchroOnLoginRecursToGroups, isSynchroThreaded, isX509CertificateEnabled, mustImportUsers |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
openedConnection
protected Connection openedConnection
inTransaction
protected boolean inTransaction
drvSettings
protected SQLSettings drvSettings
localUserMgr
protected SQLUserTable localUserMgr
localGroupMgr
protected SQLGroupTable localGroupMgr
localGroupUserRelMgr
protected SQLGroupUserRelTable localGroupUserRelMgr
SQLDriver
public SQLDriver()
- Constructor
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String groupId)
throws Exception
- Throws:
Exception
initFromProperties
public void initFromProperties(ResourceLocator rs)
throws Exception
- 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
- Throws:
Exception
getAllChangedUsers
public UserDetail[] getAllChangedUsers(String fromTimeStamp,
String toTimeStamp)
throws Exception
- Throws:
Exception
getAllChangedGroups
public Group[] getAllChangedGroups(String fromTimeStamp,
String toTimeStamp)
throws Exception
- Throws:
Exception
importUser
public UserDetail importUser(String userLogin)
throws Exception
- Throws:
Exception
removeUser
public void removeUser(String userId)
throws Exception
- Throws:
Exception
synchroUser
public UserDetail synchroUser(String userId)
throws Exception
- Throws:
Exception
closeConnection
public void closeConnection()
throws AdminException
- Release the DomainSQL schema.
- Throws:
AdminException
createUser
public String createUser(UserDetail ud)
throws Exception
- Parameters:
ud
-
- Returns:
- String
- Throws:
Exception
resetPassword
public void resetPassword(UserDetail user,
String password)
throws Exception
- Throws:
Exception
resetEncryptedPassword
public void resetEncryptedPassword(UserDetail user,
String encryptedPassword)
throws Exception
- Throws:
Exception
deleteUser
public void deleteUser(String userId)
throws Exception
- Parameters:
userId
-
- Throws:
Exception
updateUserFull
public void updateUserFull(UserFull uf)
throws Exception
- Update the data inside domain_user table
- Parameters:
uf
- a UserFull object
- Throws:
Exception
updateUserDetail
public void updateUserDetail(UserDetail ud)
throws Exception
- Parameters:
ud
- a UserDetail object which contains all the data to update inside
domain_user table
- Throws:
Exception
getUser
public UserDetail getUser(String userId)
throws Exception
- Parameters:
userId
-
- Returns:
- User
- Throws:
Exception
getUserFull
public UserFull getUserFull(String id)
throws Exception
- Description copied from interface:
DomainDriver
- Retrieve user information from database
- Parameters:
id
- The user id as stored in the database
- Returns:
- The full User object that contain ALL user informations
- Throws:
Exception
getUserMemberGroupIds
public String[] getUserMemberGroupIds(String userId)
throws Exception
- Throws:
Exception
getAllUsers
public UserDetail[] getAllUsers()
throws Exception
- Returns:
- User[]
- Throws:
Exception
getUsersBySpecificProperty
public UserDetail[] getUsersBySpecificProperty(String propertyName,
String propertyValue)
throws Exception
- Throws:
Exception
getUsersByQuery
public UserDetail[] getUsersByQuery(Map<String,String> query)
throws Exception
- Throws:
Exception
importGroup
public Group importGroup(String groupName)
throws Exception
- Throws:
Exception
removeGroup
public void removeGroup(String groupId)
throws Exception
- Throws:
Exception
synchroGroup
public Group synchroGroup(String groupId)
throws Exception
- Throws:
Exception
createGroup
public String createGroup(Group group)
throws Exception
- Parameters:
group
-
- Returns:
- String
- Throws:
Exception
deleteGroup
public void deleteGroup(String groupId)
throws Exception
- Parameters:
groupId
-
- Throws:
Exception
updateGroup
public void updateGroup(Group group)
throws Exception
- Parameters:
group
-
- Throws:
Exception
getGroup
public Group getGroup(String groupId)
throws Exception
- Parameters:
groupId
-
- Returns:
- Group
- Throws:
Exception
getGroupByName
public Group getGroupByName(String groupName)
throws Exception
- Parameters:
groupName
-
- Returns:
- Group
- Throws:
Exception
getGroups
public Group[] getGroups(String groupId)
throws Exception
- Parameters:
groupId
-
- Returns:
- Group[]
- Throws:
Exception
getAllGroups
public Group[] getAllGroups()
throws Exception
- Returns:
- Group[]
- Throws:
Exception
getAllRootGroups
public Group[] getAllRootGroups()
throws Exception
- Returns:
- Group[]
- Throws:
Exception
addUserInGroup
public void addUserInGroup(String userId,
String groupId)
throws Exception
- Parameters:
userId
- groupId
-
- Throws:
Exception
removeUserFromGroup
public void removeUserFromGroup(String userId,
String groupId)
throws Exception
- Parameters:
userId
- groupId
-
- Throws:
Exception
startTransaction
public void startTransaction(boolean bAutoCommit)
- Start a new transaction
commit
public void commit()
throws Exception
- Commit transaction
- Throws:
Exception
rollback
public void rollback()
throws Exception
- Rollback transaction
- Throws:
Exception
getUserAttributes
public List<String> getUserAttributes()
throws Exception
- Throws:
Exception
Copyright © 2016 Silverpeas. All Rights Reserved.