Package com.atlassian.jira.util
Interface ErrorCollection
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
A11yPersonalSettings
,AboutPage
,AbstractAddScheme
,AbstractAddWorkflowTransitionDescriptor
,AbstractAddWorkflowTransitionDescriptorParams
,AbstractAdministerFilter
,AbstractBrowser
,AbstractBulkOperationAction
,AbstractBulkOperationDetailsAction
,AbstractBulkWatchOperationAction
,AbstractCommentableAssignableIssue
,AbstractCommentableIssue
,AbstractConfigureFieldLayout
,AbstractConstantAction
,AbstractConvertIssue
,AbstractCopyScheme
,AbstractDashboardAdministration
,AbstractDeleteConstant
,AbstractDeleteScheme
,AbstractDeleteWorkflowTransitionDescriptor
,AbstractEditConfigurationItemAction
,AbstractEditConstant
,AbstractEditFieldLayoutItem
,AbstractEditFieldLayoutSchemeAction
,AbstractEditScheme
,AbstractEditWorkflowTransitionDescriptorParams
,AbstractFieldScreenSchemeAction
,AbstractFieldScreenSchemeItemAction
,AbstractFilterAction
,AbstractImportEntity
,AbstractImportIssue
,AbstractIssueLinkAction
,AbstractIssueSelectAction
,AbstractManagableOptionsAction
,AbstractManageIssueTypeOptionsAction
,AbstractManagePrioritiesAction
,AbstractPage
,AbstractPermissionCheckAction
,AbstractPluggableTabPanelAction
,AbstractPrioritySchemesAction
,AbstractProjectAction
,AbstractProjectAndSchemeAwareAction
,AbstractProjectImportProgress
,AbstractProjectImportUsersMissing
,AbstractProjectRole
,AbstractRoleActorAction
,AbstractSchemeAware
,AbstractSchemeAwareAction
,AbstractSelectProjectScheme
,AbstractSetupAction
,AbstractTrustedApplicationAction
,AbstractViewConstants
,AbstractViewIssue
,AbstractViewSchemes
,AbstractWorkflowAction
,AbstractWorkflowDraftResultAction
,AbstractWorkflowStep
,AbstractWorkflowTransition
,AbstractWorkflowTransitionAction
,AbstractWorklogAction
,AcknowledgeTask
,AddComment
,AddComponent
,AddFieldConfiguration
,AddFieldConfigurationScheme
,AddFieldScreenSchemeItem
,AddIssueSecurity
,AddIssueTypeScreenScheme
,AddIssueTypeScreenScreenSchemeAssociation
,AddIssueTypeToFieldConfigurationAssociation
,AddNewIssueTypeToScheme
,AddNotification
,AddPermission
,AddPortalPage
,AddPriorityScheme
,AddProjectCategory
,AddScheme
,AddScheme
,AddScheme
,AddScheme
,AddUser
,AddVersion
,AddWebLink
,AddWorkflowTransition
,AddWorkflowTransitionCondition
,AddWorkflowTransitionConditionParams
,AddWorkflowTransitionFunctionParams
,AddWorkflowTransitionPostFunction
,AddWorkflowTransitionValidator
,AddWorkflowTransitionValidatorParams
,AdjustFavourite
,AdminOnlyPermissionCheckAction
,AdvancedApplicationProperties
,AllUsersRememberMeCookies
,AnonymizeUser
,AnonymousSiteAccessPermissionCheckAction
,ApplicationAccess
,ArchiveIssue
,ArchiveProject
,AroundTheWorldPage
,AssignIssue
,AssociatedProjectsForCustomField
,AssociatedScreensForCustomField
,AssociateFieldToScreens
,AssociateIssueTypeSchemes
,AssociateIssueTypeSchemesWithDefault
,AssociatePriorityScheme
,AttachFile
,AttachTemporaryFile
,BasicJiraCreditsPage
,BrowseArchivedIssues
,BrowseProjects
,BulkArchive
,BulkCancelWizard
,BulkChooseOperation
,BulkDelete
,BulkEdit
,BulkEdit1
,BulkEditUserGroups
,BulkMigrate
,BulkMove
,BulkOperationProgress
,BulkUnwatch
,BulkWatch
,BulkWorkflowTransition
,CantBrowseCreatedIssue
,ChangePassword
,ChangeSharedDashboardOwner
,ChangeSharedFilterOwner
,ClearRememberMeCookies
,CloneIssueDetails
,CloneWorkflow
,CommentAssignIssue
,CommittedResponseExceptionThrowingAction
,ConfigureCrowdServer
,ConfigureCustomField
,ConfigureField
,ConfigureFieldLayout
,ConfigureFieldLayoutScheme
,ConfigureFieldScreen
,ConfigureFieldScreenScheme
,ConfigureIssueTypeOptionScheme
,ConfigureIssueTypeScreenScheme
,ConfigureLogging
,ConfigureOptionScheme
,ConfigurePortalPages
,ConfigurePriorityScheme
,ConfigureReport
,ConfirmNewInstallationWithOldLicense
,ContactAdministrators
,ConvertIssueToSubTask
,ConvertSubTaskToIssue
,CopyFieldLayout
,CopyFieldLayoutScheme
,CopyPriorityScheme
,CopyScheme
,CopyScheme
,CopyScheme
,CopyScheme
,CreateCustomField
,CreateDraftWorkflow
,CreateIssue
,CreateIssueDetails
,CreateSubTaskIssue
,CreateSubTaskIssueDetails
,CreateWorklog
,CurrentUsersList
,Dashboard
,DeleteAttachment
,DeleteComment
,DeleteCustomField
,DeleteFilter
,DeleteGroup
,DeleteIssue
,DeleteIssueSecurity
,DeleteIssueSecurityLevel
,DeleteIssueType
,DeleteJobRunner
,DeleteLink
,DeleteLinkType
,DeleteNotification
,DeleteOptionScheme
,DeletePermission
,DeletePortalPage
,DeletePriority
,DeletePriorityScheme
,DeleteProject
,DeleteProjectCategory
,DeleteProjectRole
,DeleteRemoteIssueLink
,DeleteResolution
,DeleteScheme
,DeleteScheme
,DeleteScheme
,DeleteScheme
,DeleteScheme
,DeleteSharedDashboard
,DeleteSharedFilter
,DeleteStatus
,DeleteSubTaskIssueType
,DeleteTrustedApplication
,DeleteUser
,DeleteUserProperty
,DeleteWorkflowStep
,DeleteWorkflowTransitionCondition
,DeleteWorkflowTransitionPostFunction
,DeleteWorkflowTransitions
,DeleteWorkflowTransitionValidator
,DeleteWorklog
,DisableSubTasks
,EditAnnouncementBanner
,EditApplicationProperties
,EditAttachmentSettings
,EditAvatarSettings
,EditComment
,EditCrowdApplication
,EditCustomField
,EditCustomFieldDefaults
,EditCustomFieldOptions
,EditCustomFieldUserPickerFilter
,EditDarkFeatures
,EditDefaultDashboard
,EditDefaultFieldLayoutItem
,EditFieldLayout
,EditFieldLayoutItem
,EditFieldLayoutItemRenderer
,EditFieldLayoutItemRendererConfirmation
,EditFieldLayoutScheme
,EditFieldScreen
,EditFieldScreenScheme
,EditFieldScreenSchemeItem
,EditFilter
,EditIndexRecoverySettings
,EditIssue
,EditIssueSecurities
,EditIssueType
,EditIssueTypeScreenScheme
,EditLabels
,EditLevel
,EditLinkType
,EditListener
,EditLookAndFeel
,EditNestedGroups
,EditNotifications
,EditPortalPage
,EditPriority
,EditPriorityScheme
,EditProfile
,EditProject
,EditProjectCategory
,EditProjectLeadAndDefaultAssignee
,EditProjectRole
,EditReplicationSettings
,EditResolution
,EditScheme
,EditScheme
,EditScheme
,EditService
,EditStatus
,EditSubscription
,EditSubTaskIssueTypes
,EditTrustedApplication
,EditUser
,EditUserDefaultSettings
,EditUserGroups
,EditUserProjectRoles
,EditUserProperties
,EditUserProperty
,EditVersionPickerCustomFieldOptionsOrder
,EditWorkflow
,EditWorkflowDispatcher
,EditWorkflowScheme
,EditWorkflowStep
,EditWorkflowTransition
,EditWorkflowTransitionConditionParams
,EditWorkflowTransitionPostFunctionParams
,EditWorkflowTransitionValidatorParams
,EmailTemplatesSettings
,Error404
,Export
,FavouriteFilters
,FilterPickerPopup
,FirstUseFlowAction
,ForgotLoginDetails
,GenericEditProfile
,GlobalPermissions
,GroupBrowser
,GroupPickerBrowser
,GroupRoleActorAction
,IconPicker
,ImportAll
,ImportResult
,ImportWorkflow
,IndexAdminImpl
,IndexOptimize
,IndexProject
,IntegrityChecker
,IssueActionSupport
,IssuePicker
,JiraWebActionSupport
,JiraWizardActionSupport
,JmxMonitoringAction
,LandingPage
,LeaveAdmin
,LegendOfJiraPage
,LicensedOnlyPermissionCheckAction
,LinkConfluencePage
,LinkExistingIssue
,LinkJiraIssue
,ListEventTypes
,ListWorkflows
,Logout
,MailQueueAdmin
,ManageAttachments
,ManageCacheInstrumentation
,ManageConfigurationScheme
,ManageFilters
,ManageIssueTypeSchemes
,ManageSubscriptions
,ManageSubTasks
,ManageTerminology
,ManageWatchers
,MapColumns
,MapCustomFields
,MapIssueTypes
,MapPriorities
,MapResolutions
,MapStatuses
,MapUsers
,MapValidateImport
,MigrateIssueTypes
,MigratePrioritySchemeAction
,MigratePrioritySchemeProgress
,MockAbstractBrowser
,MockAction
,MoveIssue
,MoveIssueConfirm
,MoveIssueSubtasks
,MoveIssueUpdateFields
,MoveIssueUpdateWorkflow
,MoveSubTask
,MoveSubTaskChooseOperation
,MoveSubTaskParent
,MyJiraHome
,OldEditPermissions
,PreparedReferenceAction
,ProjectActionSupport
,ProjectEmail
,ProjectImportBackupOverviewProgress
,ProjectImportMappingProgress
,ProjectImportMissingMandatoryUsersCannotCreate
,ProjectImportMissingMandatoryUsersExtMgmt
,ProjectImportMissingOptionalUsersCannotCreate
,ProjectImportMissingOptionalUsersExtMgmt
,ProjectImportMissingUsersAutoCreate
,ProjectImportProgress
,ProjectImportResultsAction
,ProjectImportSelectBackup
,ProjectImportSelectProject
,ProjectImportSummary
,ProjectPermissions
,ProjectRoleUsageAction
,PublishDraftWorkflow
,PulpRenderAction
,QuickSearch
,RecentIssueHistory
,ReferenceAction
,ReferenceComponentAction
,ReferenceComponentImportAction
,ReferenceModuleTypeAction
,ReferenceResourceAction
,ReferenceSoyAction
,ReleaseNote
,ReplicationSettings
,ResetFailedLoginCount
,ResetPassword
,ResourcePhaseCheckpointsAction
,RestoreDefaultDashboard
,RestoreIssue
,SchedulerAdmin
,SchemeAwareIssueSecurityAction
,SchemeAwareNotificationAction
,SchemeAwarePermissionAction
,SearchDescriptionEnabledAction
,SelectComponentAssignees
,SelectFieldLayoutScheme
,SelectIssueTypeSchemeForProject
,SelectIssueTypeScreenScheme
,SelectProjectCategory
,SelectProjectIssueSecurityScheme
,SelectProjectPermissionScheme
,SelectProjectScheme
,SelectProjectSecuritySchemeStep2
,SelectProjectWorkflowScheme
,SelectProjectWorkflowSchemeStep2
,SelectProjectWorkflowSchemeStep3
,SendBulkMail
,ServiceExecutor
,SessionTimeoutMessage
,SetGlobalEmailPreference
,SetPassword
,Settings
,SetupAccount
,SetupAdminAccount
,SetupApplicationProperties
,SetupComplete
,SetupDatabase
,SetupFinishing
,SetupImport
,SetupLicense
,SetupMailNotifications
,ShowConstantsHelp
,ShowTimeTrackingHelp
,Signup
,SimpleErrorCollection
,SimpleWorkflowAction
,SiteDarkFeatures
,SystemAdminPermissionCheckAction
,TerminologyHelp
,TimeTrackingAdmin
,TranslateCustomField
,UnrestrictedAccessPermissionCheckAction
,UpdateMyJiraHome
,UpdateUserPreferences
,UpdateWorklog
,UploadXmlFile
,UserBrowser
,UserPickerBrowser
,UserProperty
,UserRememberMeCookies
,UserRoleActorAction
,VersionAction
,ViewApplicationProperties
,ViewAttachmentSettings
,ViewAvatarSettings
,ViewCacheDetails
,ViewCachesByRequest
,ViewCacheStats
,ViewCustomFields
,ViewDefaultProjectRoleActors
,ViewEventAction
,ViewFieldLayouts
,ViewFieldScreens
,ViewFieldScreenSchemes
,ViewGroup
,ViewInstrumentation
,ViewIssueFields
,ViewIssueTypes
,ViewIssueTypeScreenSchemes
,ViewKeyboardShortcuts
,ViewLinkTypes
,ViewListeners
,ViewLogging
,ViewMemoryInfo
,ViewPriorities
,ViewPrioritySchemes
,ViewPrioritySchemesForPriority
,ViewProfile
,ViewProject
,ViewProjectRoleActors
,ViewProjectRoles
,ViewProjects
,ViewRecords
,ViewResolutions
,ViewSchemes
,ViewSchemes
,ViewSchemes
,ViewSchemes
,ViewSchemes
,ViewServices
,ViewSharedDashboards
,ViewSharedFilters
,ViewStatuses
,ViewSubtaskFragmentAction
,ViewSystemFields
,ViewSystemInfo
,ViewTranslations
,ViewTrustedApplications
,ViewUpgradeHistory
,ViewUpgrades
,ViewUris
,ViewUser
,ViewUserDefaultSettings
,ViewUserHover
,ViewUserPreferences
,ViewUserProjectRoles
,ViewVoters
,ViewWorkflowsForStatus
,ViewWorkflowStep
,ViewWorkflowStepMetaAttributes
,ViewWorkflowSteps
,ViewWorkflowTransition
,ViewWorkflowTransitionConditionalResult
,ViewWorkflowTransitionMetaAttributes
,ViewWorkflowXml
,VoteOrWatchIssue
,WebSudoAuthenticate
,WikiRendererHelpAction
,WorkflowUIDispatcher
,XmlBackup
,XsrfErrorAction
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).-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a field-specific error message.void
addError
(String field, String message, ErrorCollection.Reason reason) Add a field-specific error message.void
addErrorCollection
(ErrorCollection errors) Populate this ErrorCollection with general and field-specific errors.void
addErrorMessage
(String message) Add error message relating to system state (not field-specific).void
addErrorMessage
(String message, ErrorCollection.Reason reason) Add error message relating to system state (not field-specific), and a reason.void
addErrorMessages
(Collection<String> errorMessages) Append new error messages to those already collected.void
Append new field-specific errors to those already collected.void
addReason
(ErrorCollection.Reason reason) Add a reason why the function has not been performed.void
addReasons
(Set<ErrorCollection.Reason> reasons) Add reasons why the function has not been performed.Get all non field-specific error messages.Get all field-specific errors.Get error messages, then get rid of them.A set of well known reasons why the function has not been performed.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).void
setReasons
(Set<ErrorCollection.Reason> reasons) Set reasons why the function has not been performed.
-
Method Details
-
addError
Add a field-specific error message.- Parameters:
field
- Field name, eg. "assignee"message
- Error message.
-
addError
Add a field-specific error message.- Parameters:
field
- Field name, eg. "assignee"message
- Error message.reason
- Reason for the error.
-
addErrorMessage
Add error message relating to system state (not field-specific).- Parameters:
message
- Error message.
-
addErrorMessage
Add error message relating to system state (not field-specific), and a reason.- Parameters:
message
- Error message.reason
- Reason for the error.
-
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.
-
addErrors
Append new field-specific errors to those already collected.- Parameters:
errors
- of String: String pairs, eg. {"assignee": "Assignee is required"}
-
hasAnyErrors
boolean hasAnyErrors()Whether any errors (of any type - field-specific or otherwise) have been collected.- Returns:
- true if any errors (of any type - field-specific or otherwise) have been collected.
-
addReasons
Add reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Parameters:
reasons
- a set of well known reasons why the function has not been performed.
-
addReason
Add a reason why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Parameters:
reason
- a well known reasons why the function has not been performed.
-
setReasons
Set reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Parameters:
reasons
- a set of well known reasons why the function has not been performed.
-
getReasons
Set<ErrorCollection.Reason> getReasons()A set of well known reasons why the function has not been performed. The reasons may be used by callers of services to set return codes etc. for example in REST services.- Returns:
- a set of well known reasons why the function has not been performed.
-