Package com.atlassian.jira.bc.project
Class ProjectCreationData.Builder
java.lang.Object
com.atlassian.jira.bc.project.ProjectCreationData.Builder
- Enclosing class:
ProjectCreationData
Builder for
ProjectCreationData-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()from(ProjectCreationData data) 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 providedwithAssigneeType(Long assigneeType) withAvatarId(Long avatarId) withDescription(String description) withLead(ApplicationUser lead) withProjectTemplateKey(String projectTemplateKey) withType(ProjectTypeKey projectTypeKey)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withName
-
withKey
-
withDescription
-
withType
-
withType
-
withProjectTemplateKey
-
withLead
-
withUrl
-
withAssigneeType
-
withAvatarId
-
build
-
from
-
fromExistingProject
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 providedThe 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 frominput- The input provided by the admin user- Returns:
- A builder representing data using the rules stated above
-