Package org.silverpeas.core.admin.domain
Class DomainDriverManager
- java.lang.Object
-
- org.silverpeas.core.admin.domain.AbstractDomainDriver
-
- org.silverpeas.core.admin.domain.DomainDriverManager
-
- All Implemented Interfaces:
DomainDriver
@Service @Singleton public class DomainDriverManager extends AbstractDomainDriver
A manager of domain drivers. It exposes domain related operations and delegates the domain specific tasks to the correct domain driver for a given domain identifier for which the operation is performed.
-
-
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 static String
DOMAIN
static String
GROUP
-
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
DomainDriverManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>
authenticate(String sKey)
Map<String,String>
authenticate(String sKey, boolean removeKey)
void
beginSynchronization(String sdomainId)
Called when Admin starts the synchronization on a particular DomainString
createDomain(Domain theDomain)
String
createGroup(GroupDetail group)
String
createUser(UserDetail user)
Create a new User.void
deleteGroup(String groupId)
void
deleteUser(String userId)
Delete given user from SilverpeasString
endSynchronization(String sdomainId, boolean cancelSynchro)
Called when Admin ends the synchronizationDomain[]
getAllDomains()
List<GroupDetail>
getAllGroupOfDomain(String domainId)
GroupDetail[]
getAllGroups()
GroupDetail[]
getAllRootGroups()
GroupDetail[]
getAllRootGroups(String domainId)
UserDetail[]
getAllUsers()
UserDetail[]
getAllUsers(String domainId)
Domain
getDomain(String domainId)
long
getDomainActions(String domainId)
DomainDriver
getDomainDriver(String domainId)
GroupDetail
getGroup(String specificId)
return group with given id (contains list of user ids for this group)GroupDetail
getGroupByName(String groupName)
GroupDetail
getGroupByNameInDomain(String groupName, String domainId)
return group with given group name in domainString[]
getGroupMemberGroupIds(String groupId)
String[]
getGroupMemberGroupIds(String domainId, String groupId)
GroupDetail[]
getGroups(String groupId)
String
getNextDomainId()
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 value)
GroupDetail
importGroup(String groupName)
UserDetail
importUser(String userLogin)
void
indexAllGroups(String domainId)
Indexing all groups information of given domainvoid
indexAllUsers(String domainId)
Indexing all users information of given domainvoid
indexGroup(GroupDetail group)
Indexing a groupvoid
indexUser(String userId)
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.String
removeDomain(String domainId)
void
removeGroup(String groupId)
void
removeUser(String userId)
void
resetEncryptedPassword(UserDetail user, String encryptedPassword)
void
resetPassword(UserDetail user, String password)
GroupDetail
synchroGroup(String groupId)
UserDetail
synchroUser(String userId)
void
unindexGroup(String groupId)
Unindexing a groupvoid
unindexUser(String userId)
String
updateDomain(Domain theDomain)
void
updateGroup(GroupDetail group)
Update given group in specific domainvoid
updateUserDetail(UserDetail user)
void
updateUserFull(UserFull user)
-
Methods inherited from class org.silverpeas.core.admin.domain.AbstractDomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, idAsInt, idAsString, init, initFromProperties, 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
getUserFilterManager
-
-
-
-
Field Detail
-
DOMAIN
public static final String DOMAIN
- See Also:
- Constant Field Values
-
GROUP
public static final String GROUP
- See Also:
- Constant Field Values
-
-
Method Detail
-
createUser
public String createUser(UserDetail user) throws AdminException
Create a new User.- Parameters:
user
-- Returns:
- 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
-
deleteUser
public void deleteUser(String userId) throws AdminException
Delete given user from Silverpeas- Parameters:
userId
- user Id- Throws:
AdminException
- if the user deletion failed.
-
updateUserDetail
public void updateUserDetail(UserDetail user) throws AdminException
- Parameters:
user
-- 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
-
updateUserFull
public void updateUserFull(UserFull user) throws AdminException
- Parameters:
user
-- Throws:
AdminException
-
getUserFull
public UserFull getUserFull(String specificId) throws AdminException
Description copied from interface:DomainDriver
Retrieves common user information from database with the additional data.- 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.- 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
- Throws:
AdminException
-
getAllUsers
public UserDetail[] getAllUsers() throws AdminException
- Throws:
AdminException
-
getUsersBySpecificProperty
public UserDetail[] getUsersBySpecificProperty(String propertyName, String value) 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
-
getAllUsers
public UserDetail[] getAllUsers(String domainId) throws AdminException
- Parameters:
domainId
-- Returns:
- User[]
- Throws:
AdminException
-
indexAllUsers
public void indexAllUsers(String domainId) throws AdminException
Indexing all users information of given domain- Parameters:
domainId
-- Throws:
AdminException
-
indexUser
public void indexUser(String userId)
-
unindexUser
public void unindexUser(String userId)
-
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
Update given group in specific domain- Parameters:
group
-- Throws:
AdminException
-
getGroup
public GroupDetail getGroup(String specificId) throws AdminException
return group with given id (contains list of user ids for this group)- Parameters:
specificId
-- Returns:
- GroupDetail
- Throws:
AdminException
-
getGroupByName
public GroupDetail getGroupByName(String groupName) throws AdminException
- Throws:
AdminException
-
getGroupByNameInDomain
public GroupDetail getGroupByNameInDomain(String groupName, String domainId) throws AdminException
return group with given group name in domain- Parameters:
groupName
-- Returns:
- GroupDetail
- 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
-
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String groupId) throws AdminException
- Throws:
AdminException
-
getGroupMemberGroupIds
public String[] getGroupMemberGroupIds(String domainId, String groupId) throws AdminException
- Throws:
AdminException
-
getAllRootGroups
public GroupDetail[] getAllRootGroups(String domainId) throws AdminException
- Throws:
AdminException
-
getAllGroupOfDomain
public List<GroupDetail> getAllGroupOfDomain(String domainId) throws AdminException
- Throws:
AdminException
-
indexAllGroups
public void indexAllGroups(String domainId) throws AdminException
Indexing all groups information of given domain- Parameters:
domainId
-- Throws:
AdminException
-
indexGroup
public void indexGroup(GroupDetail group)
Indexing a group- Parameters:
group
-
-
unindexGroup
public void unindexGroup(String groupId)
Unindexing a group- Parameters:
groupId
-
-
authenticate
public Map<String,String> authenticate(String sKey) throws AdminException
- Throws:
AdminException
-
authenticate
public Map<String,String> authenticate(String sKey, boolean removeKey) throws AdminException
- Parameters:
sKey
- anthentication keyremoveKey
- remove after- Returns:
- Throws:
AdminException
-
getAllDomains
public Domain[] getAllDomains() throws AdminException
- Throws:
AdminException
-
getDomainActions
public long getDomainActions(String domainId) throws AdminException
- Throws:
AdminException
-
getNextDomainId
public String getNextDomainId()
-
createDomain
public String createDomain(Domain theDomain) throws AdminException
- Throws:
AdminException
-
updateDomain
public String updateDomain(Domain theDomain) throws AdminException
- Throws:
AdminException
-
removeDomain
public String removeDomain(String domainId) throws AdminException
- Throws:
AdminException
-
getDomain
public Domain getDomain(String domainId) throws AdminException
- Throws:
AdminException
-
getDomainDriver
public DomainDriver getDomainDriver(String domainId) throws AdminException
- Throws:
AdminException
-
beginSynchronization
public void beginSynchronization(String sdomainId) throws AdminException
Called when Admin starts the synchronization on a particular Domain- Throws:
AdminException
-
endSynchronization
public String endSynchronization(String sdomainId, boolean cancelSynchro) throws AdminException
Called when Admin ends the synchronization- Parameters:
cancelSynchro
- true if the synchronization is cancelled, false if it ends normally- Throws:
AdminException
-
getUserAttributes
public List<String> getUserAttributes() 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
-
-