Guvnor web application Drools 6.0.0-SNAPSHOT

org.drools.guvnor.client.moduleeditor.drools
Class SuggestionCompletionCache

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

@ApplicationScoped
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.


Constructor Summary
SuggestionCompletionCache()
           
 
Method Summary
 void applyFactFilter(String packageName, FactTypeFilter filter, com.google.gwt.user.client.Command done)
          Reloads a package and then applies the given filter.
 SuggestionCompletionEngine getEngineFromCache(String packageName)
           
static SuggestionCompletionCache getInstance()
           
 void loadPackage(String packageName, com.google.gwt.user.client.Command done)
          Gets the last version of SCE for a package and then applies any pre-existing filter to it.
 void onRefreshModuleDataModel(RefreshModuleDataModelEvent refreshModuleDataModelEvent)
           
 void refreshPackage(String packageName, com.google.gwt.user.client.Command done)
          Refresh SCE for a specific package removing any filter and retrieving the last version of it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SuggestionCompletionCache

public SuggestionCompletionCache()
Method Detail

getInstance

public static SuggestionCompletionCache getInstance()

onRefreshModuleDataModel

public void onRefreshModuleDataModel(@Observes
                                     RefreshModuleDataModelEvent refreshModuleDataModelEvent)

getEngineFromCache

public SuggestionCompletionEngine getEngineFromCache(String packageName)

refreshPackage

public void refreshPackage(String packageName,
                           com.google.gwt.user.client.Command done)
Refresh SCE for a specific package removing any filter and retrieving the last version of it.

Parameters:
packageName -
done -

loadPackage

public void loadPackage(String packageName,
                        com.google.gwt.user.client.Command done)
Gets the last version of SCE for a package and then applies any pre-existing filter to it.

Parameters:
packageName -
done -

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.

Guvnor web application Drools 6.0.0-SNAPSHOT

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