org.ocap.shared.dvr.navigation
Class RecordingListFilter

java.lang.Object
  extended by org.ocap.shared.dvr.navigation.RecordingListFilter
Direct Known Subclasses:
AppIDFilter, ContentFilter, CRIDFilter, GroupCRIDFilter, OrgIDFilter, RecordingDurationGreaterThanFilter, RecordingDurationLessThanFilter, RecordingSourceFilter, RecordingStateFilter, RecordingTimeFilter, SynopsisFilter, TitleFilter

public abstract class RecordingListFilter
extends java.lang.Object

Base class for all RecordingListFilters. Subclasses of RecordingListFilter may be used to create filters to specify restrictions.


Constructor Summary
protected RecordingListFilter()
          Constructs the filter.
 
Method Summary
abstract  boolean accept(RecordingRequest entry)
          Tests if a particular entry passes this filter.
 RecordingListFilter getCascadingFilter()
          Return the current cascaded filter.
 void setCascadingFilter(RecordingListFilter filter)
          Provides a means to cascade filters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordingListFilter

protected RecordingListFilter()
Constructs the filter.

Method Detail

accept

public abstract boolean accept(RecordingRequest entry)
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.

Parameters:
entry - A RecordingRequest to be evaluated against the filtering algorithm.
Returns:
true if entry satisfies the filtering algorithm; false otherwise.

setCascadingFilter

public void setCascadingFilter(RecordingListFilter filter)
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.

Parameters:
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.

getCascadingFilter

public RecordingListFilter getCascadingFilter()
Return the current cascaded filter.

Returns:
the current cascaded filter or null if no cascading filter is set.