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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes 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.intGetter for the fieldcurrentOwnUserGroupId.Getter for the fieldcurrentRole.List<jakarta.faces.model.SelectItem> Returns the names all users that are not already members of the currently selected user group.voidinit()init.booleanisNewUserGroup.voidRevokes the current user's membership in currentOtherUserGroup.voidmemberSelectedAction(jakarta.faces.event.ValueChangeEvent event) memberSelectedAction.voidRemoves currentMember from the member list of currentUserGroup.final voidSets currentUserGroup to a new object.voidsaveCurrentOwnUserGroupAction(jakarta.faces.event.ActionEvent actionEvent) Creates or updates (if already exists) currentOwnUserGroup.voidDeprecated.voidsetCurrentId(Long id) Used for the 'add member' selectbox.voidsetCurrentMember(User currentMember) Setter for the fieldcurrentMember.voidsetCurrentOtherUserGroup(UserGroup currentOtherUserGroup) Setter for the fieldcurrentOtherUserGroup.voidSetter for the fieldcurrentOwnUserGroup.voidsetCurrentOwnUserGroup(UserGroup currentOwnUserGroup) Setter for the fieldcurrentOwnUserGroup.voidsetCurrentOwnUserGroupId(int currentOwnUserGroupId) Setter for the fieldcurrentOwnUserGroupId.voidsetCurrentRole(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(jakarta.faces.event.ActionEvent actionEvent) throws DAOException Creates or updates (if already exists) currentOwnUserGroup.- Parameters:
actionEvent- aActionEventobject.- 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
Listobject. - Throws:
DAOException- if any.
-
memberSelectedAction
public void memberSelectedAction(jakarta.faces.event.ValueChangeEvent event) memberSelectedAction.
- Parameters:
event-ValueChangeEvent
-
getAllRoles
Returns a list of all existing roles (minus superuser).- Returns:
- a
Listobject. - 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
Longobject.
-
setCurrentId
Used for the 'add member' selectbox.- Parameters:
id- aLongobject.- Throws:
DAOException- if any.
-
isNewUserGroup
public boolean isNewUserGroup()isNewUserGroup.
- Returns:
- a boolean.
-