com.atlassian.jira.issue.worklog
Interface WorklogStore

All Known Implementing Classes:
OfBizWorklogStore

public interface WorklogStore


Method Summary
 Worklog create(Worklog worklog)
          Creates a new worklog in the data store based on the values in the passed in Worklog object.
 boolean delete(java.lang.Long worklogId)
          Deletes a worklog from the data store based on the passed in id.
 Worklog getById(java.lang.Long id)
          Returns a worklog specified by it's id
 java.util.List<Worklog> getByIssue(Issue issue)
          Returns all child worklogs of a specified issue
 long getCountForWorklogsRestrictedByGroup(java.lang.String groupName)
          Returns the count of all Worklog's that have a visibility restriction of the provided group.
 int swapWorklogGroupRestriction(java.lang.String groupName, java.lang.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(Worklog worklog)
          Updates fields of an existing worklog in the datastore (identified by its id) with the supplied worklog.
 

Method Detail

update

Worklog update(Worklog worklog)
Updates fields of an existing worklog in the datastore (identified by its id) with the supplied worklog.

Parameters:
worklog - identifies the worklog to update and provides the updated values.
Returns:
the updated worklog.

create

Worklog create(Worklog worklog)
Creates a new worklog in the data store based on the values in the passed in Worklog object.

Parameters:
worklog - specifies the values to create the worklog with.
Returns:
the representation of the created worklog, including the id.

delete

boolean delete(java.lang.Long worklogId)
Deletes a worklog from the data store based on the passed in id.

Parameters:
worklogId - specifies which worklog to delete (not null)
Returns:
true if the worklog was deleted, false otherwise
Throws:
java.lang.IllegalArgumentException - if the worklogId is null.

getById

Worklog getById(java.lang.Long id)
Returns a worklog specified by it's id

Parameters:
id - the specified id (not null)
Returns:
the specified worklog, or null if not found

getByIssue

java.util.List<Worklog> getByIssue(Issue issue)
Returns all child worklogs of a specified issue

Parameters:
issue - the specified parent issue (not null)
Returns:
a List of Worklogs, ordered by creation date. An empty List will be returned if none are found

getCountForWorklogsRestrictedByGroup

long getCountForWorklogsRestrictedByGroup(java.lang.String groupName)
Returns the count of all Worklog's that have a visibility restriction of the provided group.

Parameters:
groupName - identifies the group the worklogs are restricted by, this must not be null.
Returns:
the count of restriced groups
Since:
v3.12

swapWorklogGroupRestriction

int swapWorklogGroupRestriction(java.lang.String groupName,
                                java.lang.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. 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.

Parameters:
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.
Returns:
tbe number of worklogs affected by the update.
Since:
v3.12


Copyright © 2002-2011 Atlassian. All Rights Reserved.