Class SilverpeasDriver
- java.lang.Object
-
- org.silverpeas.core.admin.domain.AbstractDomainDriver
-
- org.silverpeas.core.admin.domain.driver.SilverpeasDriver
-
- All Implemented Interfaces:
DomainDriver
,SilverpeasDomainDriver
@Singleton @Service public class SilverpeasDriver extends AbstractDomainDriver implements SilverpeasDomainDriver
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.silverpeas.core.admin.domain.DomainDriver
DomainDriver.ActionConstants, DomainDriver.UserFilterManager
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.admin.domain.AbstractDomainDriver
domainId, domainProperties, keys, mapParameters, propertiesDescriptions, propertiesl10n, propertiesLabels, synchroInProcess, x509Enabled
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SilverpeasDriver()
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 specificId)
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(SettingBundle rs)
Virtual method that performs extra initialization from a properties file.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)
void
removeUser(String userId)
void
removeUserFromGroup(String userId, String groupId)
void
resetEncryptedPassword(UserDetail userDetail, String encryptedPassword)
void
resetPassword(UserDetail userDetail, String password)
GroupDetail
synchroGroup(String groupId)
UserDetail
synchroUser(String userId)
void
updateGroup(GroupDetail group)
void
updateUserDetail(UserDetail ud)
void
updateUserFull(UserFull userFull)
-
Methods inherited from class org.silverpeas.core.admin.domain.AbstractDomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, 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
-
Methods inherited from interface org.silverpeas.core.admin.domain.DomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, getUserFilterManager, init, isGroupsInheritProfiles, isSynchroInProcess, isSynchroOnLoginEnabled, isSynchroOnLoginRecursToGroups, isSynchroThreaded, isX509CertificateEnabled, mustImportUsers
-
-
-
-
Method Detail
-
initFromProperties
public void initFromProperties(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
- Specified by:
importUser
in interfaceDomainDriver
- Throws:
AdminException
-
removeUser
public void removeUser(String userId) throws AdminException
- Specified by:
removeUser
in interfaceDomainDriver
- Throws:
AdminException
-
synchroUser
public UserDetail synchroUser(String userId) throws AdminException
- Specified by:
synchroUser
in interfaceDomainDriver
- Throws:
AdminException
-
createUser
public String createUser(UserDetail ud)
- Specified by:
createUser
in interfaceDomainDriver
- Parameters:
ud
- a user detail- Returns:
- the new user id.
-
deleteUser
public void deleteUser(String userId)
- Specified by:
deleteUser
in interfaceDomainDriver
-
updateUserFull
public void updateUserFull(UserFull userFull)
- Specified by:
updateUserFull
in interfaceDomainDriver
-
updateUserDetail
public void updateUserDetail(UserDetail ud)
- Specified by:
updateUserDetail
in interfaceDomainDriver
-
getUser
public UserDetail getUser(String specificId)
Description copied from interface:DomainDriver
Retrieves common user information from database.- Specified by:
getUser
in interfaceDomainDriver
- Parameters:
specificId
- The user id as stored in the database.- Returns:
- The full User object that contain ALL user information.
-
listUsers
public List<UserDetail> listUsers(Collection<String> specificIds)
Description copied from interface:DomainDriver
Retrieves the common user information from database against the given identifiers.- Specified by:
listUsers
in interfaceDomainDriver
- Parameters:
specificIds
- The user ids as stored in the database.- Returns:
- a list of common User object.
-
getUserFull
public UserFull getUserFull(String specificId) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information from database with the additional data.- Specified by:
getUserFull
in interfaceDomainDriver
- Parameters:
specificId
- 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> specificIds) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information with the additional data from database against the given identifiers.- Specified by:
listUserFulls
in interfaceDomainDriver
- Parameters:
specificIds
- 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
- Specified by:
getUserMemberGroupIds
in interfaceDomainDriver
- Throws:
AdminException
-
getAllUsers
public UserDetail[] getAllUsers()
- Specified by:
getAllUsers
in interfaceDomainDriver
-
getUsersBySpecificProperty
public UserDetail[] getUsersBySpecificProperty(String propertyName, String propertyValue) throws AdminException
- Specified by:
getUsersBySpecificProperty
in interfaceDomainDriver
- Throws:
AdminException
-
getUsersByQuery
public UserDetail[] getUsersByQuery(Map<String,String> query) throws AdminException
- Specified by:
getUsersByQuery
in interfaceDomainDriver
- Throws:
AdminException
-
importGroup
public GroupDetail importGroup(String groupName) throws AdminException
- Specified by:
importGroup
in interfaceDomainDriver
- Throws:
AdminException
-
removeGroup
public void removeGroup(String groupId) throws AdminException
- Specified by:
removeGroup
in interfaceDomainDriver
- Throws:
AdminException
-
synchroGroup
public GroupDetail synchroGroup(String groupId) throws AdminException
- Specified by:
synchroGroup
in interfaceDomainDriver
- Throws:
AdminException
-
createGroup
public String createGroup(GroupDetail group)
- Specified by:
createGroup
in interfaceDomainDriver
-
deleteGroup
public void deleteGroup(String groupId)
- Specified by:
deleteGroup
in interfaceDomainDriver
-
updateGroup
public void updateGroup(GroupDetail group) throws AdminException
- Specified by:
updateGroup
in interfaceDomainDriver
- Throws:
AdminException
-
getGroup
public GroupDetail getGroup(String specificId)
- Specified by:
getGroup
in interfaceDomainDriver
-
getGroupByName
public GroupDetail getGroupByName(String groupName) throws AdminException
- Specified by:
getGroupByName
in interfaceDomainDriver
- Throws:
AdminException
-
getGroups
public GroupDetail[] getGroups(String groupId)
- Specified by:
getGroups
in interfaceDomainDriver
-
getAllGroups
public GroupDetail[] getAllGroups()
- Specified by:
getAllGroups
in interfaceDomainDriver
-
getAllRootGroups
public GroupDetail[] getAllRootGroups()
- Specified by:
getAllRootGroups
in interfaceDomainDriver
-
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String groupId) throws AdminException
- Specified by:
getGroupMemberGroupIds
in interfaceDomainDriver
- Throws:
AdminException
-
getUserAttributes
public List<String> getUserAttributes() throws AdminException
- Specified by:
getUserAttributes
in interfaceDomainDriver
- Throws:
AdminException
-
resetPassword
public void resetPassword(UserDetail userDetail, String password) throws AdminException
- Specified by:
resetPassword
in interfaceDomainDriver
- Throws:
AdminException
-
resetEncryptedPassword
public void resetEncryptedPassword(UserDetail userDetail, String encryptedPassword) throws AdminException
- Specified by:
resetEncryptedPassword
in interfaceDomainDriver
- Throws:
AdminException
-
-