com.atlassian.jira.issue.customfields.impl.rest
Class NumberCustomFieldOperationsHandler

java.lang.Object
  extended by com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler<Double>
      extended by com.atlassian.jira.issue.customfields.impl.rest.NumberCustomFieldOperationsHandler
All Implemented Interfaces:
RestFieldOperationsHandler

public class NumberCustomFieldOperationsHandler
extends AbstractCustomFieldOperationsHandler<Double>

Basic operation handler for single value Text Fields.

Since:
v5.0

Field Summary
 
Fields inherited from class com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler
field, i18nHelper
 
Constructor Summary
NumberCustomFieldOperationsHandler(CustomField field, DoubleConverter doubleConverter, I18nHelper i18nHelper)
           
 
Method Summary
protected  void finaliseOperation(Double finalValue, IssueInputParameters parameters, ErrorCollection errors)
          takes the value returnd by a call to applyOperation() and puts it into the inputparams
protected  Double getInitialCreateValue(IssueContext issueCtx)
          compute the "currentValue" to be passed to applyOperation()
protected  Double getInitialValue(Issue issue, ErrorCollection errors)
          compute the "currentValue" to be passed to applyOperation()
protected  Double handleSetOperation(IssueContext issueCtx, Issue issue, Double currentFieldValue, JsonData operationValue, ErrorCollection errors)
           
 
Methods inherited from class com.atlassian.jira.issue.customfields.impl.rest.AbstractCustomFieldOperationsHandler
applyOperation, getSupportedOperations, handleAddOperation, handleRemoveOperation, updateIssueInputParameters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NumberCustomFieldOperationsHandler

public NumberCustomFieldOperationsHandler(CustomField field,
                                          DoubleConverter doubleConverter,
                                          I18nHelper i18nHelper)
Method Detail

getInitialValue

protected Double getInitialValue(Issue issue,
                                 ErrorCollection errors)
compute the "currentValue" to be passed to applyOperation()

Specified by:
getInitialValue in class AbstractCustomFieldOperationsHandler<Double>

getInitialCreateValue

protected Double getInitialCreateValue(IssueContext issueCtx)
compute the "currentValue" to be passed to applyOperation()

Specified by:
getInitialCreateValue in class AbstractCustomFieldOperationsHandler<Double>
Parameters:
issueCtx -

finaliseOperation

protected void finaliseOperation(Double finalValue,
                                 IssueInputParameters parameters,
                                 ErrorCollection errors)
takes the value returnd by a call to applyOperation() and puts it into the inputparams

Specified by:
finaliseOperation in class AbstractCustomFieldOperationsHandler<Double>

handleSetOperation

protected Double handleSetOperation(IssueContext issueCtx,
                                    Issue issue,
                                    Double currentFieldValue,
                                    JsonData operationValue,
                                    ErrorCollection errors)
Overrides:
handleSetOperation in class AbstractCustomFieldOperationsHandler<Double>


Copyright © 2002-2012 Atlassian. All Rights Reserved.