@ExperimentalApi public interface

WorklogBeanFactory

com.atlassian.jira.issue.fields.rest.json.WorklogBeanFactory
Known Indirect Subclasses

@ExperimentalApi

This interface is considered usable by external developers but its contracts have not stabilized.

Experimental APIs may be changed at any time before being marked @Internal or @PublicApi.

Class Overview

This provides a simple, dependency-free, straight forward API to generating the JSON corresponding to a Worklog.

Summary

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.

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