public class

DefaultWorklogBeanFactory

extends Object
implements WorklogBeanFactory
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.rest.json.DefaultWorklogBeanFactory

Summary

Public Constructors
DefaultWorklogBeanFactory(TimeTrackingConfiguration timeTrackingConfiguration, JiraBaseUrls jiraBaseUrls, UserBeanFactory userBeanFactory, UserManager userManager)
Public Methods
WorklogJsonBean createBean(Worklog worklog, ApplicationUser loggedInUser)
Generate a bean suitable for serialisation by Jackson into JSON.
Iterable<WorklogJsonBean> createBeans(Iterable<Worklog> worklogs, ApplicationUser loggedInUser)
Generate beans suitable for serialisation by Jackson into JSON.
Protected Methods
UserJsonBean getUserBean(String userKey, ApplicationUser loggedInUser)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.fields.rest.json.WorklogBeanFactory

Public Constructors

public DefaultWorklogBeanFactory (TimeTrackingConfiguration timeTrackingConfiguration, JiraBaseUrls jiraBaseUrls, UserBeanFactory userBeanFactory, UserManager userManager)

Public Methods

public WorklogJsonBean createBean (Worklog worklog, ApplicationUser loggedInUser)

Generate a bean suitable for serialisation by Jackson into JSON.

Parameters
worklog Worklog which would be used for creating bean.
loggedInUser WorklogJsonBean will be created in the context of loggedInUser (i.e. hide email address if necessary)
Returns
  • Bean suitable for serialisation by Jackson into JSON for given worklog

public Iterable<WorklogJsonBean> createBeans (Iterable<Worklog> worklogs, ApplicationUser loggedInUser)

Generate beans suitable for serialisation by Jackson into JSON.

Parameters
worklogs Worklogs which would be used for creating a collection of beans.
loggedInUser WorklogJsonBean will be created in the context of loggedInUser (i.e. hide email address if necessary)
Returns
  • Bean suitable for serialisation by Jackson into JSON for given worklog

Protected Methods

protected UserJsonBean getUserBean (String userKey, ApplicationUser loggedInUser)