站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SearchGroup.Registry (Search API) - NetBeans API Javadoc (Current Development Version)

org.openidex.util/3 3.11

org.openidex.search
Class SearchGroup.Registry

java.lang.Object
  extended by org.openidex.search.SearchGroup.Registry
Enclosing class:
SearchGroup

public static final class SearchGroup.Registry
extends Object

Registry which registers search group factories (SearchGroup.Factory) for search object types.

Initially, factories for search object types DataObject and FileObject are already registered (DataObjectSearchGroup and FileObjectSearchGroup).

See Also:
SearchGroup.Factory, DataObjectSearchGroup, FileObjectSearchGroup

Method Summary
static SearchGroup createSearchGroup(Class searchObjectType)
          Creates a SearchGroup for the specified search object type.
static boolean hasFactory(Class searchObjectType)
          Tests whether there is a Factory registered for the specified search object class type.
static boolean registerSearchGroupFactory(Class searchObjectClass, SearchGroup.Factory factory)
          Registers a search group factory for a search object type (Class).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerSearchGroupFactory

public static boolean registerSearchGroupFactory(Class searchObjectClass,
                                                 SearchGroup.Factory factory)
Registers a search group factory for a search object type (Class). If a factory has already been registered for the specified search object type, the old registration is kept (the registration fails).

Parameters:
searchObjectClass - search object type the factory is to be registered for
factory - factory to be registered
Returns:
true if the registration was successful, false if the registration failed (i. e. if some factory has already been registered for the specified search object type)

createSearchGroup

public static SearchGroup createSearchGroup(Class searchObjectType)
Creates a SearchGroup for the specified search object type. The search group is created using the factory registered for the specified search object type.

Parameters:
searchObjectType - search object type to create a search group for
Returns:
search group created by the registered factory, or null if no factory has been registed for the specified search object type
See Also:
registerSearchGroupFactory

hasFactory

public static boolean hasFactory(Class searchObjectType)
Tests whether there is a Factory registered for the specified search object class type.

Parameters:
searchObjectType - search object type
Returns:
true if some factory has been registered for the specified search object type, false otherwise

org.openidex.util/3 3.11

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.