hudson.search
Class SearchFactory

java.lang.Object
  extended by hudson.search.SearchFactory
All Implemented Interfaces:
ExtensionPoint

public abstract class SearchFactory
extends Object
implements ExtensionPoint

Creates a Search instance for a SearchableModelObject.

This allows you to plug in different backends to the search, such as full-text search, or more intelligent user-sensitive search, etc. Puts @Extension annotation on your implementation to have it registered.

Right now, there's no user control over which SearchFactory takes priority, but we may do so later.

Since:
1.469
Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Constructor Summary
SearchFactory()
           
 
Method Summary
static ExtensionList<SearchFactory> all()
          Returns all the registered SearchFactory instances.
abstract  Search createFor(SearchableModelObject owner)
          Creates a Search object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchFactory

public SearchFactory()
Method Detail

createFor

public abstract Search createFor(SearchableModelObject owner)
Creates a Search object. This method needs to execute quickly (without actually executing any search), since it is created per incoming HTTP response.

Parameters:
owner - The SearchableModelObject object for which we are creating the search. The returned object will provide the search for this object.
Returns:
null if your factory isn't interested in creating a Search object. The next factory will get a chance to act on it.

all

public static ExtensionList<SearchFactory> all()
Returns all the registered SearchFactory instances.



Copyright © 2004-2013. All Rights Reserved.