com.silverpeas.jobDomainPeas.control
Class JobDomainPeasSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.silverpeas.jobDomainPeas.control.JobDomainPeasSessionController
All Implemented Interfaces:
ComponentSessionController

public class JobDomainPeasSessionController
extends AbstractComponentSessionController

Class declaration

Author:

Field Summary
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
JobDomainPeasSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
          Standard Session Controller Constructeur
 
Method Summary
 void activateUser(String userId)
           
 void blockUser(String userId)
           
 UserDetail checkUser(UserDetail userToCheck)
           
 void clearListSelectedUsers()
           
 String createDomain(String domainName, String domainDescription, String domainDriver, String domainProperties, String domainAuthentication, String silverpeasServerURL, String domainTimeStamp)
           
 boolean createGroup(String idParent, String groupName, String groupDescription, String groupRule)
           
 String createSQLDomain(String domainName, String domainDescription, String silverpeasServerURL, String usersInDomainQuotaMaxCount)
           
 String createUser(UserRequestData userRequestData, HashMap<String,String> properties, javax.servlet.http.HttpServletRequest req)
          Create a user
 void deactivateUser(String userId)
           
 void deleteDomain()
           
 boolean deleteGroup(String idGroup)
           
 void deleteSQLDomain()
           
 void deleteUser(String idUser)
           
 List<Domain> getAllDomains()
           
 Group[] getAllRootGroups()
           
 long getDomainActions()
           
 List<List> getGroupManagers()
           
 int getIndexOfFirstItemToDisplay()
           
 List<String> getListSelectedUsers()
          Get list of selected users Ids
 int getMinLengthLogin()
           
 void getP12(String userId)
           
 String getPath(String baseURL, String toAppendAtEnd)
           
 Iterator<DomainProperty> getPropertiesToImport()
           
 Hashtable<String,String> getQueryToImport()
           
 String getSelectedGroupId()
           
 String getSelectedUserId()
           
 String[] getSelectedUsersIds()
           
 Group[] getSubGroups(boolean isParentGroup)
           
 List<UserDetail> getSubUsers(boolean isParentGroup)
           
protected  String getSureString(String s)
           
 String getSynchroReport()
           
 Domain getTargetDomain()
           
 Group getTargetGroup()
           
 UserDetail getTargetUserDetail()
           
 UserFull getTargetUserFull()
           
 UserFull getUser(String specificId)
           
 List<Group> getUserManageableGroups()
           
 List<UserDetail> getUsersToImport()
           
 void goIntoGroup(String groupId)
           
 void importCsvUsers(org.apache.commons.fileupload.FileItem filePart, boolean sendEmail, javax.servlet.http.HttpServletRequest req)
          Parse the CSV file.
 boolean importGroup(String groupName)
           
 void importUser(String userLogin)
           
 void importUsers(String[] specificIds)
           
 String initSelectionPeasForGroups(String compoURL)
           
 String initSelectionPeasForOneGroupOrUser(String compoURL)
           
 void initUserPanelForGroupManagers(String compoURL, List<String> userIds, List<String> groupIds)
           
 boolean isAccessGranted()
           
 boolean isCommunityManager()
           
 boolean isEnCours()
           
 boolean isGroupManagerDirectlyOnCurrentGroup()
           
 boolean isGroupManagerOnCurrentGroup()
           
 boolean isGroupManagerOnGroup(String groupId)
           
 boolean isGroupRoot(String groupId)
           
 boolean isOnlyGroupManager()
           
 boolean isUserAddingAllowedForGroupManager()
           
 boolean isUserInAtLeastOneGroupManageableByCurrentUser()
           
 String modifyDomain(String domainName, String domainDescription, String domainDriver, String domainProperties, String domainAuthentication, String silverpeasServerURL, String domainTimeStamp)
           
 boolean modifyGroup(String idGroup, String groupName, String groupDescription, String groupRule)
           
 String modifySQLDomain(String domainName, String domainDescription, String silverpeasServerURL, String usersInDomainQuotaMaxCount)
           
 void modifySynchronizedUser(UserRequestData userRequestData)
           
 void modifyUser(UserRequestData userRequestData, HashMap<String,String> properties, javax.servlet.http.HttpServletRequest req)
          Modify user account information
 void modifyUserFull(UserRequestData userRequestData, HashMap<String,String> properties)
           
 void refresh()
           
 void removeGroupFromPath(String groupId)
           
 void returnIntoGroup(String groupId)
           
 List<UserDetail> searchUsers(Hashtable<String,String> query)
           
 void setDefaultTargetDomain()
           
 void setIndexOfFirstItemToDisplay(String index)
           
 void setListSelectedUsers(List<String> list)
           
 void setRefreshDomain(boolean refreshDomain)
           
 void setTargetDomain(String domainId)
           
 void setTargetUser(String userId)
           
 void synchroDomain(int traceLevel)
           
 boolean synchroGroup(String idGroup)
           
