com.atlassian.jira.issue.worklog
Class OfBizWorklogStore

java.lang.Object
  extended by com.atlassian.jira.issue.worklog.OfBizWorklogStore
All Implemented Interfaces:
WorklogStore

public class OfBizWorklogStore
extends Object
implements WorklogStore


Field Summary
static String WORKLOG_ENTITY
           
 
Constructor Summary
OfBizWorklogStore(OfBizDelegator ofBizDelegator, IssueManager issueManager)
           
 
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(Long worklogId)
          Deletes a worklog from the data store based on the passed in id.
 Worklog getById(Long id)
          Returns a worklog specified by it's 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.
 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(Worklog worklog)
          Updates fields of an existing worklog in the datastore (identified by its id) with the supplied worklog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKLOG_ENTITY

public static final String WORKLOG_ENTITY
See Also:
Constant Field Values
Constructor Detail

OfBizWorklogStore

public OfBizWorklogStore(OfBizDelegator ofBizDelegator,
                         IssueManager issueManager)
Method Detail

update

public Worklog update(Worklog worklog)
Description copied from interface: WorklogStore
Updates fields of an existing worklog in the datastore (identified by its id) with the supplied worklog.

Specified by:
update in interface WorklogStore
Parameters:
worklog - identifies the worklog to update and provides the updated values.
Returns:
the updated worklog.

create

public Worklog create(Worklog worklog)
Description copied from interface: WorklogStore
Creates a new worklog in the data store based on the values in the passed in Worklog object.

Specified by:
create in interface WorklogStore
Parameters:
worklog - specifies the values to create the worklog with.
Returns:
the representation of the created worklog, including the id.

delete

public boolean delete(Long worklogId)
Description copied from interface: WorklogStore
Deletes a worklog from the data store based on the passed in id.

Specified by:
delete in interface WorklogStore
Parameters:
worklogId - specifies which worklog to delete (not null)
Returns:
true if the worklog was deleted, false otherwise

getById

public Worklog getById(Long id)
Description copied from interface: WorklogStore
Returns a worklog specified by it's id

Specified by:
getById in interface WorklogStore
Parameters:
id - the specified id (not null)
Returns:
the specified worklog, or null if not found

getByIssue

public List<Worklog> getByIssue(Issue issue)
Description copied from interface: WorklogStore
Returns all child worklogs of a specified issue

Specified by:
getByIssue in interface WorklogStore
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

swapWorklogGroupRestriction

public int swapWorklogGroupRestriction(String groupName,
                                       String swapGroup)
Description copied from interface: WorklogStore
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.

Specified by:
swapWorklogGroupRestriction in interface WorklogStore
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.

getCountForWorklogsRestrictedByGroup

public long getCountForWorklogsRestrictedByGroup(String groupName)
Description copied from interface: WorklogStore
Returns the count of all Worklog's that have a visibility restriction of the provided group.

Specified by:
getCountForWorklogsRestrictedByGroup in interface WorklogStore
Parameters:
groupName - identifies the group the worklogs are restricted by, this must not be null.
Returns:
the count of restriced groups


Copyright © 2002-2013 Atlassian. All Rights Reserved.