com.evolution.player.core.media.search
Class SearchProvider

java.lang.Object
  extended by com.evolution.player.core.media.search.SearchProvider

public abstract class SearchProvider
extends java.lang.Object

A search provider can provide search result given a search pattern. A search provider can be contributed through the com.evolution.player.core.searchProvider extension point defined in the com.evolution.player.core plugin.

Clients must implement

Since:
0.5

Constructor Summary
SearchProvider()
           
 
Method Summary
abstract  boolean canHandle(ISearchPattern searchPattern)
          Can this search provider handle the given search pattern?
abstract  java.lang.String getName()
          A human readable name for this search provider.
abstract  SearchMatch[] search(ISearchPattern searchPattern, IProgressMonitor monitor)
          Search with the given search pattern.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchProvider

public SearchProvider()
Method Detail

getName

public abstract java.lang.String getName()
A human readable name for this search provider.

Returns:
the name of this search provider

canHandle

public abstract boolean canHandle(ISearchPattern searchPattern)
Can this search provider handle the given search pattern?

Parameters:
searchPattern - the search pattern to inspect
Returns:
true if this can handle the given pattern

search

public abstract SearchMatch[] search(ISearchPattern searchPattern,
                                     IProgressMonitor monitor)
Search with the given search pattern. This is only called if canHandle(ISearchPattern) returns true for the same pattern.

Parameters:
searchPattern - the pattern to search for
monitor - a monitor to report progress to and to check for cancelation
Returns:
the search result if any or null