public static class

ProjectCreationData.Builder

extends Object
java.lang.Object
   ↳ com.atlassian.jira.bc.project.ProjectCreationData.Builder

Class Overview

Builder for ProjectCreationData

Summary

Public Constructors
Builder()
Public Methods
ProjectCreationData build()
ProjectCreationData.Builder from(ProjectCreationData data)
ProjectCreationData.Builder fromExistingProject(Project existingProject, ProjectCreationData input)
Creates a new instance of ProjectCreationData using a combination of the existing project's data as well as the input provided

The following rules will be applied:

  • projectTypeKey - always taken from the existing project
  • projectTemplateKey - always set to null
  • name - taken from user input since it has to be different than the existing project
  • key - taken from user input since it has to be different than the existing project
  • description - taken from given creation data
  • url - taken from given creation data
  • avatarId - taken from given creation data
  • lead - taken from given creation data or existing project if not provided
  • assigneeType - taken given creation data or existing project if not provided
ProjectCreationData.Builder withAssigneeType(Long assigneeType)
ProjectCreationData.Builder withAvatarId(Long avatarId)
ProjectCreationData.Builder withDescription(String description)
ProjectCreationData.Builder withKey(String key)
ProjectCreationData.Builder withLead(ApplicationUser lead)
ProjectCreationData.Builder withName(String name)
ProjectCreationData.Builder withProjectTemplateKey(String projectTemplateKey)
ProjectCreationData.Builder withType(ProjectTypeKey projectTypeKey)
ProjectCreationData.Builder withType(String projectTypeKey)
ProjectCreationData.Builder withUrl(String url)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public ProjectCreationData build ()

public ProjectCreationData.Builder fromExistingProject (Project existingProject, ProjectCreationData input)

Creates a new instance of ProjectCreationData using a combination of the existing project's data as well as the input provided

The following rules will be applied:

  • projectTypeKey - always taken from the existing project
  • projectTemplateKey - always set to null
  • name - taken from user input since it has to be different than the existing project
  • key - taken from user input since it has to be different than the existing project
  • description - taken from given creation data
  • url - taken from given creation data
  • avatarId - taken from given creation data
  • lead - taken from given creation data or existing project if not provided
  • assigneeType - taken given creation data or existing project if not provided

Parameters
existingProject The existing project to take creation data from
input The input provided by the admin user
Returns
  • A builder representing data using the rules stated above

public ProjectCreationData.Builder withAssigneeType (Long assigneeType)

public ProjectCreationData.Builder withAvatarId (Long avatarId)

public ProjectCreationData.Builder withDescription (String description)

public ProjectCreationData.Builder withKey (String key)

public ProjectCreationData.Builder withName (String name)

public ProjectCreationData.Builder withProjectTemplateKey (String projectTemplateKey)

public ProjectCreationData.Builder withType (ProjectTypeKey projectTypeKey)

public ProjectCreationData.Builder withType (String projectTypeKey)

public ProjectCreationData.Builder withUrl (String url)