public abstract class VisionSearchProvider extends java.lang.Object implements SearchProvider
SearchProvider.SelectedObjectsHandler
Constructor and Description |
---|
VisionSearchProvider(VisionDesignerImpl context) |
Modifier and Type | Method and Description |
---|---|
protected abstract SearchObjectCursor |
createCursor(java.lang.Long id,
InstanceCache cache,
TaskProgressListener progress,
int progressCount,
java.util.Collection<VisionSearchCategories> catList) |
java.util.List<java.lang.Object> |
getCategories()
Returns a list of "categories", or sub-selectable units, supported by this search provider.
|
protected java.util.List<java.lang.Long> |
getIds(WhichWindows which)
Finds the resources IDs of all windows to be searched, based on current WhichWindows selection
|
java.lang.String |
getName()
Returns the name of the search provider, which will be used in the gateway and a UI to uniquely identify the
provider.
|
protected abstract java.lang.String |
getResourceType() |
protected abstract FolderNode |
getTopLevelFolderNode() |
boolean |
hasSelectableObjects()
Whether or not the set of objects searched by this provider is selectable- for examples, which groups or windows
are to be searched.
|
void |
notifyDesignableContainerClosed(java.lang.Long id)
If the user closes a window that was opened, make sure we re-serialize it fresh next time its needed.
|
void |
notifySearchClosed()
Called when the search dialog box is closed, so that the search provider can release any cached resources
|
java.util.Iterator<SearchObject> |
retrieveSearchableObjects(java.util.Collection<java.lang.Object> categories,
java.util.List<java.lang.Object> searchObjects,
TaskProgressListener progress)
Returns an iterator that provides all of the objects described by the parameters.
|
java.lang.String |
selectedObjectsToString(java.util.List<java.lang.Object> objects)
Formats the list of selected objects as a brief string.
|
void |
selectObjects(SearchProvider.SelectedObjectsHandler handler)
Instructs the SearchProvider to show a dialog in order to select the objects to search.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExecutor
public VisionSearchProvider(VisionDesignerImpl context)
protected abstract java.lang.String getResourceType()
public java.lang.String getName()
SearchProvider
getName
in interface SearchProvider
public java.util.List<java.lang.Object> getCategories()
SearchProvider
getCategories
in interface SearchProvider
public boolean hasSelectableObjects()
SearchProvider
hasSelectableObjects
in interface SearchProvider
public java.lang.String selectedObjectsToString(java.util.List<java.lang.Object> objects)
SearchProvider
selectedObjectsToString
in interface SearchProvider
public void selectObjects(SearchProvider.SelectedObjectsHandler handler)
SearchProvider
selectObjects
in interface SearchProvider
public java.util.Iterator<SearchObject> retrieveSearchableObjects(java.util.Collection<java.lang.Object> categories, java.util.List<java.lang.Object> searchObjects, TaskProgressListener progress)
SearchProvider
The provided ProgressListener can be used to provide progress information as the Iterator is processed. Some providers may not be able to calculate progress, in which case they should call setIndeterminate(true), but the provider implementors are encouraged to provide anything they can, even if it's very coarse.
retrieveSearchableObjects
in interface SearchProvider
categories
- indicates the user selection (if applicable) of which categories should be searched.searchObjects
- the user selected objects (if applicable) to be searched.progress
- a progress listener for this provider, which can be updated as the returned Iterator is
used. If not supported, the provider should call setIndeterminate(true).protected abstract SearchObjectCursor createCursor(java.lang.Long id, InstanceCache cache, TaskProgressListener progress, int progressCount, java.util.Collection<VisionSearchCategories> catList)
public void notifyDesignableContainerClosed(java.lang.Long id)
public void notifySearchClosed()
SearchProvider
notifySearchClosed
in interface SearchProvider
protected abstract FolderNode getTopLevelFolderNode()
protected java.util.List<java.lang.Long> getIds(WhichWindows which)