Interface FilterInterface

All Known Implementing Classes:
ApplicationFilter, AuthorFilter, ChannelFilter, ChannelPathFilter, ContentFilter, ContentSubscriberFilter, EventSubscriberFilter, Filter, GuidFilter, HttpServerFilter, IdFilter, KeywordFilter, LogicalServerFilter, MessageQueueFilter, PackageFilter, PathFilter, PersonFilter, PhysicalTableFilter, RemarksFilter, ServerFilter, StoredProcessFilter, StoredProcessReportFilter, SubscriberFilter

@SASScope("ALL") public interface FilterInterface
The FilterInterface describes a means for setting and getting information used to limit the results of a search against a repository. While it would be nice to make it completely repository-neutral, there are concepts and mechanisms that just don't translate.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final String
    This string will be returned from a Filter method that returns a search string as an indicator that one more more filter components were not supported for the repository type that was searched.
    static final int
    Most searches use a default set of flags that generally result in the most useful results set.
    static final int
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
    This is a list of the known repository protocols.
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addProtocol(String protocol)
    Add a protocol string to the list to be searched (e.g., "omi", "dav").
    void
    addSearchOption(String name, Object option)
    Add a search option.
    String
    Get the DAV search base.
    String
    Get the filter in the form of a DAV basicsearch XML request.
    int
    Get the scope of the search for DAV searches.
    String
    Get the filter in the form of a DAV SQL XML request.
    String
    Get the DAV specific type.
    String
    Get the explicit search string set by the client.
    Get the FilterComponent for this filter.
    String
    Gets a generic filter string.
    String
    Get an XPath string to use to filter a search against OMR.
    String
    Get the name of the object to look for.
    int
    Get the flags to pass to the OMR GetMetadata operation.
    String
    Get the OMR option string.
    String
    Get the ID of the repository to search.
    String
    Returns the OMR specific search string for this filter.
    String
    Get a template string used to format the data coming back from OMR.
    String
    Get the OMR specific type.
    List
    Get the List of protocols that were set to be searched.
    String
    Get the relational database table to search.
    Map
    Get the Map of search options for this Filter.
    String
    Get the type of object to search for.
    String
    Get the filter in the form of an XMLSelect statement.
    String
    Get an XPath string to use to filter a search against OMR.
    void
    removeProtocol(String protocol)
    Remove a protocol from the list.
    void
    removeSearchOption(String name)
    Remove the named search option.
    void
    setDAVBase(String base)
    Set the DAV search base.
    void
    setDAVScope(int scope)
    Set the DAV search scope.
    void
    setExplicitSearchString(String protocol, String searchString)
    If the client knows exactly the search string they want to use, they may set it here.
    void
    Add a component to this filter.
    void
    setName(String name)
    Set the name of the object to search for.
    void
    setOMRFlags(int flags)
    Set flags to pass to the OMR GetMetadata operation.
    void
    setOMROption(String option)
    Set the OMR option string.
    void
    setOMRRepository(String reposid)
    Set the ID of the repository to search.
    void
    setOMRTemplate(String template)
    Set the OMR template.
    void
    setProtocols(List protocols)
    Set the list of protocols to search.
    void
    setRdbmsTable(String table)
    For Relational searches, set the table name to search.
    void
    setType(String type)
    Set the type to search for.
  • Field Details

    • PROTOCOL_OMI

      static final String PROTOCOL_OMI
      This is a list of the known repository protocols. It is not necessarily exhaustive as new repository implementations may be added.
      See Also:
    • PROTOCOL_DAV

      static final String PROTOCOL_DAV
      See Also:
    • PROTOCOL_LDAP

      static final String PROTOCOL_LDAP
      See Also:
    • PROTOCOL_IPOD

      static final String PROTOCOL_IPOD
      See Also:
    • PROTOCOL_HIBERNATE

      static final String PROTOCOL_HIBERNATE
      See Also:
    • BASE_SCOPE

      static final int BASE_SCOPE
      See Also:
    • ONELEVEL_SCOPE

      static final int ONELEVEL_SCOPE
      See Also:
    • SUBTREE_SCOPE

      static final int SUBTREE_SCOPE
      See Also:
    • FILTERCOMPONENT_UNSUPPORTED

      static final String FILTERCOMPONENT_UNSUPPORTED
      This string will be returned from a Filter method that returns a search string as an indicator that one more more filter components were not supported for the repository type that was searched. For instance, the GT and LT operators are not supported for OMI repositories.
      See Also:
    • FLAG_OVERRIDE

      static final int FLAG_OVERRIDE
      Most searches use a default set of flags that generally result in the most useful results set. Calling a method like setOMRFlags will add to those flags, but if you want to completely override them and use only those flags you provide, OR this flag value with your flags and only yours will be used.
      See Also:
  • Method Details

    • setFilterComponent

      void setFilterComponent(FilterComponent component)
      Add a component to this filter.

      Parameters:
      component - The new component to add to this filter.
    • getFilterComponent

      FilterComponent getFilterComponent()
      Get the FilterComponent for this filter.
      Returns:
      The FilterComponent.
    • setType

      void setType(String type)
      Set the type to search for.

      Parameters:
      type - The object type to search for.
    • getOMRType

      String getOMRType()
      Get the OMR specific type. By default, this will be the type set by setType, but subclasses may override this so different type strings can be used for OMR and LDAP.

      Returns:
      The OMR type string.
    • getDAVType

      String getDAVType()
      Get the DAV specific type. By default, this will be the type set by setType, but subclasses may override this so different type strings can be used for OMR, LDAP and DAV.

      Returns:
      The LDAP type string.
    • getType

      String getType()
      Get the type of object to search for.

      Returns:
      The object type to search for.
    • setName

      void setName(String name)
      Set the name of the object to search for.

      Parameters:
      name - The object name.
    • getName

      String getName()
      Get the name of the object to look for.

      Returns:
      The object name.
    • getFilterString

      String getFilterString()
      Gets a generic filter string.

      Returns:
      a String describing the filter.
    • getOMRSearchString

      String getOMRSearchString()
      Returns the OMR specific search string for this filter. This string is identical to the the xml select statement, just minus the XMLSelect begin and end tags. This allows the search string to be plugged into either an xml select string or a template search.
      Returns:
      a search string to be used within an xml select statement or template search
    • getXMLSelectString

      String getXMLSelectString()
      Get the filter in the form of an XMLSelect statement.

      Returns:
      An XMLSelect string to pass to OMR.
    • getXPathString

      String getXPathString()
      Get an XPath string to use to filter a search against OMR.

      Returns:
      An XPath selection string.
    • getJCRXPathString

      String getJCRXPathString()
      Get an XPath string to use to filter a search against OMR.

      Returns:
      An XPath selection string.
    • getOMRTemplate

      String getOMRTemplate()
      Get a template string used to format the data coming back from OMR.

      Returns:
      A data template to pass to OMR.
    • setOMRTemplate

      void setOMRTemplate(String template)
      Set the OMR template.

      Parameters:
      template - The template to pass to OMR to format results.
    • getOMROption

      String getOMROption()
      Get the OMR option string.

      Returns:
      An option string to pass to OMR.
    • setOMROption

      void setOMROption(String option)
      Set the OMR option string.

      Parameters:
      option - The string to pass to OMR as options.
    • setOMRFlags

      void setOMRFlags(int flags)
      Set flags to pass to the OMR GetMetadata operation.

      Parameters:
      flags - Flag(s) to set on the GetMetadata.
    • getOMRFlags

      int getOMRFlags()
      Get the flags to pass to the OMR GetMetadata operation.

      Returns:
      The OMI flags.
    • getOMRRepository

      String getOMRRepository()
      Get the ID of the repository to search. If this isn't set, all the repositories for the server will be searched.

      Returns:
      The repository to search.
    • setOMRRepository

      void setOMRRepository(String reposid)
      Set the ID of the repository to search. If this doesn't get set, all the repositories that the server holds will be searched.

      Parameters:
      reposid - The ID of the repository to search.
    • setDAVBase

      void setDAVBase(String base)
      Set the DAV search base.

      Parameters:
      base - The search base for searches represented by this filter.
    • getDAVBase

      String getDAVBase()
      Get the DAV search base.

      Returns:
      The search base for searches represented by this filter.
    • getDAVScope

      int getDAVScope()
      Get the scope of the search for DAV searches.

      Returns:
      The search scope.
    • setDAVScope

      void setDAVScope(int scope)
      Set the DAV search scope.

      Parameters:
      scope - The new scope of the search.
    • getDAVBasicSearchString

      String getDAVBasicSearchString()
      Get the filter in the form of a DAV basicsearch XML request.

      Returns:
      An XML basicsearch request to pass to a DAV server.
    • getDAVSQLString

      String getDAVSQLString()
      Get the filter in the form of a DAV SQL XML request.

      Returns:
      A DAV SQL request to pass to a DAV server.
    • setRdbmsTable

      void setRdbmsTable(String table)
      For Relational searches, set the table name to search.
      Parameters:
      table - The relational table to search for objects.
    • getRdbmsTable

      String getRdbmsTable()
      Get the relational database table to search.
      Returns:
      The relational table String.
    • addProtocol

      void addProtocol(String protocol)
      Add a protocol string to the list to be searched (e.g., "omi", "dav"). Repositories whose protocol is not in this list will not perform the search. If the protocol list is empty, it will be ignored.
      Parameters:
      protocol - A protocol string to control the types of repositories to search.
    • removeProtocol

      void removeProtocol(String protocol)
      Remove a protocol from the list.
      Parameters:
      protocol - The protocol string to remove.
    • setProtocols

      void setProtocols(List protocols)
      Set the list of protocols to search. This list controls the types of repositories that will be searched. Repository instances whose protocol does not match any in the list will ignore the search request.
      Parameters:
      protocols - A List of protocol Strings (e.g., "omi", "dav").
    • getProtocols

      List getProtocols()
      Get the List of protocols that were set to be searched.
      Returns:
      A List of protocol Strings.
    • setExplicitSearchString

      void setExplicitSearchString(String protocol, String searchString)
      If the client knows exactly the search string they want to use, they may set it here. The FilterComponents will be ignored in favor of this string. Since search strings are specific to a given repository implementation, the protocol is required.
      Parameters:
      protocol - The protocol for which the search string is to be used.
      searchString - The search string to be used for the search.
    • getExplicitSearchString

      String getExplicitSearchString()
      Get the explicit search string set by the client. This overrides the filter components.
      Returns:
      The search String to use.
    • addSearchOption

      void addSearchOption(String name, Object option)
      Add a search option. Search options are generally protocol-specific, so details of what options are supported are described in the repository implementation documentation.
      Parameters:
      name - The name of the option to be added.
      option - The option value. This is usually a String, but may be other object types.
    • removeSearchOption

      void removeSearchOption(String name)
      Remove the named search option.
      Parameters:
      name - The name of the option to remove.
    • getSearchOptions

      Map getSearchOptions()
      Get the Map of search options for this Filter.
      Returns:
      The search options Map.