Class JobDomainPeasSessionController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.core.web.mvc.controller.AbstractAdminComponentSessionController
-
- org.silverpeas.web.jobdomain.control.JobDomainPeasSessionController
-
- All Implemented Interfaces:
Serializable
,ComponentSessionController
,SessionCloseable
public class JobDomainPeasSessionController extends AbstractAdminComponentSessionController
- 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 Modifier Constructor Description JobDomainPeasSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
Standard Session Controller Constructeurprotected
JobDomainPeasSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName, String settingsFileName)
Dedicated for tests
-
Method Summary
-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractAdminComponentSessionController
checkAccessGranted, checkAccessGranted, checkAdminAccessOnly, isAccessGranted, isUserAdmin, setAppModeMaintenance, setSpaceModeMaintenance, throwForbiddenError
-
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, setClipboardSelectedElement, setComponentRootName
-
-
-
-
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
-
JobDomainPeasSessionController
protected JobDomainPeasSessionController(MainSessionController controller, ComponentContext context, String localizedMessagesBundleName, String iconFileName, String settingsFileName)
Dedicated for tests
-
-
Method Detail
-
getMinLengthLogin
public int getMinLengthLogin()
-
isUserAddingAllowedForGroupManager
public boolean isUserAddingAllowedForGroupManager()
-
isAccessGranted
public boolean isAccessGranted()
Description copied from class:AbstractAdminComponentSessionController
Used mainly byAbstractAdminComponentSessionController.checkAccessGranted()
.Each implementation can precise or change this default implementation.
- Overrides:
isAccessGranted
in classAbstractAdminComponentSessionController
- Returns:
- true if access granted, false otherwise.
-
checkDomainAccessGranted
public void checkDomainAccessGranted(String domainId)
-
checkCurrentDomainAccessGranted
public void checkCurrentDomainAccessGranted(boolean readOnly)
-
checkUserAccessGranted
public void checkUserAccessGranted(String userId, boolean readOnly)
-
checkGroupAccessGranted
public void checkGroupAccessGranted(String groupId, boolean readOnly)
-
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 void 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- Throws:
JobDomainPeasException
- if an error occurs.JobDomainPeasTrappedException
- if a trapped error occurs.
-
importCsvUsers
public void importCsvUsers(org.apache.commons.fileupload.FileItem filePart, UserRequestData data, HttpRequest req) 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
- if an error occurs
-
modifySynchronizedUser
public void modifySynchronizedUser(UserRequestData userRequestData, Map<String,String> properties, HttpRequest req) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
blockUser
public void blockUser(String userId)
-
unblockUser
public void unblockUser(String userId)
-
deactivateUser
public void deactivateUser(String userId)
-
activateUser
public void activateUser(String userId)
-
hideUserSensitiveData
public void hideUserSensitiveData(String userId)
-
showUserSensitiveData
public void showUserSensitiveData(String userId)
-
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()
-
importUser
public void importUser(String userLogin) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
importUsers
public void importUsers(String[] specificIds)
-
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)
-
goIntoGroup
public void goIntoGroup(String groupId) throws JobDomainPeasException
- Throws:
JobDomainPeasException
-
getTargetGroup
public Group getTargetGroup()
-
getGroupManagers
public List<List<?>> getGroupManagers()
- Returns:
- a List with 2 elements. First one, a List of UserDetail. Last one, a List of Group.
-
initUserPanelForGroupManagers
public void initUserPanelForGroupManagers(List<String> userIds, List<String> groupIds)
-
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)
-
removeGroup
public boolean removeGroup(String groupId)
-
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()
-
isGroupManagerOnGroup
public boolean isGroupManagerOnGroup(String groupId)
-
isGroupManagerDirectlyOnCurrentGroup
public boolean isGroupManagerDirectlyOnCurrentGroup()
-
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()
-
setFilterOnUserState
public void setFilterOnUserState(String userState)
-
getSelectedUsersIds
public String[] getSelectedUsersIds()
-
initSelectionPeasForOneGroupOrUser
public String initSelectionPeasForOneGroupOrUser(String compoURL)
-
getSelectedUserId
public String getSelectedUserId()
-
getSelectedGroupId
public String getSelectedGroupId()
-
synchroSQLDomain
public void synchroSQLDomain()
-
synchronizeSilverpeasViaWebService
protected String synchronizeSilverpeasViaWebService()
-
synchroDomain
public void synchroDomain(org.silverpeas.kernel.logging.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 LocalizedComponentInstProfilesList 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
-
getUsersWithSensitiveData
public List<UserDetail> getUsersWithSensitiveData()
-
blankDeletedUsers
public void blankDeletedUsers(List<String> userIds) throws AdminException
- Throws:
AdminException
-
disableUsersSensitivityData
public void disableUsersSensitivityData(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()
-
-