@InjectableComponent public class

JqlTimetrackingDurationSupportImpl

extends Object
implements JqlTimetrackingDurationSupport
java.lang.Object
   ↳ com.atlassian.jira.jql.util.JqlTimetrackingDurationSupportImpl

Class Overview

The default implementation of JqlTimetrackingDurationSupport

Summary

Public Constructors
JqlTimetrackingDurationSupportImpl(JiraDurationUtils durationUtils)
Public Methods
Long convertToDuration(Long durationInMinutes)
Convenience method.
Long convertToDuration(String durationString)
Converts the formatted duration string into its duration in seconds.
String convertToIndexValue(QueryLiteral rawValue)
boolean validate(String durationString)
Check to see if the passed string is a valid duration according to JQL.
Protected Methods
String convertToIndexValue(Long durationInMinutes)
Convenience method.
String convertToIndexValue(String durationString)
Converts the specified duration into the format used by the index.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.util.IndexValueConverter
From interface com.atlassian.jira.jql.util.JqlTimetrackingDurationSupport

Public Constructors

public JqlTimetrackingDurationSupportImpl (JiraDurationUtils durationUtils)

Public Methods

public Long convertToDuration (Long durationInMinutes)

Convenience method. See convertToDuration(String).

Converts the duration in minutes into its duration in seconds.

Parameters
durationInMinutes the duration
Returns
  • the duration in seconds; null if there was a problem

public Long convertToDuration (String durationString)

Converts the formatted duration string into its duration in seconds.

Parameters
durationString the formatted duration string
Returns
  • the duration in seconds; null if there was a problem

public String convertToIndexValue (QueryLiteral rawValue)

public boolean validate (String durationString)

Check to see if the passed string is a valid duration according to JQL.

Parameters
durationString the string to check; cannot be null.
Returns
  • true if the date is valid; false otherwise.

Protected Methods

protected String convertToIndexValue (Long durationInMinutes)

Convenience method. See convertToIndexValue(String).

Converts the specified duration into the format used by the index.

Parameters
durationInMinutes the duration
Returns
  • the index representation of the duration value in seconds

protected String convertToIndexValue (String durationString)

Converts the specified duration into the format used by the index.

Parameters
durationString the formatted duration string
Returns
  • the index representation of the duration value in seconds