Atavism Version 2018.1AGIS API

atavism.server.engine
Class SearchManager

java.lang.Object
  extended by atavism.server.engine.SearchManager

public class SearchManager
extends java.lang.Object

Object search framework. You can search for objects matching your criteria.

The platform provides the following searchable collections:

Plugins can register searchable object collections using registerSearchable().


Method Summary
static Matcher getMatcher(SearchClause searchClause, java.lang.Class instanceClass)
          Get object matcher that can apply 'searchClause' to objects of 'instanceClass'.
static void registerMatcher(java.lang.Class searchClauseClass, java.lang.Class instanceClass, MatcherFactory matcherFactory)
          Register object match factory.
static void registerSearchable(ObjectType objectType, Searchable searchable)
          Register a new searchable object collection.
static java.util.Collection searchObjects(ObjectType objectType, SearchClause searchClause, SearchSelection selection)
          Search for matching objects and get selected information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

searchObjects

public static java.util.Collection searchObjects(ObjectType objectType,
                                                 SearchClause searchClause,
                                                 SearchSelection selection)
Search for matching objects and get selected information. Search occurs for a single ObjectType. Information indicated in the 'SearchSelection' is returned for objects matching the 'SearchClause'.

The search clause is a SearchClass sub-class designed specifically for an object type (or class of object types).

Parameters:
objectType - Search for this object type
searchClause - Object matching criteria
selection - Information selection; only the indicated information will be returned.
Returns:
Collection of matching objects.

registerSearchable

public static void registerSearchable(ObjectType objectType,
                                      Searchable searchable)
Register a new searchable object collection.

Parameters:
objectType - Collection object type.
searchable - Object search implementation.

registerMatcher

public static void registerMatcher(java.lang.Class searchClauseClass,
                                   java.lang.Class instanceClass,
                                   MatcherFactory matcherFactory)
Register object match factory. A MatcherFactory returns a Matcher object that works for the given search clause and object class.

Parameters:
searchClauseClass - A SearchClause sub-class.
instanceClass - Instance object class.
matcherFactory - Can return a Matcher object capable of running the SearchClause against the instance object.

getMatcher

public static Matcher getMatcher(SearchClause searchClause,
                                 java.lang.Class instanceClass)
Get object matcher that can apply 'searchClause' to objects of 'instanceClass'.

Parameters:
searchClause - The matching criteria.
instanceClass - Instance object class.


Copyright © 2018 Dragonsan Studios Sp. z o.o.