001    /**
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.camel.component.atom;
018    
019    import org.apache.abdera.model.Document;
020    import org.apache.abdera.model.Entry;
021    import org.apache.abdera.model.Feed;
022    
023    /**
024     * Filter used by the {@link org.apache.camel.component.atom.AtomEntryPollingConsumer} to filter entries
025     * from the feed.
026     *
027     * @version $Revision: 656106 $
028     */
029    public interface EntryFilter {
030    
031        /**
032         * Tests to be used as filtering the feed for only entries of interest, such as only new entries, etc.
033         *
034         * @param endpoint  the endpoint
035         * @param feed      the Atom feed
036         * @param entry     the given entry to filter
037         * @return  <tt>true</tt> to include the entry, <ff>false</tt> to skip it
038         */
039        boolean isValidEntry(AtomEndpoint endpoint, Document<Feed> feed, Entry entry);
040    
041    }