com.silverpeas.domains.silverpeasdriver
Class SilverpeasDriver

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.AbstractDomainDriver
      extended by com.silverpeas.domains.silverpeasdriver.SilverpeasDriver
All Implemented Interfaces:
SilverpeasDomainDriver, DomainDriver

@Service
@Transactional
public class SilverpeasDriver
extends AbstractDomainDriver
implements SilverpeasDomainDriver


Field Summary
 
Fields inherited from class com.stratelia.webactiv.beans.admin.AbstractDomainDriver
domainId, domainProperties, keys, m_mapParameters, m_PropertiesDescriptions, m_PropertiesLabels, m_PropertiesMultilang, synchroInProcess, x509Enabled
 
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
 
Constructor Summary
SilverpeasDriver()
          Constructor
 
Method Summary
 void addUserInGroup(String userId, String groupId)
           
 void commit()
           
 String createGroup(Group group)
           
 String createUser(UserDetail ud)
           
 void deleteGroup(String groupId)
           
 void deleteUser(String userId)
           
 Group[] getAllChangedGroups(String fromTimeStamp, String toTimeStamp)
           
 UserDetail[] getAllChangedUsers(String fromTimeStamp, String toTimeStamp)
           
 Group[] getAllGroups()
           
 Group[] getAllRootGroups()
           
 UserDetail[] getAllUsers()
           
 Group getGroup(String groupId)
           
 Group getGroupByName(String groupName)
           
 String[] getGroupMemberGroupIds(String groupId)
           
 Group[] getGroups(String groupId)
           
 UserDetail getUser(String userId)
           
 List<String> getUserAttributes()
           
 UserFull getUserFull(String userId)
          Retrieve user information from database
 String[] getUserMemberGroupIds(String userId)
           
 UserDetail[] getUsersByQuery(Map<String,String> query)
           
 UserDetail[] getUsersBySpecificProperty(String propertyName, String propertyValue)
           
 Group importGroup(String groupName)
           
 UserDetail importUser(String userLogin)
           
 void initFromProperties(ResourceLocator rs)
          Virtual method that performs extra initialization from a properties file.
 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)
           
 void rollback()
           
 void startTransaction(boolean bAutoCommit)
           
 Group synchroGroup(String groupId)
           
 UserDetail synchroUser(String userId)
           
 void updateGroup(Group group)
           
 void updateUserDetail(UserDetail ud)
           
 void updateUserFull(UserFull userFull)
           
 
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
 
Methods inherited from interface com.stratelia.webactiv.beans.admin.DomainDriver
addPropertiesToImport, addPropertiesToImport, beginSynchronization, endSynchronization, getDriverActions, getMapParameters, getPropertiesDescriptions, getPropertiesLabels, getPropertiesNames, getPropertiesToImport, getProperty, getTimeStamp, getTimeStampField, init, isGroupsInheritProfiles, isSynchroInProcess, isSynchroOnLoginEnabled, isSynchroOnLoginRecursToGroups, isSynchroThreaded, isX509CertificateEnabled, mustImportUsers
 

Constructor Detail

SilverpeasDriver

public SilverpeasDriver()
Constructor

Method Detail

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
Specified by:
getAllChangedUsers in interface DomainDriver
Throws:
Exception

getAllChangedGroups

public Group[] getAllChangedGroups(String fromTimeStamp,
                                   String toTimeStamp)
                            throws Exception
Specified by:
getAllChangedGroups in interface DomainDriver
Throws:
Exception

importUser

public UserDetail importUser(String userLogin)
                      throws Exception
Specified by:
importUser in interface DomainDriver
Throws:
Exception

removeUser

public void removeUser(String userId)
                throws Exception
Specified by:
removeUser in interface DomainDriver
Throws:
Exception

synchroUser

public UserDetail synchroUser(String userId)
                       throws Exception
Specified by:
synchroUser in interface DomainDriver
Throws:
Exception

createUser

public String createUser(UserDetail ud)
Specified by:
createUser in interface DomainDriver
Parameters:
ud -
Returns:
the new user id.

deleteUser

public void deleteUser(String userId)
Specified by:
deleteUser in interface DomainDriver
Parameters:
userId -

updateUserFull

