|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WorklogManager
The WorklogManager is used to retrieve, create, update, and remove work logs in JIRA. Worklogs are always associated with an issue.
Method Summary | |
---|---|
Worklog |
create(com.atlassian.crowd.embedded.api.User user,
Worklog worklog,
Long newEstimate,
boolean dispatchEvent)
Creates a worklog based on the passed in Worklog object and associates
it with the given issue. |
boolean |
delete(com.atlassian.crowd.embedded.api.User user,
Worklog worklog,
Long newEstimate,
boolean dispatchEvent)
Deletes the specified worklog and updates the issue's remaining estimate and time spent fields. |
Worklog |
getById(Long id)
Used to get a worklog by its id. |
List<Worklog> |
getByIssue(Issue issue)
Returns all child worklogs of a specified issue |
long |
getCountForWorklogsRestrictedByGroup(String groupName)
Returns the count of all Worklog 's that have a visibility restriction
of the provided group. |
ProjectRole |
getProjectRole(Long projectRoleId)
This is a convenience method to allow us to easily get a ProjectRole. |
int |
swapWorklogGroupRestriction(String groupName,
String swapGroup)
Updates Worklog 's such that worklogs that have a visibility
restriction of the provided groupName will be changed to have a visibility restriction of the
provided swapGroup. |
Worklog |
update(com.atlassian.crowd.embedded.api.User user,
Worklog worklog,
Long newEstimate,
boolean dispatchEvent)
Updates the provided Worklog . |
Method Detail |
---|
boolean delete(com.atlassian.crowd.embedded.api.User user, Worklog worklog, Long newEstimate, boolean dispatchEvent)
user
- the user who is performing the actionworklog
- the value to remove in the databasenewEstimate
- the value to set the Issue
's remainig estimate. If null the value will be left alone.dispatchEvent
- if true then an event of type EventType.ISSUE_WORKLOG_DELETED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
Worklog update(com.atlassian.crowd.embedded.api.User user, Worklog worklog, Long newEstimate, boolean dispatchEvent)
Worklog
. This method will
adjust the issue's remaining estimate to be the new value which has been passed to this method, the old
remaining estimate value will be lost.
If you have provided a groupLevel then the worklog visibility will be restricted to the provided group, it is
assumed that validation to insure that the group actually exists has been performed outside of this method. If
you have provided a roleLevelId then the worklog visibility will be restricted to the provided role, it is
assumed that validation to insure that the role actually exists has been performed outside of this method.
NOTE: this method does not do any permission checks to see if the user can perform the requested operation.
user
- the user who is performing the actionworklog
- the value to update in the databasenewEstimate
- the value to set the Issue
's remainig estimate. If null the value will be left alone.dispatchEvent
- if true then an event of type EventType.ISSUE_WORKLOG_UPDATED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
Worklog create(com.atlassian.crowd.embedded.api.User user, Worklog worklog, Long newEstimate, boolean dispatchEvent)
Worklog
object and associates
it with the given issue.
If you have provided a groupLevel then the worklog visibility will be restricted to the provided group, it is
assumed that validation to insure that the group actually exists has been performed outside of this method. If
you have provided a roleLevelId then the worklog visibility will be restricted to the provided role, it is
assumed that validation to insure that the role actually exists has been performed outside of this method.
NOTE: this method does not do any permission checks to see if the user can perform the requested operation.
user
- is the user who is trying to create the worklog, this can be different than the user identified by
Worklog.getAuthor()
.worklog
- the object used to provide the parameters that will be used to create the worklog.newEstimate
- will be used to set the time estimate for this worklog.dispatchEvent
- if true then an event of type EventType.ISSUE_WORKLOGGED_ID
will be dispatched and any notifications listening for that event will be triggered. If false no event will be
dispatched.
Worklog
object that represents the newly created worklog.Worklog getById(Long id)
id
- uniquely identifies the worklog
List<Worklog> getByIssue(Issue issue)
issue
- the specified parent issue (not null)
long getCountForWorklogsRestrictedByGroup(String groupName)
Worklog
's that have a visibility restriction
of the provided group.
groupName
- identifies the group the worklogs are restricted by, this must not be null.
int swapWorklogGroupRestriction(String groupName, String swapGroup)
Worklog
's such that worklogs that have a visibility
restriction of the provided groupName will be changed to have a visibility restriction of the
provided swapGroup.
Note: There is no validation performed by this method to determine if the provided swapGroup is a valid
group with JIRA. This validation must be done by the caller.
groupName
- identifies the group the worklogs are restricted by, this must not be null.swapGroup
- identifies the group the worklogs will be changed to be restricted by, this must not be null.
ProjectRole getProjectRole(Long projectRoleId)
ProjectRole
.
NOTE: If you are trying to retrieve a ProjectRole
then you should be using the
ProjectRoleManager
.
projectRoleId
- the id to the ProjectRole
object you would like returned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |