Interface IFilter

    • Method Detail

      • forConnection

        void forConnection​(de.uplanet.jdbc.JdbcConnection p_conn)
        Initialize the filter with a database connection.

        This may be used if the property needsSqlPostProcessing() depends on the database used.

        p_conn - The database connection used.
      • forUser

        void forUser​(String p_strUserId)
        Prepare the filter for a specific user.
        p_strUserId - The sender's or the recipient's GUID.
      • sqlQuery

        String sqlQuery()
        Provide a SQL search query.
        A SQL query, or null if the filter cannot be applied at database level.
      • needsSqlPostProcessing

        boolean needsSqlPostProcessing()
        Indicates if post-processing is needed after SQL retrieval.
        true if post-processing is needed after SQL retrieval, false otherwise.
      • pass

        boolean pass​(Message p_message)
        Decide if the given message passes the filter.
        p_message - The message to be filtered.
        true if the message passes the filter, false otherwise.
      • filter

        void filter​(List<Message> p_from,
                    List<Message> p_to)
        Do the filtering, operating on array lists.
        p_from - Collection of messages to be filtered.
        p_to - The filtered collection.