All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.shared.dvr.navigation.RecordingListFilter Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package org.ocap.shared.dvr.navigation;

import org.ocap.shared.dvr.RecordingRequest;

/**
 * Base class for all RecordingListFilters. Subclasses of RecordingListFilter
 * may be used to create filters to specify restrictions.
 */
public abstract class RecordingListFilter
{

    /**
     * Constructs the filter.
     */
    protected RecordingListFilter()
    {
    }

    /**
     * Tests if a particular entry passes this filter. Subtypes of
     * RecordingListFilter override this method to provide the
     * logic for a filtering operation on individual
     * RecordingRequest objects.
     *
     * @param entry A RecordingRequest to be evaluated
     * against the filtering algorithm.
     * @return true if entry satisfies the
     * filtering algorithm; false otherwise.
     */
    public abstract boolean accept(RecordingRequest entry);

    /**
     * Provides a means to cascade filters. The accept method of this
     * filter is called only for entries matching the specified filter.
     * Multiple calls to this method will replace the previously set filter.
     *
     * @param filter the filter that will be applied before selecting the
     * entries for which the accept() method is called. If the current
     * filter is in the cascade chain of the filter passed in as the
     * argument, this method does nothing. Passing null shall remove the 
     * cascading relationship between the two filters.
     */
    public void setCascadingFilter(RecordingListFilter filter)
    {
    }
    /**
     * Return the current cascaded filter.
     * @return the current cascaded filter or null if no cascading
     * filter is set.
     */
    public RecordingListFilter getCascadingFilter(){return null;}
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy