|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.search.SearchManager
public class SearchManager
Manages search providers. SearchManager follows the singleton pattern.
Field Summary | |
---|---|
static MediaType[] |
DEFAULT_MEDIA_TYPES
|
static MediaType |
MEDIA_ANYTHING
Default media type that matches anything. |
static MediaType |
MEDIA_AUDIO
Default media type that matches audio files. |
static MediaType |
MEDIA_DOCUMENTS
Default media type that matches document files. |
static MediaType |
MEDIA_IMAGES
Default media type that matches image files. |
static MediaType |
MEDIA_SOFTWARE
Default media type that matches software files. |
static java.lang.String |
MEDIA_TYPE_FILE
|
static MediaType |
MEDIA_VIDEO
Default media type that matches video files. |
Method Summary | |
---|---|
void |
add(SearchProvider provider)
Adds provider to the list of available search providers. |
void |
addListListener(ListListener listener)
Listener is notified when a new search provider is
added. |
static SearchManager |
getInstance()
Returns the instance of SearchManager . |
static MediaType |
getMediaType(java.lang.String filename)
|
void |
handle(Search search)
Asks the search manager to handle search . |
void |
initializeMediaTypes()
Reads the extensions for the default media types from a property file. |
void |
remove(SearchProvider provider)
Removes provider from the list of available search
providers. |
void |
removeListListener(ListListener listener)
Listener is notified when a new search provider is
removed. |
Search |
searchAll(SearchFilter filter)
Returns a new SearchContainer that searches all networks. |
void |
setListener(SearchManagerListener listener)
Registers listener as the user search handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String MEDIA_TYPE_FILE
public static MediaType MEDIA_ANYTHING
public static MediaType MEDIA_AUDIO
public static MediaType MEDIA_DOCUMENTS
public static MediaType MEDIA_IMAGES
public static MediaType MEDIA_SOFTWARE
public static MediaType MEDIA_VIDEO
public static MediaType[] DEFAULT_MEDIA_TYPES
Method Detail |
---|
public static SearchManager getInstance()
SearchManager
.
public static MediaType getMediaType(java.lang.String filename)
public void add(SearchProvider provider)
provider
to the list of available search providers.
public void addListListener(ListListener listener)
Listener
is notified when a new search provider is
added.
public void handle(Search search)
search
. The search object
is passed to the listener that starts the search and displays the
results. If no listener is set nothing happens.
SearchManagerListener
public void initializeMediaTypes()
public void remove(SearchProvider provider)
provider
from the list of available search
providers.
public void removeListListener(ListListener listener)
Listener
is notified when a new search provider is
removed.
public Search searchAll(SearchFilter filter)
SearchContainer
that searches all networks.
public void setListener(SearchManagerListener listener)
listener
as the user search handler.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |