Class JobDomainPeasSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.web.jobdomain.control.JobDomainPeasSessionController
-
- All Implemented Interfaces:
Serializable
,ComponentSessionController
,SessionCloseable
public class JobDomainPeasSessionController extends AbstractComponentSessionController
Class declaration- Author:
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADD_RIGHTS
static String
REPLACE_RIGHTS
-
Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
context
-
-
Constructor Summary
Constructors Constructor Description JobDomainPeasSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
Standard Session Controller Constructeur
-
Method Summary
-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
-
-
-
Field Detail
-
REPLACE_RIGHTS
public static final String REPLACE_RIGHTS
- See Also:
- Constant Field Values
-
ADD_RIGHTS
public static final String ADD_RIGHTS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JobDomainPeasSessionController
public JobDomainPeasSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
Standard Session Controller Constructeur- Parameters:
mainSessionCtrl
- The user's profilecomponentContext
- The component's profile
-
-
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, Map<String,String> properties, HttpRequest 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, UserRequestData data, HttpRequest req) throws JobDomainPeasTrappedException, PublicationTemplateException
Parse the CSV file.- Parameters:
filePart
-req
- the current HttpServletRequest- Throws:
JobDomainPeasTrappedException
PublicationTemplateException
-
getFieldLabelsOfCSVToImport
public Map<String,String> getFieldLabelsOfCSVToImport() throws AdminException, PublicationTemplateException, FormException
-
modifyUser
public void modifyUser(UserRequestData userRequestData, Map<String,String> properties, HttpRequest 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, Map<String,String> properties, HttpRequest req) 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
-
restoreUser
public void restoreUser(String idUser) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
removeUser
public void removeUser(String idUser) 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(Map<String,String> query)
-
getUsersToImport
public List<UserDetail> getUsersToImport()
-
synchroUser
public void synchroUser(String userId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
unsynchroUser
public void unsynchroUser(String idUser) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
returnIntoGroup
public void returnIntoGroup(String groupId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
goIntoGroup
public void goIntoGroup(String groupId) throws JobDomainPeasException
- Parameters:
groupId
-- Throws:
JobDomainPeasException
-
getTargetGroup
public Group getTargetGroup()
-
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(List<String> userIds, List<String> groupIds) throws SelectionException
- Throws:
SelectionException
-
updateGroupProfile
public void updateGroupProfile(List<String> userIds, List<String> groupIds) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
isGroupRoot
public boolean isGroupRoot(String groupId)
-
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
-
getRemovedGroups
public List<GroupDetail> getRemovedGroups() throws AdminException
- Throws:
AdminException
-
restoreGroup
public boolean restoreGroup(String groupId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
removeGroup
public boolean removeGroup(String groupId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
deleteGroup
public boolean deleteGroup(String groupId)
-
synchroGroup
public Optional<Group> synchroGroup(String groupId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
unsynchroGroup
public boolean unsynchroGroup(String idGroup) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
importGroup
public boolean importGroup(String groupName)
-
setDefaultTargetDomain
public void setDefaultTargetDomain()
-
setTargetDomain
public void setTargetDomain(String domainId)
-
getTargetDomain
public Domain getTargetDomain()
-
getDomainActions
public long getDomainActions()
-
isOnlyGroupManager
public boolean isOnlyGroupManager()
-
isCommunityManager
public boolean isCommunityManager()
-
isGroupManagerOnCurrentGroup
public boolean isGroupManagerOnCurrentGroup() throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
isGroupManagerOnGroup
public boolean isGroupManagerOnGroup(String groupId)
-
isGroupManagerDirectlyOnCurrentGroup
public boolean isGroupManagerDirectlyOnCurrentGroup() throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
getAllRootGroups
public Group[] getAllRootGroups()
-
createDomain
public String createDomain(Domain theNewDomain, DomainType domainType) throws JobDomainPeasException, JobDomainPeasTrappedException
-
createSQLDomain
public String createSQLDomain(String domainName, String domainDescription, String silverpeasServerURL, String usersInDomainQuotaMaxCount) throws JobDomainPeasException, JobDomainPeasTrappedException
-
modifyDomain
public String modifyDomain(Domain domain, String usersInDomainQuotaMaxCount) throws JobDomainPeasException, JobDomainPeasTrappedException
-
modifySQLDomain
public String modifySQLDomain(String domainName, String domainDescription, String silverpeasServerURL, String usersInDomainQuotaMaxCount) throws JobDomainPeasException, JobDomainPeasTrappedException
-
deleteDomain
public void deleteDomain(DomainType domainType) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
deleteSQLDomain
public void deleteSQLDomain() throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
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(Level level)
-
isEnCours
public boolean isEnCours()
-
getSynchroReport
public String getSynchroReport()
-
threadFinished
public void threadFinished()
-
getP12
public void getP12(String userId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
clearListSelectedUsers
public void clearListSelectedUsers()
-
setIndexOfFirstItemToDisplay
public void setIndexOfFirstItemToDisplay(String index)
-
getIndexOfFirstItemToDisplay
public int getIndexOfFirstItemToDisplay()
-
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
-
getDirectoryExtraForm
public PublicationTemplate getDirectoryExtraForm()
-
deleteUserAvatar
public void deleteUserAvatar(String userId)
-
getManageablesSpaces
public List<SpaceInstLight> getManageablesSpaces()
-
getCurrentProfiles
public ComponentProfilesList getCurrentProfiles()
- Returns:
- list of (array[space name, component id, component label, component name, profile name])
-
isRightCopyReplaceEnabled
public boolean isRightCopyReplaceEnabled()
-
initSelectionRightsUserOrGroup
public String initSelectionRightsUserOrGroup()
-
assignRights
public void assignRights(String choiceAssignRights, String sourceRightsId, String sourceRightsType, boolean nodeAssignRights)
-
getIndex
public ListIndex getIndex()
-
getPrevious
public UserDetail getPrevious()
-
getNext
public UserDetail getNext()
-
getRemovedUsers
public List<UserDetail> getRemovedUsers() throws AdminException
- Throws:
AdminException
-
getDeletedUsers
public List<UserDetail> getDeletedUsers() throws AdminException
- Throws:
AdminException
-
blankDeletedUsers
public void blankDeletedUsers(List<String> userIds) throws AdminException
- Throws:
AdminException
-
getUserFilterManager
public Optional<DomainDriver.UserFilterManager> getUserFilterManager() throws AdminException
- Throws:
AdminException
-
verifyUserFilterRule
public User[] verifyUserFilterRule(String rule) throws AdminException
- Throws:
AdminException
-
saveUserFilterRule
public void saveUserFilterRule(String rule) throws AdminException
- Throws:
AdminException
-
isOnlySpaceManager
public boolean isOnlySpaceManager()
-
-