public class

ComponentConverter

extends Object
java.lang.Object
   ↳ com.atlassian.jira.bc.project.component.ComponentConverter

Class Overview

Originally this was part of the OfBizProjectComponentStore. I've extracted it to a separate class so that the logic can be reused elsewhere.

Summary

Public Constructors
ComponentConverter()
Public Methods
MutableProjectComponent convertToComponent(GenericValue componentGV)
Convert the specified GenericValue representing a MutableProjectComponent object to a MutableProjectComponent object.
Collection<MutableProjectComponent> convertToComponents(Collection<GenericValue> componentGVCollection)
Convert the specified collection of GenericValues representing MutableProjectComponent object to a collection of MutableProjectComponent objects.
ProjectComponent convertToProjectComponent(MutableProjectComponent value)
Convert the specified MutableProjectComponent to a ProjectComponent object.
Collection<ProjectComponent> convertToProjectComponents(Collection<MutableProjectComponent> mutables)
Convert a collection of MutableProjectComponent objects to a collection of ProjectComponent objects.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ComponentConverter ()

Public Methods

public MutableProjectComponent convertToComponent (GenericValue componentGV)

Convert the specified GenericValue representing a MutableProjectComponent object to a MutableProjectComponent object.

Parameters
componentGV GenericValue object representing a MutableProjectComponent object to be converted to a MutableProjectComponent object
Returns
  • new MutableProjectComponent object that represents the original GenericValue object

public Collection<MutableProjectComponent> convertToComponents (Collection<GenericValue> componentGVCollection)

Convert the specified collection of GenericValues representing MutableProjectComponent object to a collection of MutableProjectComponent objects.

Parameters
componentGVCollection collection of GenericValues - each GenericValue represents a ProjectComponent
Returns
  • collection of new MutableProjectComponent objects that represents the original collection of GenericValues

public ProjectComponent convertToProjectComponent (MutableProjectComponent value)

Convert the specified MutableProjectComponent to a ProjectComponent object.

Parameters
value MutableProjectComponent to be converted into a ProjectComponent.
Returns
  • new instance of ProjectComponent with same values as given in the parameter object

public Collection<ProjectComponent> convertToProjectComponents (Collection<MutableProjectComponent> mutables)

Convert a collection of MutableProjectComponent objects to a collection of ProjectComponent objects.

Parameters
mutables collection of MutableProjectComponent objects to convert
Returns
  • collection of new ProjectComponent objects that represent objects in the given MutableProjectComponent collection