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)
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 . |
public 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)
ProjectConfigurationService
Project
.validateProjectForCreation
in interface ProjectConfigurationService
projectKey
- 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)
ProjectConfigurationService
Project
.
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 ProjectConfigurationService
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 public Project createProject(@NotNull String projectKey, @NotNull String projectName, @Nullable String projectDescription) throws WebValidationException
ProjectConfigurationService
Project
, 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 ProjectConfigurationService
projectKey
- key of the projectprojectName
- project nameprojectDescription
- project descriptionWebValidationException
- in case of validation errors@NotNull public ErrorCollection validateProjectForUpdate(@NotNull String projectKey, @Nullable String projectName, @Nullable String projectDescription)
ProjectConfigurationService
Project
.validateProjectForUpdate
in interface ProjectConfigurationService
projectKey
- 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)
ProjectConfigurationService
Project
.
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 ProjectConfigurationService
projectKey
- 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
ProjectConfigurationService
Project
, throwing exception on invalid data. Prior to calling
this method data should be validated by calling ProjectConfigurationService.validateProjectForUpdate(String, String, String)
.updateProject
in interface ProjectConfigurationService
project
- project to updateprojectName
- new project nameprojectDescription
- new project descriptionWebValidationException
- in case of validation errorspublic void markProjectForDeletion(@NotNull Project project)
ProjectConfigurationService
markProjectForDeletion
in interface ProjectConfigurationService
project
- project to deleteCopyright © 2018 Atlassian Software Systems Pty Ltd. All rights reserved.