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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe name of the function.protected I18nHelpergetI18n()voidinit(JqlFunctionModuleDescriptor moduleDescriptor) Initialises this pluggable function with it's module descriptor.booleanisList()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.protected MessageSetvalidateNumberOfArgs(FunctionOperand operand, int expected) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.jira.plugin.jql.function.JqlFunction
getDataType, getMinimumNumberOfExpectedArguments, getValues, validate
-
Constructor Details
-
AbstractJqlFunction
public AbstractJqlFunction()
-
-
Method Details
-
init
Description copied from interface:JqlFunctionInitialises this pluggable function with it's module descriptor.- Specified by:
initin interfaceJqlFunction- Parameters:
moduleDescriptor- the module descriptor; will not be null.
-
getModuleDescriptor
-
validateNumberOfArgs
-
getFunctionName
Description copied from interface:JqlFunctionThe 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:
getFunctionNamein interfaceJqlFunction- Returns:
- the name of the function. Cannot be null.
-
isList
public boolean isList()Description copied from interface:JqlFunctionThis 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:
isListin interfaceJqlFunction- 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
-