public abstract class AbstractVcsTaskConfigurator extends AbstractRepositoryAwareTaskConfigurator implements RepositoryAwareTaskConfigurator
| Modifier and Type | Field and Description |
|---|---|
static String |
CFG_AVAILABLE_REPOSITORIES |
static String |
CFG_DEFAULT_REPOSITORY_KEY |
static String |
CFG_DEFAULT_REPOSITORY_NAME |
static String |
CFG_SUPPORTED_REPOSITORIES |
environmentService, repositoryDefinitionManager, repositoryManager, textProvider, vcsRepositoryManagerbambooAuthenticationContext, taskConfiguratorHelper| Constructor and Description |
|---|
AbstractVcsTaskConfigurator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
additionalValidate(ActionParametersMap params,
ErrorCollection errorCollection)
Additional validation required by this task.
|
Map<String,String> |
generateTaskConfigMap(ActionParametersMap params,
TaskDefinition previousTaskDefinition)
Convert the params from the ui into a config map to be stored in the database for the taskDefinition.
|
protected abstract List<String> |
getAdditionalFieldsToCopy()
Additional fields to persist to the database.
|
protected abstract Map<String,Object> |
getDefaultFieldValues()
Default values for specified fields.
|
protected abstract boolean |
isRepositoryModuleSupported(VcsRepositoryModuleDescriptor repositoryModuleDescriptor)
Whether the given repository type is eligible for this task.
|
void |
populateContextForCreate(Map<String,Object> context)
Provide any required context to be used when rendering the freemarker template for creating a task definition.
|
void |
populateContextForEdit(Map<String,Object> context,
TaskDefinition taskDefinition)
Provide any required context to be used when rendering the freemarker template for view editing a task definition
|
void |
validate(ActionParametersMap params,
ErrorCollection errorCollection)
Validate the params submitted from the UI for this task definition
|
calculateRequirements, calculateRequirements, getPlanRepositoriesUsedByTask, getPlanRepositoriesUsedByTask, getRepositoriesUsedByTask, getRepositoriesUsedByTask, handleRepositoryIdChanged, setEnvironmentService, setRepositoryDefinitionManager, setRepositoryManager, setTextProvider, setVcsRepositoryManagercalculateRequirements, getI18nBean, populateContextForView, setAuthenticationContext, setTaskConfiguratorHelperclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPlanRepositoriesUsedByTask, getRepositoriesUsedByTask, handleRepositoryIdChangedcalculateRequirementspublic static final String CFG_AVAILABLE_REPOSITORIES
public static final String CFG_SUPPORTED_REPOSITORIES
public static final String CFG_DEFAULT_REPOSITORY_KEY
public static final String CFG_DEFAULT_REPOSITORY_NAME
protected abstract boolean isRepositoryModuleSupported(@NotNull
VcsRepositoryModuleDescriptor repositoryModuleDescriptor)
@NotNull protected abstract List<String> getAdditionalFieldsToCopy()
TaskConfigConstants.CFG_WORKING_SUB_DIRECTORY and RepositoryTaskHelper.CFG_SELECTED_REPOSITORY are always persisted, so they needn't be returned by this method.
Return an empty list if no additional fields are needed.@NotNull protected abstract Map<String,Object> getDefaultFieldValues()
protected abstract void additionalValidate(@NotNull
ActionParametersMap params,
@NotNull
ErrorCollection errorCollection)
TaskConfigConstants.CFG_WORKING_SUB_DIRECTORY is
always validated.public final void populateContextForEdit(@NotNull
Map<String,Object> context,
@NotNull
TaskDefinition taskDefinition)
TaskConfiguratorpopulateContextForEdit in interface TaskConfiguratorpopulateContextForEdit in class AbstractTaskConfiguratorcontext - map to put your context in.taskDefinition - existing task definitionpublic final void populateContextForCreate(@NotNull
Map<String,Object> context)
TaskConfiguratorpopulateContextForCreate in interface TaskConfiguratorpopulateContextForCreate in class AbstractTaskConfiguratorcontext - map to put your context in.public final void validate(@NotNull
ActionParametersMap params,
@NotNull
ErrorCollection errorCollection)
TaskConfiguratorvalidate in interface TaskConfiguratorvalidate in class AbstractTaskConfiguratorparams - - request paramaterserrorCollection - - collection to put any errors in.@NotNull public final Map<String,String> generateTaskConfigMap(@NotNull ActionParametersMap params, @Nullable TaskDefinition previousTaskDefinition)
TaskConfiguratorgenerateTaskConfigMap in interface TaskConfiguratorgenerateTaskConfigMap in class AbstractTaskConfiguratorparams - - request paramaterspreviousTaskDefinition - - the previous immutable TaskDefinition before saving or null if Task is being createdCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.