Interface UserEntityBean

    • Field Detail

      • VIEWMODE_BROWSE

        static final int VIEWMODE_BROWSE
        View mode of browsing. In this mode, bean only need to populate the user's name, ID, and some basic information. It is not neccessary for the bean to populate the information about the privileges, security filters, authentication, etc. In this mode, the bean will assume no change made to the bean and only save limited information in the state, which is enough for it to re-populate the information from backend.
        See Also:
        Constant Field Values
      • VIEWMODE_EDIT

        static final int VIEWMODE_EDIT
        View mode of editing. In this mode, bean will populate all information relate to this user for editing. During the saving state, it will check whether the bean has been modified to decide how to save the state. Any change to the bean will be saved and restored later.
        See Also:
        Constant Field Values
    • Method Detail

      • getParentGroups

        UserEntitiesBean getParentGroups()
                                  throws WebBeanException
        Returns the collection of parent groups of this user. If this user has not parent, this collection will be empty.
        Returns:
        UserEntitiesBean The collection of parent groups.
        Throws:
        WebBeanException - Thrown when error occurs.
      • isGroup

        boolean isGroup()
        Returns whether this user is a group user.
        Returns:
        boolean true if the user is a group user. Otherwise, it is a single user.
      • getViewMode

        int getViewMode()
        Returns the view mode, a value of VIEWMODE_BROWSE or VIEWMODE_EDIT. view mode will affect the way the bean to populat and to save the state.
        Returns:
        int The view mode.
      • refresh

        void refresh()
              throws WebBeanException
        Refresh this user information from backend. Group user will keep the expanded structure.
        Specified by:
        refresh in interface EditableBean
        Throws:
        WebBeanException - Thrown when error happens during refresh.
      • getPrivilegeCategories

        WebPrivilegeCategories getPrivilegeCategories()
                                               throws WebBeanException
        Returns a set of categorized privileges for the current user. Each category will contain all privileges defined for that category, regardless of whether the user has the privilege or not.
        Returns:
        A WebPrivilegeCategories collection
        Throws:
        WebBeanException - Thrown if any error occurs when retrieving the privileges