Qwylt

java.lang.module
Class SearchPolicy

java.lang.Object
  extended by java.lang.module.SearchPolicy
Direct Known Subclasses:
SearchSequence

public abstract class SearchPolicy
extends java.lang.Object

This class represents a policy for searching across a set of ModuleRepository instances.

Since:
Dec 13, 2008
Author:
Bryan Atsatt

Constructor Summary
SearchPolicy()
           
 
Method Summary
abstract  ModuleArchive find(ModuleQuery query)
          Find the first ModuleArchive that matches the specified query.
abstract  java.util.List<ModuleArchive> findAll(ModuleQuery query)
          Find all ModuleArchive that match the specified query.
protected  java.util.List<? extends ModuleArchive> findAllLocal(ModuleQuery query)
          Find all ModuleArchives within the local Repository that match the specified query.
protected  ModuleArchive findLocal(ModuleQuery query)
          Find the first ModuleArchive within the local Repository that matches the specified query.
 ModuleRepository getLocal()
          Get the ModuleRepository that delegates to this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchPolicy

public SearchPolicy()
Method Detail

getLocal

public ModuleRepository getLocal()
Get the ModuleRepository that delegates to this instance.

Returns:
The loader.

find

public abstract ModuleArchive find(ModuleQuery query)
Find the first ModuleArchive that matches the specified query.

Parameters:
query - The query.
Returns:
The matching ModuleArchive or null if none.

findAll

public abstract java.util.List<ModuleArchive> findAll(ModuleQuery query)
Find all ModuleArchive that match the specified query.

Parameters:
query - The query.
Returns:
The list of matching ModuleArchives; empty if no match.

findLocal

protected ModuleArchive findLocal(ModuleQuery query)
Find the first ModuleArchive within the local Repository that matches the specified query.

Parameters:
query - The query.
Returns:
The ModuleArchive or null if no match.

findAllLocal

protected java.util.List<? extends ModuleArchive> findAllLocal(ModuleQuery query)
Find all ModuleArchives within the local Repository that match the specified query.

Parameters:
query - The query.
Returns:
The list of ModuleArchives, empty if no match.

Qwylt

Send comments or questions to Bryan Atsatt