Package com.atlassian.jira.jql.util
Class JqlTimetrackingDurationSupportImpl
java.lang.Object
com.atlassian.jira.jql.util.JqlTimetrackingDurationSupportImpl
- All Implemented Interfaces:
IndexValueConverter
,JqlTimetrackingDurationSupport
@InjectableComponent
public class JqlTimetrackingDurationSupportImpl
extends Object
implements JqlTimetrackingDurationSupport
The default implementation of
JqlTimetrackingDurationSupport
- Since:
- v4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToDuration
(Long durationInMinutes) Convenience method.convertToDuration
(String durationString) Converts the formatted duration string into its duration in seconds.convertToIndexValue
(QueryLiteral rawValue) protected String
convertToIndexValue
(Long durationInMinutes) Convenience method.protected String
convertToIndexValue
(String durationString) Converts the specified duration into the format used by the index.boolean
Check to see if the passed string is a valid duration according to JQL.
-
Constructor Details
-
JqlTimetrackingDurationSupportImpl
-
-
Method Details
-
validate
Description copied from interface:JqlTimetrackingDurationSupport
Check to see if the passed string is a valid duration according to JQL.- Specified by:
validate
in interfaceJqlTimetrackingDurationSupport
- Parameters:
durationString
- the string to check; cannot be null.- Returns:
- true if the date is valid; false otherwise.
-
convertToIndexValue
- Specified by:
convertToIndexValue
in interfaceIndexValueConverter
- Parameters:
rawValue
- the query literal to convert- Returns:
- the string of the index representation, null if the conversion fails
-
convertToDuration
Convenience method. SeeconvertToDuration(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
-
convertToDuration
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
-
convertToIndexValue
Convenience method. SeeconvertToIndexValue(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
-
convertToIndexValue
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
-