Class ComponentConverter

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

public class ComponentConverter extends Object
Originally this was part of the OfBizProjectComponentStore. I've extracted it to a separate class so that the logic can be reused elsewhere.
Since:
4.2
  • Constructor Details

    • ComponentConverter

      public ComponentConverter()
  • Method Details

    • convertToComponents

      public Collection<MutableProjectComponent> convertToComponents(Collection<org.ofbiz.core.entity.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
    • convertToComponent

      public MutableProjectComponent convertToComponent(org.ofbiz.core.entity.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
    • convertToProjectComponents

      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
    • convertToProjectComponent

      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