com.atlassian.jira.bc.issue.worklog
Class WorklogResultFactory

java.lang.Object
  extended by com.atlassian.jira.bc.issue.worklog.WorklogResultFactory

public class WorklogResultFactory
extends java.lang.Object

A static factory class for instantiating WorklogResult objects.

Since:
v4.2

Constructor Summary
WorklogResultFactory()
           
 
Method Summary
static WorklogResult create(Worklog worklog)
           
static WorklogResult create(Worklog worklog, boolean isEditableCheckRequired)
           
static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog, java.lang.Long adjustmentAmount)
          Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.
static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog, java.lang.Long adjustmentAmount, boolean isEditableCheckRequired)
          Used for creating WorklogResult objects that also capture a adjustmentAmount to be set.
static WorklogAdjustmentAmountResult createAdjustmentAmount(WorklogResult worklogResult, java.lang.Long adjustmentAmount)
          Used for copying the WorklogResult received from the base validate method and adding on the adjustmentAmount.
static WorklogNewEstimateResult createNewEstimate(Worklog worklog, java.lang.Long newEstimate)
          Used for creating WorklogResult objects that also capture a newEstimate to be set.
static WorklogNewEstimateResult createNewEstimate(Worklog worklog, java.lang.Long newEstimate, boolean isEditableCheckRequired)
          Used for creating WorklogResult objects that also capture a newEstimate to be set.
static WorklogNewEstimateResult createNewEstimate(WorklogResult worklogResult, java.lang.Long newEstimate)
          Used for copying the WorklogResult received from the base validate method and adding on the newEstimate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorklogResultFactory

public WorklogResultFactory()
Method Detail

create

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.

create

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.

createNewEstimate

public static WorklogNewEstimateResult createNewEstimate(WorklogResult worklogResult,
                                                         java.lang.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.

createNewEstimate

public static WorklogNewEstimateResult createNewEstimate(Worklog worklog,
                                                         java.lang.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.

createNewEstimate

public static WorklogNewEstimateResult createNewEstimate(Worklog worklog,
                                                         java.lang.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.

createAdjustmentAmount

public static WorklogAdjustmentAmountResult createAdjustmentAmount(WorklogResult worklogResult,
                                                                   java.lang.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.

createAdjustmentAmount

public static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog,
                                                                   java.lang.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.

createAdjustmentAmount

public static WorklogAdjustmentAmountResult createAdjustmentAmount(Worklog worklog,
                                                                   java.lang.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.


Copyright © 2002-2010 Atlassian. All Rights Reserved.