com.stratelia.webactiv.beans.admin
Class DomainDriverManager

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.AbstractDomainDriver
      extended by com.stratelia.webactiv.beans.admin.DomainDriverManager
All Implemented Interfaces:
DomainDriver

public class DomainDriverManager
extends AbstractDomainDriver


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
DomainDriverManager()
           
 
Method Summary
 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 Domain
 void commit()
          Commit transaction
 void commit(String domainId)
          Commit transaction in specific domain driver
 String createDomain(Domain theDomain)
           
 String createGroup(Group group)
           
 String createUser(UserDetail user)
          Create a new User.
 String createUser(UserFull user)
          Create a new User.
 void deleteGroup(String groupId)
           
 void deleteUser(String userId)
          Delete given user from Silverpeas
 String endSynchronization(String sdomainId, boolean cancelSynchro)
          Called when Admin ends the synchronization
 Group[] getAllChangedGroups(String fromTimeStamp, String toTimeStamp)
           
 UserDetail[] getAllChangedUsers(String fromTimeStamp, String toTimeStamp)
           
 Domain[] getAllDomains()
           
 GroupRow[] getAllGroupOfDomain(String domainId)
           
 Group[] getAllGroups()
           
 Group[] getAllGroups(String domainId)
           
 Group[] getAllRootGroups()
           
 Group[] getAllRootGroups(String domainId)
           
 UserDetail[] getAllUsers()
           
 UserDetail[] getAllUsers(String domainId)
           
 Domain getDomain(String domainId)
           
 long getDomainActions(String domainId)
           
 DomainDriver getDomainDriver(int domainId)
           
 Group getGroup(String groupId)
          return group with given id (contains list of user ids for this group)
 Group getGroupByName(String groupName)
           
 Group getGroupByNameInDomain(String groupName, String domainId)
          return group with given group name in domain
 String[] getGroupMemberGroupIds(String groupId)
           
 String[] getGroupMemberGroupIds(String domainId, String groupId)
           
 Group[] getGroups(String groupId)
           
 String getNextDomainId()
           
 OrganizationSchema getOrganization()
           
 void getOrganizationSchema()
          Get an organization schema from the pool.
 UserDetail getUser(String userId)
           
 List<String> getUserAttributes()
           
 UserDetail getUserDetail(String userId)
           
 UserFull getUserFull(String userId)
          Retrieve user information from database
 String[] getUserIdsOfDomain(String domainId)
           
 String[] getUserMemberGroupIds(String userId)
           
 UserDetail[] getUsers(String[] userIds)
           
 UserDetail[] getUsersByQuery(Map<String,String> query)
           
 UserDetail[] getUsersBySpecificProperty(String propertyName, String value)
           
 Group importGroup(String groupName)
           
 UserDetail importUser(String userLogin)
           
 void indexAllGroups(String domainId)
          Indexing all groups information of given domain
 void indexAllUsers(String domainId)
          Indexing all users information of given domain
 void indexGroup(GroupRow group)
          Indexing a group
 void indexUser(String userId)
           
 void releaseOrganizationSchema()
          Release the organization schema.
 String removeDomain(String domainId)
           
 void removeGroup(String groupId)
           
 void removeUser(String userId)
           
 void resetEncryptedPassword(UserDetail user, String encryptedPassword)
           
 void resetPassword(UserDetail user, String password)
           
 void rollback()
          Rollback transaction
 void rollback(String domainId)
          Rollback transaction in specific domain driver
 void startTransaction(boolean bAutoCommit)
          Start a new transaction
 void startTransaction(String domainId, boolean bAutoCommit)
          Start a new transaction in specific domain driver
 Group synchroGroup(String groupId)
           
 UserDetail synchroUser(String userId)
           
protected  String[] translateUserIdsToSpecificIds(int domainId, String[] ids)
           
 void unindexGroup(String groupId)
          Unindexing a group
 void unindexUser(String userId)
           
 String updateDomain(Domain theDomain)
           
 void updateGroup(Group group)
          Update given group in specific domain
 void updateUserDetail(UserDetail user)
           
 void updateUserFull(UserFull 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, 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
 

Constructor Detail

DomainDriverManager

public DomainDriverManager()
Method Detail

getOrganizationSchema

public void getOrganizationSchema()
                           throws AdminException
Get an organization schema from the pool.

Throws:
AdminException

releaseOrganizationSchema

public void releaseOrganizationSchema()
                               throws AdminException
Release the organization schema.

Throws:
AdminException

createUser

public String createUser(UserFull user)
                  throws Exception
Create a new User.

Parameters:
user -
Returns:
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

createUser

public String createUser(UserDetail user)
                  throws Exception
Create a new User.

Parameters:
user -
Returns:
Throws:
Exception

deleteUser

public void deleteUser(String userId)
                throws Exception
Delete given user from Silverpeas

Parameters:
userId - user Id
Throws:
Exception

updateUserDetail

public void updateUserDetail(UserDetail user)
                      throws Exception
Parameters:
user -
Throws:
Exception

getUser

public UserDetail getUser(String userId)
                   throws Exception
Throws:
Exception

updateUserFull

public void updateUserFull(UserFull user)
                    throws Exception
Parameters:
user -
Throws:
Exception

getUserIdsOfDomain

public String[] getUserIdsOfDomain(String domainId)
                            throws Exception
Throws:
Exception

getUserFull

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

Parameters:
userId - The user id as stored in the database
Returns:
The full User object that contain ALL user informations
Throws:
Exception

getUserDetail

public UserDetail getUserDetail(String userId)
                         throws Exception
Parameters:
userId -
Returns:
Throws:
Exception

getUserMemberGroupIds

public String[] getUserMemberGroupIds(String userId)
                               throws Exception
Throws:
Exception

getUsers

public UserDetail[] getUsers(String[] userIds)
                      throws Exception
Parameters:
userIds -
Returns:
Throws:
Exception

getAllUsers

public UserDetail[] getAllUsers()
                         throws Exception
Returns:
User[]
Throws:
Exception

getUsersBySpecificProperty

public UserDetail[] getUsersBySpecificProperty(String propertyName,
                                               String value)
                                        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

getAllUsers

public UserDetail[] getAllUsers(String domainId)
                         throws Exception
Parameters:
domainId -
Returns:
User[]
Throws:
Exception

indexAllUsers

public void indexAllUsers(String domainId)
                   throws Exception
Indexing all users information of given domain

Parameters:
domainId -
Throws:
Exception

indexUser

public void indexUser(String userId)

unindexUser

public void unindexUser(String userId)

createGroup

public String createGroup(Group group)
                   throws Exception
Parameters:
group -
Returns:
Throws:
Exception

deleteGroup

public void deleteGroup(String groupId)
                 throws Exception
Parameters:
groupId -
Throws:
Exception

updateGroup

public void updateGroup(Group group)
                 throws Exception
Update given group in specific domain

Parameters:
group -
Throws:
Exception

getGroup

public Group getGroup(String groupId)
               throws Exception
return group with given id (contains list of user ids for this group)

Parameters:
groupId -
Returns:
Group
Throws:
Exception

getGroupByName

public Group getGroupByName(String groupName)
                     throws Exception
Throws:
Exception

getGroupByNameInDomain

public Group getGroupByNameInDomain(String groupName,
                                    String domainId)
                             throws Exception
return group with given group name in domain

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

getAllGroups

public Group[] getAllGroups(String domainId)
                     throws Exception
Parameters:
domainId -
Returns:
Group[]
Throws:
Exception

getAllRootGroups

public Group[] getAllRootGroups()
                         throws Exception
Returns:
@throws Exception
Throws:
Exception

getGroupMemberGroupIds

public String[] getGroupMemberGroupIds(String groupId)
                                throws Exception
Throws:
Exception

getGroupMemberGroupIds

public String[] getGroupMemberGroupIds(String domainId,
                                       String groupId)
                                throws Exception
Parameters:
domainId -
groupId -
Returns:
Throws:
Exception

getAllRootGroups

public Group[] getAllRootGroups(String domainId)
                         throws Exception
Parameters:
domainId -
Returns:
Throws:
Exception

getAllGroupOfDomain

public GroupRow[] getAllGroupOfDomain(String domainId)
                               throws Exception
Throws:
Exception

indexAllGroups

public void indexAllGroups(String domainId)
                    throws Exception
Indexing all groups information of given domain

Parameters:
domainId -
Throws:
Exception

indexGroup

public void indexGroup(GroupRow 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 Exception
Parameters:
sKey -
Returns:
boolean
Throws:
Exception

authenticate

public Map<String,String> authenticate(String sKey,
                                       boolean removeKey)
                                throws Exception
Parameters:
sKey - anthentication key
removeKey - remove after
Returns:
Throws:
Exception

getAllDomains

public Domain[] getAllDomains()
                       throws AdminException
Returns:
Domain[]
Throws:
AdminException

getDomainActions

public long getDomainActions(String domainId)
                      throws Exception
Parameters:
domainId -
Returns:
Throws:
Exception

getNextDomainId

public String getNextDomainId()
                       throws Exception
Throws:
Exception

createDomain

public String createDomain(Domain theDomain)
                    throws Exception
Throws:
Exception

updateDomain

public String updateDomain(Domain theDomain)
                    throws Exception
Throws:
Exception

removeDomain

public String removeDomain(String domainId)
                    throws Exception
Throws:
Exception

getDomain

public Domain getDomain(String domainId)
                 throws Exception
Parameters:
domainId -
Returns:
String
Throws:
Exception

getDomainDriver

public DomainDriver getDomainDriver(int domainId)
                             throws Exception
Parameters:
domainId -
Returns:
DomainDriver
Throws:
Exception

beginSynchronization

public void beginSynchronization(String sdomainId)
                          throws Exception
Called when Admin starts the synchronization on a particular Domain

Throws:
Exception

endSynchronization

public String endSynchronization(String sdomainId,
                                 boolean cancelSynchro)
                          throws Exception
Called when Admin ends the synchronization

Parameters:
cancelSynchro - true if the synchronization is cancelled, false if it ends normally
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

startTransaction

public void startTransaction(String domainId,
                             boolean bAutoCommit)
                      throws Exception
Start a new transaction in specific domain driver

Throws:
Exception

commit

public void commit(String domainId)
            throws Exception
Commit transaction in specific domain driver

Throws:
Exception

rollback

public void rollback(String domainId)
              throws Exception
Rollback transaction in specific domain driver

Throws:
Exception

translateUserIdsToSpecificIds

protected String[] translateUserIdsToSpecificIds(int domainId,
                                                 String[] ids)

getUserAttributes

public List<String> getUserAttributes()
                               throws Exception
Throws:
Exception

getOrganization

public OrganizationSchema getOrganization()

resetPassword

public void resetPassword(UserDetail user,
                          String password)
                   throws Exception
Throws:
Exception

resetEncryptedPassword

public void resetEncryptedPassword(UserDetail user,
                                   String encryptedPassword)
                            throws Exception
Throws:
Exception


Copyright © 2016 Silverpeas. All Rights Reserved.