public void updateUserFull(UserFull userFull)
                    throws UtilException
Specified by:
updateUserFull in interface DomainDriver
Throws:
UtilException

updateUserDetail

public void updateUserDetail(UserDetail ud)
Specified by:
updateUserDetail in interface DomainDriver
Parameters:
ud -

getUser

public UserDetail getUser(String userId)
Specified by:
getUser in interface DomainDriver
Parameters:
userId -
Returns:
User

getUserFull

public UserFull getUserFull(String userId)
Description copied from interface: DomainDriver
Retrieve user information from database

Specified by:
getUserFull in interface DomainDriver
Parameters:
userId - The user id as stored in the database
Returns:
The full User object that contain ALL user informations

getUserMemberGroupIds

public String[] getUserMemberGroupIds(String userId)
                               throws Exception
Specified by:
getUserMemberGroupIds in interface DomainDriver
Throws:
Exception

getAllUsers

public UserDetail[] getAllUsers()
Specified by:
getAllUsers in interface DomainDriver
Returns:
User[]

getUsersBySpecificProperty

public UserDetail[] getUsersBySpecificProperty(String propertyName,
                                               String propertyValue)
                                        throws Exception
Specified by:
getUsersBySpecificProperty in interface DomainDriver
Throws:
Exception

getUsersByQuery

public UserDetail[] getUsersByQuery(Map<String,String> query)
                             throws Exception
Specified by:
getUsersByQuery in interface DomainDriver
Throws:
Exception

importGroup

public Group importGroup(String groupName)
                  throws Exception
Specified by:
importGroup in interface DomainDriver
Throws:
Exception

removeGroup

public void removeGroup(String groupId)
                 throws Exception
Specified by:
removeGroup in interface DomainDriver
Throws:
Exception

synchroGroup

public Group synchroGroup(String groupId)
                   throws Exception
Specified by:
synchroGroup in interface DomainDriver
Throws:
Exception

createGroup

public String createGroup(Group group)
Specified by:
createGroup in interface DomainDriver
Parameters:
group -
Returns:
String

deleteGroup

public void deleteGroup(String groupId)
Specified by:
deleteGroup in interface DomainDriver
Parameters:
groupId -

updateGroup

public void updateGroup(Group group)
                 throws AdminException
Specified by:
updateGroup in interface DomainDriver
Parameters:
group -
Throws:
AdminException

getGroup

public Group getGroup(String groupId)
Specified by:
getGroup in interface DomainDriver
Parameters:
groupId -
Returns:
Group

getGroupByName

public Group getGroupByName(String groupName)
                     throws Exception
Specified by:
getGroupByName in interface DomainDriver
Throws:
Exception

getGroups

public Group[] getGroups(String groupId)
Specified by:
getGroups in interface DomainDriver
Parameters:
groupId -
Returns:
Group[]

getAllGroups

public Group[] getAllGroups()
Specified by:
getAllGroups in interface DomainDriver
Returns:
Group[]

getAllRootGroups

public Group[] getAllRootGroups()
Specified by:
getAllRootGroups in interface DomainDriver

getGroupMemberGroupIds

public String[] getGroupMemberGroupIds(String groupId)
                                throws Exception
Specified by:
getGroupMemberGroupIds in interface DomainDriver
Throws:
Exception

startTransaction

public void startTransaction(boolean bAutoCommit)
Specified by:
startTransaction in interface DomainDriver

commit

public void commit()
            throws Exception
Specified by:
commit in interface DomainDriver
Throws:
Exception

rollback

public void rollback()
              throws Exception
Specified by:
rollback in interface DomainDriver
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)
Parameters:
userId -
groupId -

getUserAttributes

public List<String> getUserAttributes()
                               throws Exception
Specified by:
getUserAttributes in interface DomainDriver
Throws:
Exception

resetPassword

public void resetPassword(UserDetail userDetail,
                          String password)
                   throws Exception
Specified by:
resetPassword in interface DomainDriver
Throws:
Exception

resetEncryptedPassword

public void resetEncryptedPassword(UserDetail userDetail,
                                   String encryptedPassword)
                            throws Exception
Specified by:
resetEncryptedPassword in interface DomainDriver
Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.