protected  String synchronizeSilverpeasViaWebService()
           
 void synchroSQLDomain()
           
 void synchroUser(String idUser)
           
 void threadFinished()
           
 void unblockUser(String userId)
           
 boolean unsynchroGroup(String idGroup)
           
 void unsynchroUser(String idUser)
           
 void updateGroupProfile(List<String> userIds, List<String> groupIds)
           
 boolean updateGroupSubUsers(String idGroup, String[] userIds)
           
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobDomainPeasSessionController

public JobDomainPeasSessionController(MainSessionController mainSessionCtrl,
                                      ComponentContext componentContext)
Standard Session Controller Constructeur

Parameters:
mainSessionCtrl - The user's profile
componentContext - The component's profile
See Also:
Method Detail

getMinLengthLogin

public int getMinLengthLogin()

isUserAddingAllowedForGroupManager

public boolean isUserAddingAllowedForGroupManager()

isAccessGranted

public boolean isAccessGranted()

setRefreshDomain

public void setRefreshDomain(boolean refreshDomain)

setTargetUser

public void setTargetUser(String userId)

getTargetUserDetail

public UserDetail getTargetUserDetail()
                               throws JobDomainPeasException
Throws:
JobDomainPeasException

getTargetUserFull

public UserFull getTargetUserFull()
                           throws JobDomainPeasException
Throws:
JobDomainPeasException

createUser

public String createUser(UserRequestData userRequestData,
                         HashMap<String,String> properties,
                         javax.servlet.http.HttpServletRequest req)
                  throws JobDomainPeasException,
                         JobDomainPeasTrappedException
Create a user

Parameters:
userRequestData - the data of the user from the request.
properties - the user extra data.
req - the current HttpServletRequest
Returns:
Throws:
JobDomainPeasException
JobDomainPeasTrappedException

importCsvUsers

public void importCsvUsers(org.apache.commons.fileupload.FileItem filePart,
                           boolean sendEmail,
                           javax.servlet.http.HttpServletRequest req)
                    throws UtilTrappedException,
                           JobDomainPeasTrappedException,
                           JobDomainPeasException
Parse the CSV file.

Parameters:
filePart -
req - the current HttpServletRequest
Throws:
UtilTrappedException
JobDomainPeasTrappedException
JobDomainPeasException

modifyUser

public void modifyUser(UserRequestData userRequestData,
                       HashMap<String,String> properties,
                       javax.servlet.http.HttpServletRequest req)
                throws JobDomainPeasException
Modify user account information

Parameters:
userRequestData - the data of the user from the request.
properties - the user extra data.
req - the current HttpServletRequest
Throws:
JobDomainPeasException

modifySynchronizedUser

public void modifySynchronizedUser(UserRequestData userRequestData)
                            throws JobDomainPeasException
Throws:
JobDomainPeasException

modifyUserFull

public void modifyUserFull(UserRequestData userRequestData,
                           HashMap<String,String> properties)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

blockUser

public void blockUser(String userId)
               throws JobDomainPeasException
Throws:
JobDomainPeasException

unblockUser

public void unblockUser(String userId)
                 throws JobDomainPeasException
Throws:
JobDomainPeasException

deactivateUser

public void deactivateUser(String userId)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

activateUser

public void activateUser(String userId)
                  throws JobDomainPeasException
Throws:
JobDomainPeasException

deleteUser

public void deleteUser(String idUser)
                throws JobDomainPeasException
Throws:
JobDomainPeasException

getPropertiesToImport

public Iterator<DomainProperty> getPropertiesToImport()
                                               throws JobDomainPeasException
Throws:
JobDomainPeasException

importUser

public void importUser(String userLogin)
                throws JobDomainPeasException
Throws:
JobDomainPeasException

importUsers

public void importUsers(String[] specificIds)
                 throws JobDomainPeasException
Throws:
JobDomainPeasException

searchUsers

public List<UserDetail> searchUsers(Hashtable<String,String> query)
                             throws JobDomainPeasException
Throws:
JobDomainPeasException

getUsersToImport

public List<UserDetail> getUsersToImport()

getQueryToImport

public Hashtable<String,String> getQueryToImport()

getUser

public UserFull getUser(String specificId)

synchroUser

public void synchroUser(String idUser)
                 throws JobDomainPeasException
Throws:
JobDomainPeasException

unsynchroUser

public void unsynchroUser(String idUser)
                   throws JobDomainPeasException
Throws:
JobDomainPeasException

returnIntoGroup

public void returnIntoGroup(String groupId)
                     throws JobDomainPeasException
Throws:
JobDomainPeasException

removeGroupFromPath

public void removeGroupFromPath(String groupId)
                         throws JobDomainPeasException
Throws:
JobDomainPeasException

goIntoGroup

public void goIntoGroup(String groupId)
                 throws JobDomainPeasException
Parameters:
groupId -
Throws:
JobDomainPeasException

getTargetGroup

public Group getTargetGroup()
                     throws JobDomainPeasException
Throws:
JobDomainPeasException

getGroupManagers

public List<List> getGroupManagers()
                            throws JobDomainPeasException
Returns:
a List with 2 elements. First one, a List of UserDetail. Last one, a List of Group.
Throws:
JobDomainPeasException

initUserPanelForGroupManagers

public void initUserPanelForGroupManagers(String compoURL,
                                          List<String> userIds,
                                          List<String> groupIds)
                                   throws SelectionException,
                                          JobDomainPeasException
Throws:
SelectionException
JobDomainPeasException

updateGroupProfile

public void updateGroupProfile(List<String> userIds,
                               List<String> groupIds)
                        throws JobDomainPeasException
Throws:
JobDomainPeasException

isGroupRoot

public boolean isGroupRoot(String groupId)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

getSubGroups

public Group[] getSubGroups(boolean isParentGroup)
                     throws JobDomainPeasException
Throws:
JobDomainPeasException

getSubUsers

public List<UserDetail> getSubUsers(boolean isParentGroup)
                             throws JobDomainPeasException
Throws:
JobDomainPeasException

getPath

public String getPath(String baseURL,
                      String toAppendAtEnd)
               throws JobDomainPeasException
Throws:
JobDomainPeasException

createGroup

public boolean createGroup(String idParent,
                           String groupName,
                           String groupDescription,
                           String groupRule)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

modifyGroup

public boolean modifyGroup(String idGroup,
                           String groupName,
                           String groupDescription,
                           String groupRule)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

updateGroupSubUsers

public boolean updateGroupSubUsers(String idGroup,
                                   String[] userIds)
                            throws JobDomainPeasException
Throws:
JobDomainPeasException

deleteGroup

public boolean deleteGroup(String idGroup)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

synchroGroup

public boolean synchroGroup(String idGroup)
                     throws JobDomainPeasException
Throws:
JobDomainPeasException

unsynchroGroup

public boolean unsynchroGroup(String idGroup)
                       throws JobDomainPeasException
Throws:
JobDomainPeasException

importGroup

public boolean importGroup(String groupName)
                    throws JobDomainPeasException
Throws:
JobDomainPeasException

setDefaultTargetDomain

public void setDefaultTargetDomain()

setTargetDomain

public void setTargetDomain(String domainId)

getTargetDomain

public Domain getTargetDomain()

getDomainActions

public long getDomainActions()

getAllDomains

public List<Domain> getAllDomains()

isOnlyGroupManager

public boolean isOnlyGroupManager()

isCommunityManager

public boolean isCommunityManager()

isGroupManagerOnCurrentGroup

public boolean isGroupManagerOnCurrentGroup()
                                     throws JobDomainPeasException
Throws:
JobDomainPeasException

isGroupManagerOnGroup

public boolean isGroupManagerOnGroup(String groupId)
                              throws JobDomainPeasException
Throws:
JobDomainPeasException

isGroupManagerDirectlyOnCurrentGroup

public boolean isGroupManagerDirectlyOnCurrentGroup()
                                             throws JobDomainPeasException
Throws:
JobDomainPeasException

getAllRootGroups

public Group[] getAllRootGroups()

createDomain

public String createDomain(String domainName,
                           String domainDescription,
                           String domainDriver,
                           String domainProperties,
                           String domainAuthentication,
                           String silverpeasServerURL,
                           String domainTimeStamp)
                    throws JobDomainPeasException,
                           JobDomainPeasTrappedException
Throws:
JobDomainPeasException
JobDomainPeasTrappedException

createSQLDomain

public String createSQLDomain(String domainName,
                              String domainDescription,
                              String silverpeasServerURL,
                              String usersInDomainQuotaMaxCount)
                       throws JobDomainPeasException,
                              JobDomainPeasTrappedException
Throws:
JobDomainPeasException
JobDomainPeasTrappedException

modifyDomain

public String modifyDomain(String domainName,
                           String domainDescription,
                           String domainDriver,
                           String domainProperties,
                           String domainAuthentication,
                           String silverpeasServerURL,
                           String domainTimeStamp)
                    throws JobDomainPeasException,
                           JobDomainPeasTrappedException
Throws:
JobDomainPeasException
JobDomainPeasTrappedException

modifySQLDomain

public String modifySQLDomain(String domainName,
                              String domainDescription,
                              String silverpeasServerURL,
                              String usersInDomainQuotaMaxCount)
                       throws JobDomainPeasException,
                              JobDomainPeasTrappedException
Throws:
JobDomainPeasException
JobDomainPeasTrappedException

deleteDomain

public void deleteDomain()
                  throws JobDomainPeasException
Throws:
JobDomainPeasException

deleteSQLDomain

public void deleteSQLDomain()
                     throws JobDomainPeasException
Throws:
JobDomainPeasException

getSureString

protected String getSureString(String s)

refresh

public void refresh()

initSelectionPeasForGroups

public String initSelectionPeasForGroups(String compoURL)
                                  throws JobDomainPeasException
Throws:
JobDomainPeasException

getSelectedUsersIds

public String[] getSelectedUsersIds()

initSelectionPeasForOneGroupOrUser

public String initSelectionPeasForOneGroupOrUser(String compoURL)
                                          throws JobDomainPeasException
Throws:
JobDomainPeasException

getSelectedUserId

public String getSelectedUserId()

getSelectedGroupId

public String getSelectedGroupId()

synchroSQLDomain

public void synchroSQLDomain()

synchronizeSilverpeasViaWebService

protected String synchronizeSilverpeasViaWebService()

synchroDomain

public void synchroDomain(int traceLevel)

isEnCours

public boolean isEnCours()

getSynchroReport

public String getSynchroReport()

threadFinished

public void threadFinished()

getP12

public void getP12(String userId)
            throws JobDomainPeasException
Throws:
JobDomainPeasException

getListSelectedUsers

public List<String> getListSelectedUsers()
Get list of selected users Ids


clearListSelectedUsers

public void clearListSelectedUsers()

setListSelectedUsers

public void setListSelectedUsers(List<String> list)

setIndexOfFirstItemToDisplay

public void setIndexOfFirstItemToDisplay(String index)

getIndexOfFirstItemToDisplay

public int getIndexOfFirstItemToDisplay()

getUserManageableGroups

public List<Group> getUserManageableGroups()

checkUser

public UserDetail checkUser(UserDetail userToCheck)

isUserInAtLeastOneGroupManageableByCurrentUser

public boolean isUserInAtLeastOneGroupManageableByCurrentUser()
Returns:
true if community management is activated and target user belongs to one group manageable by current user


Copyright © 2016 Silverpeas. All Rights Reserved.