public class

WorklogResultFactory

extends Object
java.lang.Object
   ↳ com.atlassian.jira.bc.issue.worklog.WorklogResultFactory

Class Overview

A static factory class for instantiating WorklogResult objects.

Summary

Public Constructors
WorklogResultFactory()
Public Methods
static WorklogResult create(Worklog worklog)
static WorklogResult create(Worklog worklog, boolean isEditableCheckRequired)
static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog, Long adjustmentAmount, boolean isEditableCheckRequired)
Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.
static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog, Long adjustmentAmount)
Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.
static WorklogAdjustmentAmountResult createAdjustmentAmount(WorklogResult worklogResult, Long adjustmentAmount)
Used for copying the WorklogResult received from the base validate method and adding on the adjustmentAmount.
static WorklogNewEstimateResult createNewEstimate(Worklog worklog, Long newEstimate, boolean isEditableCheckRequired)
Used for creating WorklogResult objects that also capture a newEstimate to be set.
static WorklogNewEstimateResult createNewEstimate(Worklog worklog, Long newEstimate)
Used for creating WorklogResult objects that also capture a newEstimate to be set.
static WorklogNewEstimateResult createNewEstimate(WorklogResult worklogResult, Long newEstimate)
Used for copying the WorklogResult received from the base validate method and adding on the newEstimate.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WorklogResultFactory ()

Public Methods

public static WorklogResult create (Worklog worklog)

Parameters
worklog the worklog
Returns
  • Creates a simple WorklogResult that just contains the Worklog to use. The editable check will be required.

public static WorklogResult create (Worklog worklog, boolean isEditableCheckRequired)

Parameters
worklog the worklog
isEditableCheckRequired flag to set on the result
Returns
  • Creates a simple WorklogResult that just contains the Worklog to use and the flag for the editable check.

public static WorklogAdjustmentAmountResult createAdjustmentAmount (Worklog worklog, Long adjustmentAmount, boolean isEditableCheckRequired)

Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.

Parameters
worklog the worklog
adjustmentAmount the adjustment amount in seconds
isEditableCheckRequired flag to set on the result
Returns
  • Creates a WorklogResult that contains the Worklog, the adjustment amount and the flag for the editable check.

public static WorklogAdjustmentAmountResult createAdjustmentAmount (Worklog worklog, Long adjustmentAmount)

Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.

Parameters
worklog the worklog
adjustmentAmount the adjustment amount in seconds
Returns
  • Creates a WorklogResult that contains the Worklog and the adjustment amount. The editable check will be required.

public static WorklogAdjustmentAmountResult createAdjustmentAmount (WorklogResult worklogResult, Long adjustmentAmount)

Used for copying the WorklogResult received from the base validate method and adding on the adjustmentAmount.

Parameters
worklogResult the worklog result to copy; must not be null.
adjustmentAmount the adjustment amount in seconds
Returns
  • Creates a WorklogResult that contains the Worklog and the adjustment amount. The editable check will be required.

public static WorklogNewEstimateResult createNewEstimate (Worklog worklog, Long newEstimate, boolean isEditableCheckRequired)

Used for creating WorklogResult objects that also capture a newEstimate to be set.

Parameters
worklog the worklog
newEstimate the new estimate in seconds
isEditableCheckRequired flag to set on the result
Returns
  • Creates a WorklogResult that contains the Worklog, the new estimate and the flag for the editable check.

public static WorklogNewEstimateResult createNewEstimate (Worklog worklog, Long newEstimate)

Used for creating WorklogResult objects that also capture a newEstimate to be set.

Parameters
worklog the worklog
newEstimate the new estimate in seconds
Returns
  • Creates a WorklogResult that contains the Worklog and the new estimate. The editable check will be required.

public static WorklogNewEstimateResult createNewEstimate (WorklogResult worklogResult, Long newEstimate)

Used for copying the WorklogResult received from the base validate method and adding on the newEstimate.

Parameters
worklogResult the worklog result to copy; must not be null.
newEstimate the new estimate in seconds
Returns
  • Creates a WorklogResult that contains the Worklog and the new estimate. The editable check will be required.