Package com.atlassian.bamboo.utils.error
Interface ErrorCollection
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AboutAction
,AbstractAdminRestAction
,AbstractBranchTriggerConfigAction
,AbstractContinuableBuildAction
,AbstractCreateDeploymentVersion
,AbstractCreateNewJiraIssueAction
,AbstractDeploymentProjectConfigurationAction
,AbstractDeploymentProjectDetailsAction
,AbstractDeploymentVersionAction
,AbstractDeploymentVersionHistoryAction
,AbstractEntityPagerSupport
,AbstractEnvironmentConfigurationAction
,AbstractExistingLinkedRepositoryAdminAction
,AbstractExistingProjectRepositoryAction
,AbstractJiraIssueAction
,AbstractJiraRelatedAction
,AbstractLinkedRepositoryAction
,AbstractMigrationAction
,AbstractNotificationBulkAction
,AbstractPermissionAction
,AbstractPluginConfigurationAction
,AbstractProjectRepositoryAction
,AbstractRemoteAgentAuthenticationAction
,AbstractRepositoryAction
,AbstractRepositoryBulkAction
,AbstractSetupAction
,AbstractViewCapabilitiesByType
,AccessDeniedAction
,ActionWithAdminOnly
,ActionWithAnonymousSiteAccess
,ActionWithLicensedOnly
,ActionWithNoAnnotation
,ActionWithSysadminOnly
,ActionWithUnrestrictedAccess
,AddNotificationBulkAction
,AddRemoteAgent
,AddSharedLocalBuilderCapability
,AddSharedLocalCapability
,AddSharedRemoteCapability
,AddStageAction
,AdminErrorAction
,AdministerAction
,AdministerAuthors
,AdminUpdateLicenseAction
,AgentConsoleAction
,AgentJsonProvider
,AllBuildsRssFeedAction
,AllElasticInstancesAction
,AllowLicenseUpdateOrShowExpirationInfo
,ArtifactUrlRedirectAction
,AvailableVariablesAction
,Backup
,BambooActionSupport
,BambooAgentInstallerAction
,BambooCancellableAction
,BaseSecurityAnnotatedAction
,BuildActionSupport
,BuildConfigurationSupport
,BuildExpiryAction
,BuildJsonProviderAction
,BuildResultsAction
,BulkEditBuildPermissions
,BulkPlanAction
,CancelChainCreation
,CapabilityConfigurationSupport
,ChainActionSupport
,ChainResultProviderAction
,ChainResultsAction
,ChangeEmail
,ChangeForgottenPassword
,ChangePassword
,CloneDeploymentProject
,CloneEnvironment
,ClusterConfigurationAction
,ConfigurationAction
,ConfigureAgentAssignments
,ConfigureAgentCapability
,ConfigureAgentDetails
,ConfigureAgents
,ConfigureAlias
,ConfigureArtifactHandlers
,ConfigureArtifactStorage
,ConfigureArtifactSubscription
,ConfigureBranches
,ConfigureBuildArtifact
,ConfigureBuildDetails
,ConfigureBuildDocker
,ConfigureBuildMiscellaneousOptions
,ConfigureBuildNotification
,ConfigureBuildPermissions
,ConfigureBuildRequirement
,ConfigureBuildTasks
,ConfigureCapability
,ConfigureCapabilityKey
,ConfigureChainBranchRepositories
,ConfigureChainNotification
,ConfigureChainRepositories
,ConfigureChainTrigger
,ConfigureChainTriggers
,ConfigureCloverPlugin
,ConfigureConcurrentBuilds
,ConfigureDeploymentProject
,ConfigureDeploymentProjectDetails
,ConfigureDeploymentProjectPermissions
,ConfigureDeploymentProjectSpecsRepositories
,ConfigureDeploymentProjectVersioning
,ConfigureElasticCapability
,ConfigureElasticCloudAction
,ConfigureElasticImageConfiguration
,ConfigureElasticImageConfigurationAssignments
,ConfigureElasticInstanceSchedule
,ConfigureElasticInstanceSchedules
,ConfigureEnvironment
,ConfigureEnvironmentAgents
,ConfigureEnvironmentDocker
,ConfigureEnvironmentMiscellaneousSettings
,ConfigureEnvironmentNotifications
,ConfigureEnvironmentPermissions
,ConfigureEnvironmentTasks
,ConfigureEnvironmentTriggers
,ConfigureEphemeralAgents
,ConfigureEphemeralAgentTemplateAssignments
,ConfigureEphemeralAgentTemplateCapability
,ConfigureGlobalBuildHangingDetection
,ConfigureGlobalPermissions
,ConfigureGlobalVariables
,ConfigureGroup
,ConfigureInstantMessagingServer
,ConfigureLinkedRepositories
,ConfigureLocalAgentDetails
,ConfigureLog4jAction
,ConfigureMailServer
,ConfigureNotificationPreferences
,ConfigurePage
,ConfigurePlanDependencies
,ConfigurePlanVariables
,ConfigureProfile
,ConfigureProjectRepositories
,ConfigureProjectSharedCredentials
,ConfigureProjectVariables
,ConfigureQuickFilterAction
,ConfigureQuickFiltersAction
,ConfigureRemoteAgentAuthentications
,ConfigureRepository
,ConfigureSecurity
,ConfigureSharedCapability
,ConfigureSharedCredentials
,ConfigureSharedLocalCapability
,ConfigureSharedRemoteCapability
,ConfigureSpotInstancesAction
,ConfigureSystemNotifications
,ConfigureUser
,ConfigureUserAccessTokens
,ConfigureVariablesForEnvironment
,ConfigureWebhookTemplates
,ContinueBuild
,ControlRemoteAgentsAuthentication
,ControlRemoteAgentsAvailability
,ControlRemoteAgentsTokenVerification
,ConvertLocalToGlobalRepository
,CreateAccessTokensAction
,CreateChain
,CreateChainBranch
,CreateChainRepository
,CreateChainTrigger
,CreateDeploymentProjectDetails
,CreateDeploymentVersion
,CreateEnvironment
,CreateEnvironmentTask
,CreateEnvironmentTrigger
,CreateGlobalVariable
,CreateGroupAction
,CreateInstantMessagingServer
,CreateJob
,CreateLinkedRepository
,CreateNewJiraIssueForBuildResultAction
,CreateNewJiraIssueForTestAction
,CreatePlanVariable
,CreateProject
,CreateProjectRepository
,CreateProjectSharedCredentials
,CreateProjectVariable
,CreateRemoteJiraLinkAction
,CreateRepository
,CreateSharedCredentials
,CreateSpecs
,CreateTask
,CreateTasksChainWizard
,CreateVariableForEnvironment
,CronExpressionGeneratorAction
,DashboardFilter
,DashboardSummaryAction
,DeleteAllNotificationBulkAction
,DeleteBuildFiles
,DeleteBuilds
,DeleteChainAuditLog
,DeleteChainTrigger
,DeleteDeploymentProject
,DeleteDeploymentResult
,DeleteDeploymentVersion
,DeleteEnvironment
,DeleteEnvironmentTask
,DeleteEnvironmentTrigger
,DeleteGitCacheDirectoryAction
,DeleteGlobalVariable
,DeleteLinkedRepository
,DeletePlan
,DeletePlanResults
,DeletePlanVariable
,DeleteProjectRepository
,DeleteProjectSharedCredentials
,DeleteProjectVariable
,DeleteRepository
,DeleteSharedCredentials
,DeleteStageAction
,DeleteTask
,DeleteVariableForEnvironment
,DeploymentProjectAuditLog
,DescribeAgentAvailability
,DescribeAgentAvailability
,DisablePlanBulkAction
,EditAgentCapability
,EditChainBranchDetails
,EditChainBranchNotifications
,EditChainBranchRepository
,EditChainDetails
,EditChainTrigger
,EditCommentAction
,EditDeploymentVersionCommentAction
,EditElasticCapability
,EditEnvironmentTask
,EditEnvironmentTrigger
,EditEphemeralAgentTemplateCapability
,EditJiraIssues
,EditLabelsAction
,EditLinkedRepository
,EditPlanPermissions
,EditProjectDetails
,EditProjectPermissions
,EditProjectRepositories
,EditProjectRepository
,EditProjectSharedCredentials
,EditQuickFilterRuleAction
,EditRemoteAgentAuthenticationIp
,EditRepository
,EditSharedCapability
,EditSharedCredentials
,EditStageAction
,EditTask
,EnablePlanBulkAction
,ErrorAction
,ErrorEventsAction
,ExecuteManualDeployment
,ExecuteRenameAgentCapability
,Export
,ExportWorldToSpecs
,FilterCookieWriterAction
,FinishSetupAction
,FiveOhOh
,ForgotPassword
,GetFingerprintAction
,GetJiraIssueSchemaAction
,GetPkFileAction
,GlobalAdminAction
,GlobalTrackingConfiguration
,GotoAuthors
,GotoBuildResult
,Import
,ImportMavenPlanAction
,ImportMavenPlanCheckoutPomAction
,ImportMavenPlanCreatePlanAction
,JiraRedirectAction
,LabelRssFeedAction
,LinkTestToJiraIssueAction
,ListBuildResults
,ListChainResults
,ListJobsForChain
,ListProjects
,ListRunningInstances
,Login
,Login
,Logout
,Logout
,LogToServer
,ManageElasticInstancesAction
,ManageEphemeralAgentsPodsAction
,ManageEphemeralAgentsTemplate
,ManageEphemeralAgentsTemplates
,ManualBuildBulkAction
,ManualEncryptionAction
,MoveBuilds
,MoveEnvironment
,MoveEnvironmentTask
,MoveJobAction
,MoveRepository
,MoveStageAction
,MoveTask
,ParameterisedManualBuild
,PerformanceStatsAction
,PerformanceStatsJmxAction
,PlanActionSupport
,PlanResultsAction
,PlanStatusHistoryAction
,PlansWithCustomExpirySettings
,Profile
,ProjectActionSupport
,QuarantineSettingsAction
,QuickFilterAction
,ReindexAction
,RemoveAdminErrorAction
,RemoveBuildArtifacts
,RemoveBuildError
,RenameAgentCapability
,RenameDeploymentVersion
,ReorderBuild
,ReplaceTriggersAction
,ReplaceTriggersBulkAction
,RepositorySettingsAction
,RerunBuild
,ResetChainBranchRepository
,ResponsibleAvatars
,RestartBuild
,RssConfigurationInterceptorTest
,RssFeedAction
,SearchUserAction
,SecondaryNodeNotAccessibleAction
,SelectAgentsAction
,SelectBuildConfigurationTab
,SelectSetupStepAction
,SetAgentBuildFilter
,SetFavouriteAction
,SetResultsFilter
,SetupAdminUserAction
,SetupDatabaseAction
,SetupDatabaseConnectionAction
,SetupEmbeddedDatabaseAction
,SetupGeneralConfiguration
,SetupImportDataAction
,SetupLicenseAction
,SetupUpdateLicenseAction
,ShowLatestBuildStatus
,SignupUser
,SimpleErrorCollection
,SimpleErrorCollectionInternal
,StageAction
,StartElasticAgents
,StarterAction
,StopAllElasticAgents
,StopDeployment
,StopElasticAgents
,StopPlan
,SuspendBuild
,SuspendJob
,SvnBulkAction
,SystemErrorList
,SystemInfoAction
,TestOgnlEscaping
,TransitionJiraIssueAction
,TriggerManualBuild
,TriggerRemoteBuild
,TrustedKeysAction
,UnlinkTestToJiraIssueAction
,UpdateDefaultsLocalCapability
,UpdateGlobalVariable
,UpdateLicenseAction
,UpdatePlanVariable
,UpdateProjectVariable
,UpdateResponsibilitiesAction
,UpdateSvnCredentialsBulkAction
,UpdateSvnUrlBulkAction
,UpdateTaskState
,UpdateVariableForEnvironment
,UpdateWebUrlBulkAction
,UserPickerAction
,ViewActivityLog
,ViewAdministrators
,ViewAgent
,ViewAgentAdmin
,ViewAgentDetails
,ViewAgentDetailsAction
,ViewAgentPlanMatrix
,ViewAgentPlanMatrixWizard
,ViewAgentRecentBuildsSummary
,ViewAgentRecentBuildsSummary
,ViewAgents
,ViewAggregatedAuthors
,ViewAggregatedJobPlugins
,ViewAllDeploymentProjects
,ViewAllRepositories
,ViewAuthor
,ViewAuthorChart
,ViewAuthors
,ViewAuthors
,ViewBambooInternals
,ViewBuild
,ViewBuildError
,ViewBuilders
,ViewBuildFiles
,ViewBuildLogs
,ViewBuildNumberChart
,ViewBuildResults
,ViewBuildResultsByJiraKey
,ViewBuildResultsForLabelAction
,ViewBuildResultsSuccessfulTests
,ViewBuildResultsTable
,ViewBuildResultsTableByPlans
,ViewBuildResultsTests
,ViewBuildTaskTypes
,ViewChainArtifacts
,ViewChainAuditLog
,ViewChainBranches
,ViewChainLogs
,ViewChainResult
,ViewChainSummary
,ViewChainTestResults
,ViewChainWebhookResponses
,ViewCloverBuildResults
,ViewCloverCoverageSummary
,ViewCombinedByTimePeriodChart
,ViewDatabaseConfigurationAction
,ViewDeploymentProjects
,ViewDeploymentProjectSpecs
,ViewDeploymentResult
,ViewDeploymentVersion
,ViewDeploymentVersionCommits
,ViewDeploymentVersionJiraIssues
,ViewDeploymentVersionVariables
,ViewDeploymentWebhookResponses
,ViewElasticAgentHistoryAction
,ViewElasticInstanceAction
,ViewEnvironment
,ViewEnvironmentTaskTypes
,ViewEphemeralAgentPod
,ViewEphemeralAgentPodContainerLogs
,ViewEphemeralAgentTemplate
,ViewGadgetUrls
,ViewGlobalAuditLogAction
,ViewInstancesForConfigurationAction
,ViewJdks
,ViewJiraIssueForPlan
,ViewJiraIssues
,ViewLabels
,ViewLinkedRepository
,ViewLog4jAction
,ViewMaven2ChainSummary
,ViewNextBuildResults
,ViewOfflineAgents
,ViewOfflineElasticAgentDetailsAction
,ViewOfflineElasticAgentDetailsAdminAction
,ViewPlanConfiguration
,ViewPlanSpecs
,ViewPlanStatusByJiraKey
,ViewPlanUpdates
,ViewPreviousBuildResults
,ViewProjectPlans
,ViewProjectRepositories
,ViewProjectRepository
,ViewQuarantinedTests
,ViewRejectedRequirements
,ViewRemoteAgentAuthentications
,ViewReport
,ViewReportChart
,ViewResponsibilitiesForUser
,ViewRunningPlans
,ViewTelemetryAction
,ViewTestCaseAction
,ViewTestCaseResultAction
,ViewTestClassResultAction
,ViewTestsSummary
,ViewTestsSummaryForPlan
,ViewTrackingForBuildResult
,ViewUserDetailsAdminAction
,ViewUserSummary
,ViewWebhookResponseDetails
,WebSudoAction
,YamlValidationAction
A very simple interface to collect errors. This is typically used during form validation for collecting field
validation errors (use
addError(String, String)
), and general errors (addErrorMessage(String)
) that
aren't field-specific (eg. permission problems).-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a field-specific error message.void
Adds a new form validation error with a given prefix.void
addErrorCollection
(@NotNull ErrorCollection errors) Populate this ErrorCollection with general and field-specific errors.addErrorMessage
(String message) Add error message relating to system state (not field-specific).addErrorMessage
(String message, Exception e) void
addErrorMessages
(Collection<String> errorMessages) Append new error messages to those already collected.void
addFieldErrors
(Map<String, List<String>> errors) Append new field-specific errors to those already collected.Get all error messages from this error collection.Get all non field-specific error messages.Get all field-specific errors.Get error messages, then get rid of them.int
boolean
Whether any errors (of any type - field-specific or otherwise) have been collected.void
setErrorMessages
(Collection<String> errorMessages) Populate this ErrorCollection with a new set of messages (existing errors are lost).
-
Method Details
-
addError
Add a field-specific error message.- Parameters:
field
- Field name, eg. "assignee"message
- Error message.
-
addError
Adds a new form validation error with a given prefix. ie. prefix of "builder.ant" and field "target" will result in a key of "builder.ant.target"- Parameters:
prefix
- The prefix of the field in . formfield
- The id of the form element in errormessage
- The error message to display to the user
-
addErrorMessage
Add error message relating to system state (not field-specific).- Parameters:
message
- Error message.
-
addErrorMessage
-
getErrorMessages
Collection<String> getErrorMessages()Get all non field-specific error messages.- Returns:
- Collection of error Strings.
-
setErrorMessages
Populate this ErrorCollection with a new set of messages (existing errors are lost).- Parameters:
errorMessages
- List of error messageString
s.
-
getFlushedErrorMessages
Collection<String> getFlushedErrorMessages()Get error messages, then get rid of them.- Returns:
- The (now cleared) error messages.
-
getErrors
Get all field-specific errors.- Returns:
- Map of String: String pairs, eg. {"assignee": "Assignee is required"}
-
addErrorCollection
Populate this ErrorCollection with general and field-specific errors.- Parameters:
errors
- ErrorCollection whose errors/messages we obtain.
-
addErrorMessages
Append new error messages to those already collected.- Parameters:
errorMessages
- Collection of error strings.
-
addFieldErrors
Append new field-specific errors to those already collected.- Parameters:
errors
- AMap
fromString
field names, toString
error messages, orCollection
s ofString
error messages.
-
hasAnyErrors
boolean hasAnyErrors()Whether any errors (of any type - field-specific or otherwise) have been collected.- Returns:
true
if there are errors;false
otherwise.
-
getFieldErrors
-
getTotalErrors
int getTotalErrors() -
getAllErrorMessages
Get all error messages from this error collection. Includes error messages and field errors. Field names are skipped.
-