Class AbstractUserVisibilityApplier

    • Constructor Detail

      • AbstractUserVisibilityApplier

        public AbstractUserVisibilityApplier()
    • Method Detail

      • apply

        public final void apply​(boolean onlySelf,
                                GroupList groupList,
                                boolean includeGlobals)
        Apply the visibility rules for data of other users or self. It is preferable to use the available shortcut methods instead of this directly: onlySelf(), others()
        Parameters:
        onlySelf - Only for members: true means the logged member can view only its own data. E.g when searching for records the user can not view records of other users but for ads he can.
        groupList - the list of groups to restrict the results.
      • onlySelf

        public final void onlySelf()
        Apply the rules according to the GroupList.ACCESSIBLE list of groups and, in case of member, for only its own data (e.g used when searching user records).
      • onlySelf

        public final void onlySelf​(GroupList groupList)
        Apply the rules according to the given list of groups and, in case of member, for only its own data.
      • others

        public final void others()
        Apply the rules according to the GroupList.ACCESSIBLE list of groups and, in case of member, allowing view data of other users (used when searching ads).
      • others

        public final void others​(boolean includeGlobals)
        Apply the rules according to the GroupList.ACCESSIBLE list of groups and, in case of member, allowing view data of other users (used when searching ads).
      • others

        public final void others​(GroupList groupList)
        Apply the rules according to the given list of groups and, in case of member, allowing view data of other users.
      • others

        public final void others​(GroupList groupList,
                                 boolean includeGlobals)
        Apply the rules according to the given list of groups and, in case of member, allowing view data of other users.
      • applyBrokerOrSelf

        protected abstract void applyBrokerOrSelf​(User loggedUser)
      • applyGroups

        protected abstract void applyGroups​(Set<Group> groups)
      • applyGroupsOrBrokerOrSelf

        protected abstract void applyGroupsOrBrokerOrSelf​(Set<Group> groups,
                                                          User loggedUser)
      • applyGroupsOrSelf

        protected abstract void applyGroupsOrSelf​(Set<Group> groups,
                                                  User loggedUser)
      • applySelf

        protected abstract void applySelf​(User loggedUser)
      • bogusCondition

        protected abstract void bogusCondition()
        Adds a bogus condition to return nothing