com.atlassian.jira.jql.operand.registry
Class PluginsAwareJqlFunctionHandlerRegistry

java.lang.Object
  extended by com.atlassian.jira.jql.operand.registry.PluginsAwareJqlFunctionHandlerRegistry
All Implemented Interfaces:
Startable, JqlFunctionHandlerRegistry

public class PluginsAwareJqlFunctionHandlerRegistry
extends Object
implements JqlFunctionHandlerRegistry, Startable

Represents a JqlFunctionHandlerRegistry that can detect when the plugins system enables / disables new jql function modules and updates the registry of function operand handlers accordingly. The current implementation is backed by a LazyResettableJqlFunctionHandlerRegistry.

Since:
v4.4

Constructor Summary
PluginsAwareJqlFunctionHandlerRegistry(com.atlassian.plugin.PluginAccessor pluginAccessor, com.atlassian.event.api.EventPublisher eventPublisher, ModuleDescriptors.Orderings moduleDescriptorOrderings)
           
 
Method Summary
 List<String> getAllFunctionNames()
          Fetches all function names ordered alphabetically.
 FunctionOperandHandler getOperandHandler(FunctionOperand operand)
          Fetches the associated OperandHandler for the provided FunctionOperand.
 void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
           
 void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
           
 void start()
          This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginsAwareJqlFunctionHandlerRegistry

public PluginsAwareJqlFunctionHandlerRegistry(com.atlassian.plugin.PluginAccessor pluginAccessor,
                                              com.atlassian.event.api.EventPublisher eventPublisher,
                                              ModuleDescriptors.Orderings moduleDescriptorOrderings)
Method Detail

onPluginModuleEnabled

public void onPluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)

onPluginModuleDisabled

public void onPluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)

getOperandHandler

public FunctionOperandHandler getOperandHandler(FunctionOperand operand)
Description copied from interface: JqlFunctionHandlerRegistry
Fetches the associated OperandHandler for the provided FunctionOperand. The returned handler is looked up by the name of the FunctionOperand (case insensitive).

Specified by:
getOperandHandler in interface JqlFunctionHandlerRegistry
Parameters:
operand - that defines the name for which we want to find the operand handler.
Returns:
the operand handler associated with this operand, null if there is none.

getAllFunctionNames

public List<String> getAllFunctionNames()
Description copied from interface: JqlFunctionHandlerRegistry
Fetches all function names ordered alphabetically.

Specified by:
getAllFunctionNames in interface JqlFunctionHandlerRegistry
Returns:
all function names ordered alphabetically, an empty collection if there are none.

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Specified by:
start in interface Startable
Throws:
Exception - Allows implementations to throw an Exception.


Copyright © 2002-2014 Atlassian. All Rights Reserved.