|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@PublicApi public interface WorklogService
This is the business layer component that must be used to access all WorklogService
functionality.
This will perform validation before it hands off to the WorklogManager
.
Operations will not be performed if validation fails.
Method Summary | |
---|---|
Worklog |
createAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Persists a new Worklog on the given Issue . |
Worklog |
createAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Persists a new Worklog on the given Issue . |
Worklog |
createWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext,
WorklogAdjustmentAmountResult worklogAdjustmentAmount,
boolean dispatchEvent)
Persists a new Worklog on the given Issue . |
Worklog |
createWithNewRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogNewEstimateResult worklogNewEstimate,
boolean dispatchEvent)
Persists a new Worklog on the given Issue . |
boolean |
deleteAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Deletes the specified Worklog . |
boolean |
deleteAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Deletes the specified Worklog . |
boolean |
deleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext,
WorklogAdjustmentAmountResult worklogAdjustmentAmount,
boolean dispatchEvent)
Deletes the specified Worklog . |
boolean |
deleteWithNewRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogNewEstimateResult worklogNewEstimate,
boolean dispatchEvent)
Deletes the specified Worklog . |
Worklog |
getById(JiraServiceContext jiraServiceContext,
Long id)
Used to get a worklog by its id. |
List |
getByIssue(JiraServiceContext jiraServiceContext,
Issue issue)
Returns all child worklogs of a specified issue. |
List<Worklog> |
getByIssueVisibleToUser(JiraServiceContext jiraServiceContext,
Issue issue)
Returns all child worklogs of a specified issue that the provided user has permission to see. |
PagedList<Worklog> |
getByIssueVisibleToUser(JiraServiceContext jiraServiceContext,
Issue issue,
int pageSize)
Returns a PagedList over all all child worklogs of a specified issue that the provided user has permission to see. |
boolean |
hasPermissionToCreate(JiraServiceContext jiraServiceContext,
Issue issue,
boolean isEditableCheckRequired)
Determines if the user has the Permissions.WORK_ISSUE permission,
that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state. |
boolean |
hasPermissionToDelete(JiraServiceContext jiraServiceContext,
Worklog worklog)
Determine whether the current user has the permission to delete the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state. |
boolean |
hasPermissionToUpdate(JiraServiceContext jiraServiceContext,
Worklog worklog)
Determine whether the current user has the permission to update the supplied worklog, timetracking is enabled in JIRA and that the associated issue is in an editable workflow state. |
boolean |
isIssueInEditableWorkflowState(Issue issue)
Will return true if the issue is in an editable workflow state. |
boolean |
isTimeTrackingEnabled()
Will return true if APKeys.JIRA_OPTION_TIMETRACKING is true, false
otherwise. |
Worklog |
updateAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Updates the provided Worklog . |
Worklog |
updateAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogResult worklogResult,
boolean dispatchEvent)
Updates the provided Worklog . |
Worklog |
updateWithNewRemainingEstimate(JiraServiceContext jiraServiceContext,
WorklogNewEstimateResult worklogNewEstimate,
boolean dispatchEvent)
Updates the provided Worklog . |
WorklogResult |
validateCreate(JiraServiceContext jiraServiceContext,
WorklogInputParameters params)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue. |
WorklogAdjustmentAmountResult |
validateCreateWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext,
WorklogAdjustmentAmountInputParameters params)
Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by calling hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue. |
WorklogNewEstimateResult |
validateCreateWithNewEstimate(JiraServiceContext jiraServiceContext,
WorklogNewEstimateInputParameters params)
Determines whether worklogs are enabled in JIRA and if the user has the required permission as determined by calling hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue. |
WorklogResult |
validateDelete(JiraServiceContext jiraServiceContext,
Long worklogId)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue. |
WorklogAdjustmentAmountResult |
validateDeleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext,
Long worklogId,
String adjustmentAmount)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue. |
WorklogNewEstimateResult |
validateDeleteWithNewEstimate(JiraServiceContext jiraServiceContext,
Long worklogId,
String newEstimate)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue. |
WorklogResult |
validateUpdate(JiraServiceContext jiraServiceContext,
WorklogInputParameters params)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue. |
WorklogNewEstimateResult |
validateUpdateWithNewEstimate(JiraServiceContext jiraServiceContext,
WorklogNewEstimateInputParameters params)
Determines whether worklogs are enabled in JIRA and if the user has the required permissions as determined by calling hasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue. |
Method Detail |
---|
WorklogResult validateDelete(JiraServiceContext jiraServiceContext, Long worklogId)
hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodworklogId
- identifies the worklog that the update validation will occur against
WorklogNewEstimateResult validateDeleteWithNewEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String newEstimate)
hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodworklogId
- identifies the worklog that the delete validation will occur againstnewEstimate
- The value to change the issues remaining estimate to.
WorklogAdjustmentAmountResult validateDeleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, Long worklogId, String adjustmentAmount)
hasPermissionToDelete(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to delete a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodworklogId
- identifies the worklog that the delete validation will occur againstadjustmentAmount
- The value to increase the issues remaining estimate by.
boolean deleteWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent)
Worklog
. This method will
adjust the issues remaining estimate to be the new value which has been passed to this method, the old
remaining estimate value will be lost.
jiraServiceContext
- containing the User
who wishes to update the supplied worklog and
the ErrorCollection
that will contain any errors encountered
in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog delete @return the deleted Worklog object, or null if no object has been deleted.
Worklog
was successfully deleted, false otherwiseboolean deleteWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent)
Worklog
. This method will
adjust the issues remaining estimate to be the new value which has been passed to this method, the old
remaining estimate value will be lost.
jiraServiceContext
- containing the User
who wishes to update the supplied worklog and
the ErrorCollection
that will contain any errors encountered
in calling the methodworklogAdjustmentAmount
- the Worklog and adjustmentAmount for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog delete @return the deleted Worklog object, or null if no object has been deleted.
Worklog
was successfully deleted, false otherwiseboolean deleteAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
. This method will
make no adjustment to the issues remaining estimate.
jiraServiceContext
- containing the User
who wishes to update the supplied worklog and
the ErrorCollection
that will contain any errors encountered
in calling the methodworklogResult
- result of the call to validateDelete(com.atlassian.jira.bc.JiraServiceContext,Long)
which contains the Worklog
to deletedispatchEvent
- whether or not you want to have an event dispatched on Worklog delete
Worklog
was successfully deleted, false otherwiseboolean deleteAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
. This method will auto-adjust the issues
remaining estimate by adding the time spent on the deleted worklog.
jiraServiceContext
- containing the User
who wishes to update the supplied worklog and
the ErrorCollection
that will contain any errors encountered
in calling the methodworklogResult
- result of the call to validateDelete(com.atlassian.jira.bc.JiraServiceContext,Long)
which contains the Worklog
to deletedispatchEvent
- whether or not you want to have an event dispatched on Worklog delete
Worklog
was successfully deleted, false otherwiseWorklogResult validateUpdate(JiraServiceContext jiraServiceContext, WorklogInputParameters params)
hasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate
WorklogNewEstimateResult validateUpdateWithNewEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params)
hasPermissionToUpdate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.worklog.Worklog)
to update a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate
Worklog updateWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent)
Worklog
. This method will
adjust the issues remaining estimate to be the new value which has been passed to this method, the old
remaining estimate value will be lost.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog update @return the updated Worklog object, or null if no object has been updated.
Worklog updateAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
. This method will
make no adjustment to the issues remaining estimate.
jiraServiceContext
- containing the User
who wishes to update the supplied worklog and
the ErrorCollection
that will contain any errors encountered
in calling the methodworklogResult
- result of the call to validateUpdate(com.atlassian.jira.bc.JiraServiceContext,WorklogInputParameters)
which contains the Worklog
to updatedispatchEvent
- whether or not you want to have an event dispatched on Worklog update
Worklog updateAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
. This method will auto-adjust the issues
remaining estimate based on the updated value of the time spent on the work.
jiraServiceContext
- containing the User
who wishes to update the worklog and
the ErrorCollection
that will contain any errors
in calling the methodworklogResult
- result of the call to validateUpdate(com.atlassian.jira.bc.JiraServiceContext,WorklogInputParameters)
which contains the Worklog
to updatedispatchEvent
- whether or not you want to have an event dispatched on Worklog update
boolean hasPermissionToUpdate(JiraServiceContext jiraServiceContext, Worklog worklog)
Permissions.WORKLOG_EDIT_ALL
permission; ORWorklog
author and has the Permissions.WORKLOG_EDIT_OWN
permission
jiraServiceContext
- containing the User
who wishes to update the worklog and
the ErrorCollection
that will contain any errors
in calling the methodworklog
- the Worklog
the user wishes to update
boolean hasPermissionToDelete(JiraServiceContext jiraServiceContext, Worklog worklog)
Permissions.WORKLOG_DELETE_ALL
permission; ORWorklog
author and has the Permissions.WORKLOG_DELETE_OWN
permission
jiraServiceContext
- containing the User
who wishes to delete the worklog and
the ErrorCollection
that will contain any errors
in calling the methodworklog
- the Worklog
the user wishes to delete
WorklogResult validateCreate(JiraServiceContext jiraServiceContext, WorklogInputParameters params)
hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate
WorklogNewEstimateResult validateCreateWithNewEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateInputParameters params)
hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate
WorklogAdjustmentAmountResult validateCreateWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountInputParameters params)
hasPermissionToCreate(com.atlassian.jira.bc.JiraServiceContext,com.atlassian.jira.issue.Issue,boolean)
to create a worklog for this issue.
jiraServiceContext
- containing the user who wishes to create a worklog and the errorCollection
that will contain any errors in calling the methodparams
- parameter object that contains all the values required to validate
Worklog createWithNewRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogNewEstimateResult worklogNewEstimate, boolean dispatchEvent)
Worklog
on the given Issue
. This method will
adjust the issues remaining estimate to be the new value which has been passed to this method, the old
remaining estimate value will be lost.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodworklogNewEstimate
- the Worklog and new estimate for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog creation
validateCreateWithNewEstimate(com.atlassian.jira.bc.JiraServiceContext, WorklogNewEstimateInputParameters)
Worklog createWithManuallyAdjustedEstimate(JiraServiceContext jiraServiceContext, WorklogAdjustmentAmountResult worklogAdjustmentAmount, boolean dispatchEvent)
Worklog
on the given Issue
. This method will
adjust the issues remaining estimate by reducing by the adjustmentAmount which has been passed to this method.
Before calling this method, you must call validateCreateWithManuallyAdjustedEstimate() to ensure that the
creation is OK.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodworklogAdjustmentAmount
- the Worklog and adjustmentAmount for the issue.dispatchEvent
- whether or not you want to have an event dispatched on Worklog creation
validateCreateWithManuallyAdjustedEstimate(com.atlassian.jira.bc.JiraServiceContext, com.atlassian.jira.bc.issue.worklog.WorklogAdjustmentAmountInputParameters)
Worklog createAndRetainRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
on the given Issue
. This method will
make no adjustment to the issues remaining estimate.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodworklogResult
- the WorklogResult generated by the validate calldispatchEvent
- whether or not you want to have an event dispatched on Worklog creation @return the created Worklog object, or null if no object created.
Worklog createAndAutoAdjustRemainingEstimate(JiraServiceContext jiraServiceContext, WorklogResult worklogResult, boolean dispatchEvent)
Worklog
on the given Issue
. This method will
auto-adjust the issues remaining estimate based on the value of the time spent on the work.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodworklogResult
- the WorklogResult generated by the validate calldispatchEvent
- whether or not you want to have an event dispatched on Worklog creation @return the created Worklog object, or null if no object created.
boolean hasPermissionToCreate(JiraServiceContext jiraServiceContext, Issue issue, boolean isEditableCheckRequired)
Permissions.WORK_ISSUE
permission,
that timetracking is enabled in JIRA and that the associated issue is in an editable workflow state.
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodissue
- the issue to add the worklog toisEditableCheckRequired
- set to true if we require the issue to be in an editable state. This should always
be the case except when logging work on transition
Worklog getById(JiraServiceContext jiraServiceContext, Long id)
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodid
- uniquely identifies the worklog
List getByIssue(JiraServiceContext jiraServiceContext, Issue issue)
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)
List<Worklog> getByIssueVisibleToUser(JiraServiceContext jiraServiceContext, Issue issue)
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)
PagedList<Worklog> getByIssueVisibleToUser(JiraServiceContext jiraServiceContext, Issue issue, int pageSize)
jiraServiceContext
- containing the User
who wishes to create a worklog and
the ErrorCollection
that will contain any errors in calling the methodissue
- the specified parent issue (not null)pageSize
- the number of worklogs per page
boolean isTimeTrackingEnabled()
APKeys.JIRA_OPTION_TIMETRACKING
is true, false
otherwise.
boolean isIssueInEditableWorkflowState(Issue issue)
issue
- the issue to see if it is in an editable store
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |