Class AbstractJqlFunction

java.lang.Object
com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
All Implemented Interfaces:
JqlFunction
Direct Known Subclasses:
AbstractDateFunction, AbstractIssueTypeFunction, AbstractUserBasedFunction, AbstractUserCapabilityFunction, AbstractVersionsFunction, CascadeOptionFunction, CurrentLoginFunction, CurrentUserFunction, EchoFunction, EchoJqlFunction, IssueHistoryFunction, LastLoginFunction, LinkedIssuesFunction, MembersOfFunction, RemoteLinksByGlobalIdFunction, UpdatedByFunction, VotedIssuesFunction, WatchedIssuesFunction

@PublicSpi public abstract class AbstractJqlFunction extends Object implements JqlFunction
A useful base implementation of the JqlFunction interface, that provides sensible default behaviour for the init(JqlFunctionModuleDescriptor), getFunctionName() and isList() methods. You should not need to override these methods in your implementation.
Since:
4.0
See Also:
  • Constructor Details

    • AbstractJqlFunction

      public AbstractJqlFunction()
  • Method Details

    • init

      public void init(JqlFunctionModuleDescriptor moduleDescriptor)
      Description copied from interface: JqlFunction
      Initialises this pluggable function with it's module descriptor.
      Specified by:
      init in interface JqlFunction
      Parameters:
      moduleDescriptor - the module descriptor; will not be null.
    • getModuleDescriptor

      public JqlFunctionModuleDescriptor getModuleDescriptor()
    • validateNumberOfArgs

      protected MessageSet validateNumberOfArgs(FunctionOperand operand, int expected)
    • getFunctionName

      public String getFunctionName()
      Description copied from interface: JqlFunction
      The name of the function. Multiple calls to this method must return the same result. This means that the function name cannot be internationalised with respect to the searcher.
      Specified by:
      getFunctionName in interface JqlFunction
      Returns:
      the name of the function. Cannot be null.
    • isList

      public boolean isList()
      Description copied from interface: JqlFunction
      This method should return true if the function is meant to be used with the IN or NOT IN operators, that is, if the function should be viewed as returning a list. The method should return false when it is to be used with the other relational operators (e.g. =, !=, <, >, ...) that only work with single values.

      As a general rule, if a function is going to return more than one value then it should return true here, otherwise it should return false. This does not necessarily need to be the case. For example, it is possible for function that returns false here to return more than one value when it is run.

      Specified by:
      isList in interface JqlFunction
      Returns:
      true if the function can should be considered a list (i.e. work with IN and NOT IN), or false otherwise. In this case it is considered to return a single value (i.e. work with =, !=, <, >, ...).
    • getI18n

      protected I18nHelper getI18n()