org.drools.guvnor.client.packages
Class SuggestionCompletionCache

java.lang.Object
  extended by org.drools.guvnor.client.packages.SuggestionCompletionCache

public class SuggestionCompletionCache
extends Object

This utility cache will maintain a cache of suggestion completion engines, as they are somewhat heavy to load. If it needs to be loaded, then it will load, and then call the appropriate action, and keep it in the cache.


Method Summary
 void applyFactFilter(String packageName, FactTypeFilter filter, com.google.gwt.user.client.Command done)
          Reloads a package and then applies the given filter.
 void doAction(String packageName, com.google.gwt.user.client.Command command)
          This will do the action, after refreshing the cache if necessary.
 SuggestionCompletionEngine getEngineFromCache(String packageName)
           
static SuggestionCompletionCache getInstance()
           
 void loadPackage(String packageName, com.google.gwt.user.client.Command command)
           
 void refreshPackage(String packageName, com.google.gwt.user.client.Command done)
          Removed the package from the cache, causing it to be loaded the next time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static SuggestionCompletionCache getInstance()

doAction

public void doAction(String packageName,
                     com.google.gwt.user.client.Command command)
This will do the action, after refreshing the cache if necessary.


getEngineFromCache

public SuggestionCompletionEngine getEngineFromCache(String packageName)

loadPackage

public void loadPackage(String packageName,
                        com.google.gwt.user.client.Command command)

refreshPackage

public void refreshPackage(String packageName,
                           com.google.gwt.user.client.Command done)
Removed the package from the cache, causing it to be loaded the next time.


applyFactFilter

public void applyFactFilter(String packageName,
                            FactTypeFilter filter,
                            com.google.gwt.user.client.Command done)
Reloads a package and then applies the given filter.

Parameters:
packageName - the package name.
filter - the filter.
done - the command to be executed after the filter is applied.


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.