public interface ProjectConfigurationService
projects
.Modifier and Type | Method and Description |
---|---|
default Project |
createProject(String projectKey,
String projectName,
String projectDescription)
Deprecated.
since 6.9.0. Use
createProject(String, String, String, boolean) |
Project |
createProject(String projectKey,
String projectName,
String projectDescription,
boolean grantAllUsersReadAccess)
Creates and persists a new
Project , throwing an exception on invalid data. |
void |
markProjectForDeletion(Project project)
Marks a project for deletion.
|
void |
updateProject(Project project,
String projectName,
String projectDescription)
Updates and persists changes for an existing
Project , throwing exception on invalid data. |
ErrorCollection |
validateProjectForCreation(String projectKey,
String projectName,
String projectDescription)
Perform validation of data for creation of a new
Project . |
ErrorCollection |
validateProjectForCreation(String projectKeyField,
String projectKey,
String projectNameField,
String projectName,
String projectDescriptionField,
String projectDescription)
Perform validation of data for creation of a new
Project . |
ErrorCollection |
validateProjectForUpdate(String projectKey,
String projectName,
String projectDescription)
Perform validation of data for updating details of an existing
Project . |
ErrorCollection |
validateProjectForUpdate(String projectKey,
String projectNameField,
String projectName,
String projectDescriptionField,
String projectDescription)
Perform validation of data for updating details of an existing
Project . |
@NotNull ErrorCollection validateProjectForCreation(@Nullable String projectKey, @Nullable String projectName, @Nullable String projectDescription)
Project
.projectKey
- key of the projectprojectName
- project nameprojectDescription
- project description@NotNull ErrorCollection validateProjectForCreation(@NotNull String projectKeyField, @Nullable String projectKey, @NotNull String projectNameField, @Nullable String projectName, @NotNull String projectDescriptionField, @Nullable String projectDescription)
Project
.
This is a more specific version of validateProjectForCreation(String, String, String)
, allowing
configuration of field names to generate more accurate ErrorCollection
.
projectKeyField
- field used to configure project keyprojectKey
- key of the projectprojectNameField
- field used to configure project nameprojectName
- project nameprojectDescriptionField
- field used to configure project descriptionprojectDescription
- project description@NotNull @Deprecated default Project createProject(@NotNull String projectKey, @NotNull String projectName, @Nullable String projectDescription) throws WebValidationException
createProject(String, String, String, boolean)
Project
, throwing an exception on invalid data. Prior to calling this method
data should be validated by calling validateProjectForCreation(String, String, String)
.projectKey
- key of the projectprojectName
- project nameprojectDescription
- project descriptionWebValidationException
- in case of validation errors@NotNull Project createProject(@NotNull String projectKey, @NotNull String projectName, @Nullable String projectDescription, boolean grantAllUsersReadAccess) throws WebValidationException
Project
, throwing an exception on invalid data. Prior to calling this method
data should be validated by calling validateProjectForCreation(String, String, String)
.projectKey
- key of the projectprojectName
- project nameprojectDescription
- project descriptiongrantAllUsersReadAccess
- grant anonymous and logged-in users READ permissionsWebValidationException
- in case of validation errors@NotNull ErrorCollection validateProjectForUpdate(@NotNull String projectKey, @Nullable String projectName, @Nullable String projectDescription)
Project
.projectKey
- key of the projectprojectName
- new project nameprojectDescription
- new project description@NotNull ErrorCollection validateProjectForUpdate(@NotNull String projectKey, @NotNull String projectNameField, @Nullable String projectName, @NotNull String projectDescriptionField, @Nullable String projectDescription)
Project
.
This is a more specific version of validateProjectForUpdate(String, String, String)
, allowing
configuration of field names to generate more accurate ErrorCollection
.
projectKey
- key of the projectprojectNameField
- field used to configure project nameprojectName
- new project nameprojectDescriptionField
- field used to configure project descriptionprojectDescription
- new project descriptionvoid updateProject(@NotNull Project project, @NotNull String projectName, @Nullable String projectDescription) throws WebValidationException
Project
, throwing exception on invalid data. Prior to calling
this method data should be validated by calling validateProjectForUpdate(String, String, String)
.project
- project to updateprojectName
- new project nameprojectDescription
- new project descriptionWebValidationException
- in case of validation errorsvoid markProjectForDeletion(@NotNull Project project) throws IllegalStateException
project
- project to deleteIllegalStateException
- in case of illegal state of the projectCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.