public class DatabaseWorklogStore extends Object implements WorklogStore
WorklogStore
.Modifier and Type | Field and Description |
---|---|
static String |
WORKLOG_ENTITY |
Constructor and Description |
---|
DatabaseWorklogStore(OfBizDelegator delegator,
QueryDslAccessor queryDslAccessor,
QueryDSLWorklogFactory queryDSLWorklogFactory,
DatabaseConfigurationManager databaseConfigurationManager) |
Modifier and Type | Method and Description |
---|---|
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.
|
long |
deleteWorklogsForIssue(Issue issue)
Deletes all worklogs which are related to the given
Issue . |
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. |
long |
getCountForWorklogsRestrictedByRole(Long roleId)
Returns the count of all
Worklog 's that have a visibility restriction
of the provided role. |
List<DeletedWorklog> |
getWorklogsDeletedSince(Long sinceInMilliseconds,
int maxResults)
Returns
WorklogManager.WORKLOG_UPDATE_DATA_PAGE_SIZE of worklog ids and removal dates,
which were removed after (inclusive) provided time in milliseconds. |
Set<Worklog> |
getWorklogsForIds(Set<Long> worklogIds,
int maxResults)
Returns a set of worklogs for provided ids.
|
List<Worklog> |
getWorklogsUpdateSince(Long sinceInMiliseconds,
int maxResults)
Returns of worklogs, which were updated or created after (inclusive) provided time in milliseconds.
|
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. |
int |
swapWorklogRoleRestriction(Long roleId,
Long swapRoleId)
Updates
Worklog 's such that worklogs that have a visibility
restriction of the provided role will be changed to have a visibility restriction to the provided swapRole. |
Worklog |
update(Worklog worklog)
Updates fields of an existing worklog in the datastore (identified by its id) with the supplied worklog.
|
public static final String WORKLOG_ENTITY
public DatabaseWorklogStore(OfBizDelegator delegator, QueryDslAccessor queryDslAccessor, QueryDSLWorklogFactory queryDSLWorklogFactory, DatabaseConfigurationManager databaseConfigurationManager)
public Worklog update(Worklog worklog)
WorklogStore
update
in interface WorklogStore
worklog
- identifies the worklog to update and provides the updated values.public Worklog create(Worklog worklog)
WorklogStore
create
in interface WorklogStore
worklog
- specifies the values to create the worklog with.public boolean delete(Long worklogId)
WorklogStore
delete
in interface WorklogStore
worklogId
- specifies which worklog to delete (not null)public long deleteWorklogsForIssue(Issue issue)
WorklogStore
Issue
.deleteWorklogsForIssue
in interface WorklogStore
issue
- issue for which worklogs will be removedpublic Worklog getById(Long id)
WorklogStore
getById
in interface WorklogStore
id
- the specified id (not null)public List<Worklog> getByIssue(Issue issue)
WorklogStore
getByIssue
in interface WorklogStore
issue
- the specified parent issue (not null)public int swapWorklogGroupRestriction(String groupName, String swapGroup)
WorklogStore
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.
swapWorklogGroupRestriction
in interface WorklogStore
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.public long getCountForWorklogsRestrictedByGroup(String groupName)
WorklogStore
Worklog
's that have a visibility restriction
of the provided group.getCountForWorklogsRestrictedByGroup
in interface WorklogStore
groupName
- identifies the group the worklogs are restricted by, this must not be null.public long getCountForWorklogsRestrictedByRole(Long roleId)
WorklogStore
Worklog
's that have a visibility restriction
of the provided role.getCountForWorklogsRestrictedByRole
in interface WorklogStore
roleId
- identifies the role the worklogs are restricted by, this must not be null.public int swapWorklogRoleRestriction(Long roleId, Long swapRoleId)
WorklogStore
Worklog
's such that worklogs that have a visibility
restriction of the provided role will be changed to have a visibility restriction to the provided swapRole.
Note: There is no validation performed by this method to determine if the provided swapRoleId is a valid group with JIRA. This validation must be done by the caller.
swapWorklogRoleRestriction
in interface WorklogStore
roleId
- identifies the role the worklogs are restricted by, this must not be null.swapRoleId
- identifies the role the worklogs will be changed to be restricted by, this must not be null.public List<Worklog> getWorklogsUpdateSince(Long sinceInMiliseconds, int maxResults)
WorklogStore
getWorklogsUpdateSince
in interface WorklogStore
sinceInMiliseconds
- the time (measured as a difference between the timestamp and midnight, January 1, 1970 UTC)
since which the modified worklogs will be returned.maxResults
- the maximum number of worklogs to return.public List<DeletedWorklog> getWorklogsDeletedSince(Long sinceInMilliseconds, int maxResults)
WorklogStore
WorklogManager.WORKLOG_UPDATE_DATA_PAGE_SIZE
of worklog ids and removal dates,
which were removed after (inclusive) provided time in milliseconds.getWorklogsDeletedSince
in interface WorklogStore
sinceInMilliseconds
- the time (measured as a difference between the timestamp and midnight, January 1, 1970 UTC)
since which the modified worklogs will be returned.maxResults
- the maximum number of DeletedWorklog
to return.public Set<Worklog> getWorklogsForIds(Set<Long> worklogIds, int maxResults)
WorklogStore
getWorklogsForIds
in interface WorklogStore
worklogIds
- set of worklog ids.maxResults
- the maximu number of Worklog
to return.Copyright © 2002-2019 Atlassian. All Rights Reserved.