Package io.goobi.viewer.managedbeans
Class UserGroupBean
java.lang.Object
io.goobi.viewer.managedbeans.UserGroupBean
- All Implemented Interfaces:
Serializable
UserGroupBean class.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deletes currentUserGroup.Returns a list of all existing roles (minus superuser).Used for the 'add member' selectbox.Getter for the fieldcurrentMember
.Getter for the fieldcurrentOtherUserGroup
.Getter for the fieldcurrentOwnUserGroup
.int
Getter for the fieldcurrentOwnUserGroupId
.Getter for the fieldcurrentRole
.List<javax.faces.model.SelectItem>
Returns the names all users that are not already members of the currently selected user group.void
init()
init.boolean
isNewUserGroup.void
Revokes the current user's membership in currentOtherUserGroup.void
memberSelectedAction
(javax.faces.event.ValueChangeEvent event) memberSelectedAction.void
Removes currentMember from the member list of currentUserGroup.final void
Sets currentUserGroup to a new object.void
saveCurrentOwnUserGroupAction
(javax.faces.event.ActionEvent actionEvent) Creates or updates (if already exists) currentOwnUserGroup.void
Deprecated.void
setCurrentId
(Long id) Used for the 'add member' selectbox.void
setCurrentMember
(User currentMember) Setter for the fieldcurrentMember
.void
setCurrentOtherUserGroup
(UserGroup currentOtherUserGroup) Setter for the fieldcurrentOtherUserGroup
.void
Setter for the fieldcurrentOwnUserGroup
.void
setCurrentOwnUserGroup
(UserGroup currentOwnUserGroup) Setter for the fieldcurrentOwnUserGroup
.void
setCurrentOwnUserGroupId
(int currentOwnUserGroupId) Setter for the fieldcurrentOwnUserGroupId
.void
setCurrentRole
(Role currentRole) Setter for the fieldcurrentRole
.
-
Constructor Details
-
UserGroupBean
public UserGroupBean()Empty constructor.
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
saveCurrentOwnUserGroupAction
public void saveCurrentOwnUserGroupAction(javax.faces.event.ActionEvent actionEvent) throws DAOException Creates or updates (if already exists) currentOwnUserGroup.- Parameters:
actionEvent
- aActionEvent
object.- Throws:
DAOException
- if any.
-
deleteCurrentUserGroupAction
Deletes currentUserGroup. TODO Some sort of confirmation dialog- Throws:
DAOException
- if any.
-
leaveCurrentUserGroupAction
Revokes the current user's membership in currentOtherUserGroup. TODO Some sort of confirmation dialog- Throws:
DAOException
- if any.
-
resetCurrentUserGroupAction
public final void resetCurrentUserGroupAction()Sets currentUserGroup to a new object. -
saveMembershipAction
Deprecated.Add currentMember to the member list of currentOwnUserGroup.- Throws:
DAOException
- if any.
-
removeCurrentMemberAction
Removes currentMember from the member list of currentUserGroup.- Throws:
DAOException
- if any.
-
getRemainingUsers
Returns the names all users that are not already members of the currently selected user group. TODO Filter some user groups, if required (e.g. admins)- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
memberSelectedAction
public void memberSelectedAction(javax.faces.event.ValueChangeEvent event) memberSelectedAction.
- Parameters:
event
-ValueChangeEvent
-
getAllRoles
Returns a list of all existing roles (minus superuser).- Returns:
- a
List
object. - Throws:
DAOException
- if any.
-
getCurrentOtherUserGroup
Getter for the field
currentOtherUserGroup
.- Returns:
- the currentOtherUserGroup
-
setCurrentOtherUserGroup
Setter for the field
currentOtherUserGroup
.- Parameters:
currentOtherUserGroup
- the currentOtherUserGroup to set
-
getCurrentOwnUserGroupId
public int getCurrentOwnUserGroupId()Getter for the field
currentOwnUserGroupId
.- Returns:
- the currentOwnUserGroupId
-
setCurrentOwnUserGroupId
public void setCurrentOwnUserGroupId(int currentOwnUserGroupId) Setter for the field
currentOwnUserGroupId
.- Parameters:
currentOwnUserGroupId
- the currentOwnUserGroupId to set
-
getCurrentOwnUserGroup
Getter for the field
currentOwnUserGroup
.- Returns:
- the currentOwnUserGroup
-
setCurrentOwnUserGroup
Setter for the field
currentOwnUserGroup
.- Parameters:
currentOwnUserGroup
- the currentOwnUserGroup to set
-
setCurrentOwnUserGroup
Setter for the field
currentOwnUserGroup
.- Throws:
DAOException
- if any.
-
getCurrentMember
Getter for the field
currentMember
.- Returns:
- the currentMember
-
setCurrentMember
Setter for the field
currentMember
.- Parameters:
currentMember
- the currentMember to set
-
getCurrentRole
Getter for the field
currentRole
.- Returns:
- the currentRole
-
setCurrentRole
Setter for the field
currentRole
.- Parameters:
currentRole
- the currentRole to set
-
getCurrentId
Used for the 'add member' selectbox.- Returns:
- a
Long
object.
-
setCurrentId
Used for the 'add member' selectbox.- Parameters:
id
- aLong
object.- Throws:
DAOException
- if any.
-
isNewUserGroup
public boolean isNewUserGroup()isNewUserGroup.
- Returns:
- a boolean.
-