public class ProjectConfigurationServiceImpl extends Object implements ProjectConfigurationService
| Modifier and Type | Field and Description |
|---|---|
static String |
PROJECT_DESCRIPTION_FIELD |
static String |
PROJECT_KEY_FIELD |
static String |
PROJECT_NAME_FIELD |
| Constructor and Description |
|---|
ProjectConfigurationServiceImpl(PlanManager planManager,
ProjectManager projectManager,
com.atlassian.struts.TextProvider textProvider,
ValidationService validationService,
AuditLogService auditLogService,
com.atlassian.event.api.EventPublisher eventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateProjectpublic static final String PROJECT_KEY_FIELD
public static final String PROJECT_NAME_FIELD
public static final String PROJECT_DESCRIPTION_FIELD
@Autowired public ProjectConfigurationServiceImpl(PlanManager planManager, ProjectManager projectManager, com.atlassian.struts.TextProvider textProvider, ValidationService validationService, AuditLogService auditLogService, com.atlassian.event.api.EventPublisher eventPublisher)
@NotNull public ErrorCollection validateProjectForCreation(@Nullable String projectKey, @Nullable String projectName, @Nullable String projectDescription)
ProjectConfigurationServiceProject.validateProjectForCreation in interface ProjectConfigurationServiceprojectKey - key of the projectprojectName - project nameprojectDescription - project description@NotNull public ErrorCollection validateProjectForCreation(@NotNull String projectKeyField, @Nullable String projectKey, @NotNull String projectNameField, @Nullable String projectName, @NotNull String projectDescriptionField, @Nullable String projectDescription)
ProjectConfigurationServiceProject.
This is a more specific version of ProjectConfigurationService.validateProjectForCreation(String, String, String), allowing
configuration of field names to generate more accurate ErrorCollection.
validateProjectForCreation in interface ProjectConfigurationServiceprojectKeyField - 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 public Project createProject(@NotNull String projectKey, @NotNull String projectName, @Nullable String projectDescription, boolean grantAllUsersReadAccess) throws WebValidationException
ProjectConfigurationServiceProject, throwing an exception on invalid data. Prior to calling this method
data should be validated by calling ProjectConfigurationService.validateProjectForCreation(String, String, String).createProject in interface ProjectConfigurationServiceprojectKey - key of the projectprojectName - project nameprojectDescription - project descriptiongrantAllUsersReadAccess - grant anonymous and logged-in users READ permissionsWebValidationException - in case of validation errors@NotNull public ErrorCollection validateProjectForUpdate(@NotNull String projectKey, @Nullable String projectName, @Nullable String projectDescription)
ProjectConfigurationServiceProject.validateProjectForUpdate in interface ProjectConfigurationServiceprojectKey - key of the projectprojectName - new project nameprojectDescription - new project description@NotNull public ErrorCollection validateProjectForUpdate(@NotNull String projectKey, @NotNull String projectNameField, @Nullable String projectName, @NotNull String projectDescriptionField, @Nullable String projectDescription)
ProjectConfigurationServiceProject.
This is a more specific version of ProjectConfigurationService.validateProjectForUpdate(String, String, String), allowing
configuration of field names to generate more accurate ErrorCollection.
validateProjectForUpdate in interface ProjectConfigurationServiceprojectKey - key of the projectprojectNameField - field used to configure project nameprojectName - new project nameprojectDescriptionField - field used to configure project descriptionprojectDescription - new project descriptionpublic void updateProject(@NotNull
Project project,
@NotNull
String projectName,
@Nullable
String projectDescription)
throws WebValidationException
ProjectConfigurationServiceProject, throwing exception on invalid data. Prior to calling
this method data should be validated by calling ProjectConfigurationService.validateProjectForUpdate(String, String, String).updateProject in interface ProjectConfigurationServiceproject - project to updateprojectName - new project nameprojectDescription - new project descriptionWebValidationException - in case of validation errorspublic void markProjectForDeletion(@NotNull
Project project)
ProjectConfigurationServicemarkProjectForDeletion in interface ProjectConfigurationServiceproject - project to deleteCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.