Class AbstractMemberQueryHandler<E>

    • Field Detail

      • groupSet

        protected java.util.Set<Group> groupSet
      • groupOffSet

        protected java.util.Set<Group> groupOffSet
      • sort

        protected java.lang.String sort
      • reverse

        protected boolean reverse
      • pageStart

        protected int pageStart
      • pageSize

        protected int pageSize
      • pagerAll

        protected boolean pagerAll
      • isMissingCriteria

        protected boolean isMissingCriteria
    • Constructor Detail

      • AbstractMemberQueryHandler

        public AbstractMemberQueryHandler()
    • Method Detail

      • parseQueryStringParam

        protected void parseQueryStringParam​(java.lang.String key,
                                             java.lang.String[] values)
        Description copied from class: AbstractQueryHandler
        Method to be implemented by subclass to decode parameter from queryString.
        Specified by:
        parseQueryStringParam in class AbstractQueryHandler<E>
        Parameters:
        key - the parameter name, never null nor empty.
        values - the parameter values, NEVER NULL NOR EMPTY. You can safely invoke paramValues[0]
      • printParams

        protected java.lang.String printParams​(AbstractQueryHandler.QueryHandlerPrinter printer)
        Print current QueryHandler params using specified QueryHandlerPrinter.
        Specified by:
        printParams in class AbstractQueryHandler<E>
        Parameters:
        printer - a QueryHandlerPrinter to use
        Returns:
        a string containing all parameters of this handler printed using specified QueryHandlerPrinter.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getText

        public java.lang.String getText()
        Retrieves the text being search in this query
        Returns:
        a string or null if no text is being searched
      • setText

        public void setText​(java.lang.String text)
        Set the text to search in Member
        Parameters:
        text - any string to look for in Members
      • getGid

        public java.lang.String getGid()
        Retrieve the group id used by this Query
        Returns:
        an id of Group or null if there is no filter on Member's Group
      • setGid

        public void setGid​(java.lang.String gid)
        Sets the group that members must belong to in order to be found.
        Parameters:
        gid - an id of Group or null to disable filter on Member's Group
      • getGids

        public java.lang.String[] getGids()
        Retrieve the groups id that members must belong to in order to be found.
        Returns:
        an array of id of Group or null if there is no filter on Member's Group
      • setGids

        public void setGids​(java.lang.String[] gids)
        Sets the group that members must belong to in order to be found.

        Member must belong to at least one of them.

        Parameters:
        gids - an array of id of Group or null to disable filter on Member's Group
      • setGroupSet

        public void setGroupSet​(java.util.Set<Group> groupSet)
        Sets the group set that members must belong to in order to be found.
        Parameters:
        groupSet - the group set.
      • getGroupSet

        public java.util.Set<Group> getGroupSet()
        Retrieves the groups that members must belong to in order to be found.

        Member must belong to at least one of them.

        Returns:
        a set of Group or null if there is no filter on Group
      • setUsage

        public void setUsage​(int usage)
        Set the usage that members must be in order to be found.
        Parameters:
        usage - the usage to match
      • getUsage

        public int getUsage()
        Retrieve the usage that members must be in order to be found.
        Returns:
        a usage or -1 if none was defined
      • setWrkspc

        public void setWrkspc​(java.lang.String wsId)
        Sets the Workspace that members must belong to in order to be found.
        Parameters:
        wsId - an id of Workspace or null to disable filter on Member's Workspace
      • getRefinedWorkspace

        public Workspace getRefinedWorkspace()
        Retrieves the Workspace that members must belong to in order to be found.
        Returns:
        a Workspace or null if there is no filter on workspace
      • getGidsOff

        public java.lang.String[] getGidsOff()
        Retrieve the groups id that members must NOT belong to in order to be found.
        Returns:
        an array of id of Group or null if there is no filter on Member's Group
      • setGidsOff

        public void setGidsOff​(java.lang.String... gids)
        Sets the group that members must NOT belong to in order to be found.

        Member must belong to at least one of them.

        Parameters:
        gids - an array of id of Group or null to disable filter on Member's Group
      • setGroupOffSet

        public void setGroupOffSet​(java.util.Set<Group> groupSet)
        Sets the group set that members must NOT belong to in order to be found.
        Parameters:
        groupSet - the group set.
      • getGroupOffSet

        public java.util.Set<Group> getGroupOffSet()
        Retrieves the groups that members must NOT belong to in order to be found.

        Member must NOT belong to at least one of them.

        Returns:
        a set of Group or null if there is no filter on Group
      • setExactGroup

        public void setExactGroup​(java.lang.Boolean exactGroup)
        Set how member search should behave regarding group search.
        Parameters:
        exactGroup - to search members exactly in the group specified, false or null to search members in groups specified and their subgroups.
        Since:
        10.0.7 / JCMS-9425
      • getExactGroup

        public java.lang.Boolean getExactGroup()
        Retrieve wether members are search exactly in the group specified or in group and subgroups (the default behavior).
        Returns:
        true if members are search exactly in the group specified, false or null if members are searched in groups specified and their subgroups.
        Since:
        10.0.7 / JCMS-9425
      • searchInSubGroup

        public boolean searchInSubGroup()
        Utility method for implementors of member search to quickly retrieve the behavior to apply for exact group search.
        Returns:
        true if members are searched in groups specified and their subgroups (default), false if members are search exactly in the group specified (only if exactGroupe=true was specified).
        Since:
        10.0.7 / JCMS-9425
      • setEnabled

        public void setEnabled​(java.lang.Boolean status)
        Sets the enabled/disabled state that members must be in order to be found.

        Default behavior is to NOT refine on the enabled/disabled state.

        Parameters:
        status - true to search for enabled members, false to search for disabled members
      • getEnabled

        public java.lang.Boolean getEnabled()
        Retrieves the enabled/disabled state that members must be in order to be found.
        Returns:
        true to search for enabled members, false to search for disabled members
      • getExternalAuth

        public java.lang.Boolean getExternalAuth()
        Retrieves the authentication filter applied in this query
        Returns:
        true to search for member using external authentication only, false to search for member using both local and external auth, null if no auth filter is being applied
        Since:
        jcms-10.0.6 / JCMS-9072
      • setExternalAuth

        public void setExternalAuth​(java.lang.Boolean externalAuth)
        Set type of authentication to search in Member
        Parameters:
        externalAuth - true to search for member using external authentication only, false to search for member using both local and external auth, null to omit this filter.
        Since:
        jcms-10.0.6 / JCMS-9072
      • setGuest

        public void setGuest​(java.lang.Boolean status)
        Parameters:
        status - weither to filter only on guests (true), or only on not guests (false)
        Since:
        jcms-10.0.6
      • getGuest

        public java.lang.Boolean getGuest()
        Returns:
        true to show only guest, false to show only not guests, null otherwise
        Since:
        jcms-10.0.6
      • isGuestFilterAvailable

        public boolean isGuestFilterAvailable()
        Checks that guest feature is enabled.
        Returns:
        true if guest filter can be used
        Since:
        jcms-10.0.6
      • setStart

        public void setStart​(int start)
        Set the start index to use for paging
        Parameters:
        start - the index of the first member to be displayed in current page
      • getStart

        public int getStart()
        Get the start index to use for paging
        Returns:
        the index of the first member to be displayed in current page
      • setPageSize

        public void setPageSize​(int pageSize)
        Set the page size
        Parameters:
        pageSize - the number of element to be displayed
      • getPageSize

        public int getPageSize()
        Get the page size
        Returns:
        the number of element to be displayed
      • setSort

        public void setSort​(java.lang.String sort)
        Set the sorting criteria

        Possible sorting option :

        • "id" : Member id (quite useless when working with both Member and DBMember as they do not compare)
        • "cdate" : Member creation date
        • "login" : Member's login
        • "firstname" : Member's firstname
        • "name" or "lastname" : Member's lastname
        • "usage" : Member's usage (account / contact)
        Parameters:
        sort - a field name that should be used for sorting
      • getSort

        public java.lang.String getSort()
        Retrieve current sorting criteria
        Returns:
        a lucene field name that should be used for sorting
      • setReverse

        public void setReverse​(boolean reverse)
        Set the ordering of the sort criteria
        Parameters:
        reverse - true if the reverse order should be used
      • isReverse

        public boolean isReverse()
        Check the ordering of the sort criteria
        Returns:
        true if the reverse order should be used
      • setPagerAll

        public void setPagerAll​(boolean pagerAll)
        Set the pagerAll option of this handler
        Parameters:
        pagerAll - true if all item should be displayed
      • isPagerAll

        public boolean isPagerAll()
        Get the paging option of this handler
        Returns:
        true if all item should be displayed
      • isMissingCriteria

        public boolean isMissingCriteria()
        Check if at least one search criteria has been specified for this handler
        Returns:
        false if no criteria was specified, true if at least one criteria was specified and search can be performed