Class IdSearchControl


  • @SupportedAll
    public final class IdSearchControl
    extends Object
    This is a helper class which is used in the AMIdentityRepository search method. It is used to to modify search controls for a given search operation. The specific controls that can be modified are: maximum time limit and size limit for the search, attributes that should be returned from the search, simple modifications to be made to the search filter used by each plugin by adding attribute-values which can be either OR'ed or AND'ed to the basic search.
    • Constructor Detail

      • IdSearchControl

        public IdSearchControl()
        Creates the IdSearchControl object
    • Method Detail

      • setReturnAttributes

        public void setReturnAttributes​(Set attributeNames)
        Set the return attribute names, if attributes of the entries need to be obtained as part of the search. NOTE: If the return attribute values are specified as part of AMSearchControl, there could be a significant performance overhead compared to when none are specified. When the return attributes are set, the return attributes can be obtained as a map with identity name as map-key and set of attribute values as map-value from AMSearchResults object.
        Parameters:
        attributeNames - Set of attribute names whose values need to be obtained as part of the search.
      • getReturnAttributes

        public Set getReturnAttributes()
        Returns the list of attributes requested to be read when the search is performed.
        Returns:
        Set of attributes requested to be read.
      • setAllReturnAttributes

        public void setAllReturnAttributes​(boolean getAllAttributes)
        Sets the specified boolean value to the variable. Boolean value is set to true, if all attributes of the entries need to be obtained as part of the search. When the option for getting all attributes is set to true, the search results will return a Map, where the Key is the DN of the search results, and value is another Map of attribute names for keys and Sets for values of those attributes.
        Parameters:
        getAllAttributes - Boolean value set to true as part of the IdSearchControl to obtain all attributes as part of the search.
      • isGetAllReturnAttributesEnabled

        public boolean isGetAllReturnAttributesEnabled()
        Returns true if the option for getting all attributes has been enabled.
        Returns:
        true if the option for getting all attributes has been enabled.
      • setTimeOut

        public void setTimeOut​(int timeOut)
        Sets the maximum number of milliseconds to wait for any operation for the search.
        Parameters:
        timeOut - Max number of milliseconds
      • getTimeOut

        public int getTimeOut()
        Returns current time out setting.
        Returns:
        current time out setting.
      • setMaxResults

        public void setMaxResults​(int maxNumber)
        Sets the maximum number of search results to return; 0 means there is no limit.
        Parameters:
        maxNumber - Max number of results
      • getMaxResults

        public int getMaxResults()
        Returns the maximum number of search results. return 0 means there is no limit.
        Returns:
        the maximum number of search results.
      • setSearchModifiers

        public void setSearchModifiers​(IdSearchOpModifier mod,
                                       Map avMap)
        Set the options for modifying the basic search filter in each plugin. By default, there are no modifications.
        Parameters:
        mod - One of the supported IdSearchOpModifiers
        avMap - Map of attribute-value pairs to be used to modify the search operation.
      • getSearchModifier

        public IdSearchOpModifier getSearchModifier()
        Returns the IdSearchOpModifier defined for this SearchControl
        Returns:
        One of the supported IdSearchOpModifier
      • getSearchModifierMap

        public Map getSearchModifierMap()
        Returns the map set to be used to modify the search filter in each plugin.
        Returns:
        Map of attribute values pairs, if it is set. Null otherwise.
      • setRecursive

        public void setRecursive​(boolean rec)
        Deprecated.
        This method is deprecated. The setting for recursive search should be configured via the data store.
        Sets the recursive flag to be true or false. It is false by default so plugin searches are not recursive.
        Parameters:
        rec - true if search is recursive; else false
      • isRecursive

        public boolean isRecursive()
        Deprecated.
        This method is deprecated. The setting for recursive search should be configured via the data store.
        Returns true if recursive is enabled, false otherwise
        Returns:
        true if recursive search is on; else false.
      • toString

        public String toString()
        Return String representation of the IdeSearchControl object. It returns the search controls
        Overrides:
        toString in class Object
        Returns:
        String representation of the IdSearchControl object.