Class UserGroupBean

    • Constructor Detail

      • UserGroupBean

        public UserGroupBean()
        Empty constructor.
    • Method Detail

      • 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 - a ActionEvent object.
        Throws:
        DAOException - if any.
      • deleteCurrentUserGroupAction

        public void deleteCurrentUserGroupAction()
                                          throws DAOException
        Deletes currentUserGroup. TODO Some sort of confirmation dialog
        Throws:
        DAOException - if any.
      • leaveCurrentUserGroupAction

        public void leaveCurrentUserGroupAction()
                                         throws DAOException
        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
        public void saveMembershipAction()
                                  throws DAOException
        Deprecated.
        Add currentMember to the member list of currentOwnUserGroup.
        Throws:
        DAOException - if any.
      • removeCurrentMemberAction

        public void removeCurrentMemberAction()
                                       throws DAOException
        Removes currentMember from the member list of currentUserGroup.
        Throws:
        DAOException - if any.
      • getRemainingUsers

        public List<javax.faces.model.SelectItem> getRemainingUsers()
                                                             throws DAOException
        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
      • getCurrentOtherUserGroup

        public UserGroup getCurrentOtherUserGroup()

        Getter for the field currentOtherUserGroup.

        Returns:
        the currentOtherUserGroup
      • setCurrentOtherUserGroup

        public void setCurrentOtherUserGroup​(UserGroup currentOtherUserGroup)

        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

        public UserGroup getCurrentOwnUserGroup()

        Getter for the field currentOwnUserGroup.

        Returns:
        the currentOwnUserGroup
      • setCurrentOwnUserGroup

        public void setCurrentOwnUserGroup​(UserGroup currentOwnUserGroup)

        Setter for the field currentOwnUserGroup.

        Parameters:
        currentOwnUserGroup - the currentOwnUserGroup to set
      • setCurrentOwnUserGroup

        public void setCurrentOwnUserGroup()
                                    throws DAOException

        Setter for the field currentOwnUserGroup.

        Throws:
        DAOException - if any.
      • getCurrentMember

        public User getCurrentMember()

        Getter for the field currentMember.

        Returns:
        the currentMember
      • setCurrentMember

        public void setCurrentMember​(User currentMember)

        Setter for the field currentMember.

        Parameters:
        currentMember - the currentMember to set
      • getCurrentRole

        public Role getCurrentRole()

        Getter for the field currentRole.

        Returns:
        the currentRole
      • setCurrentRole

        public void setCurrentRole​(Role currentRole)

        Setter for the field currentRole.

        Parameters:
        currentRole - the currentRole to set
      • getCurrentId

        public Long getCurrentId()
        Used for the 'add member' selectbox.
        Returns:
        a Long object.
      • setCurrentId

        public void setCurrentId​(Long id)
                          throws DAOException
        Used for the 'add member' selectbox.
        Parameters:
        id - a Long object.
        Throws:
        DAOException - if any.
      • isNewUserGroup

        public boolean isNewUserGroup()

        isNewUserGroup.

        Returns:
        a boolean.