com.atlassian.jira.util
Interface ErrorCollection

All Known Implementing Classes:
AbstractAddScheme, AbstractAddWorkflowTransitionDescriptor, AbstractAddWorkflowTransitionDescriptorParams, AbstractBrowser, AbstractBulkOperationAction, AbstractBulkOperationDetailsAction, AbstractCommentableAssignableIssue, AbstractCommentableIssue, AbstractConfigureFieldLayout, AbstractConstantAction, AbstractConvertIssue, AbstractCopyScheme, AbstractDeleteConstant, AbstractDeleteScheme, AbstractDeleteWorkflowTransitionDescriptor, AbstractEditConfigurationItemAction, AbstractEditConstant, AbstractEditFieldLayoutItem, AbstractEditFieldLayoutSchemeAction, AbstractEditScheme, AbstractEditWorkflowTransitionDescriptorParams, AbstractFieldLayoutAction, AbstractFieldScreenAction, AbstractFieldScreenSchemeAction, AbstractFieldScreenSchemeItemAction, AbstractGroupToRoleAction, AbstractImportEntity, AbstractImportIssue, AbstractIssueSelectAction, AbstractManageIssueTypeOptionsAction, AbstractMergeAction, AbstractProjectAction, AbstractProjectImportProgress, AbstractProjectImportUsersMissing, AbstractProjectRole, AbstractRoleActorAction, AbstractRoleActors, AbstractSaveConfiguration, AbstractSchemeAware, AbstractSchemeAwareAction, AbstractSchemePickerAction, AbstractSchemePurgeAction, AbstractSchemeToolAction, AbstractSelectProjectScheme, AbstractSetupAction, AbstractTrustedApplicationAction, AbstractUserAction, AbstractViewConstants, AbstractViewIssue, AbstractViewIssueColumns, AbstractViewSchemes, AbstractViewWorkflowMetaAttributes, AbstractWorkflowStep, AbstractWorkflowTransition, AbstractWorkflowTransitionAction, AbstractWorklogAction, AcknowledgeTask, ActivateWorkflow, ActivateWorkflowStep2, AddComment, AddComponent, AddIssueSecurity, AddMailServer, AddNotification, AddPermission, AddPortalPage, AddProject, AddProjectCategory, AddProjectEntity, AddRepository, AddScheme, AddScheme, AddScheme, AddScheme, AddUser, AddVersion, AddWorkflowSchemeEntity, AddWorkflowTransition, AddWorkflowTransitionCondition, AddWorkflowTransitionConditionParams, AddWorkflowTransitionFunctionParams, AddWorkflowTransitionPostFunction, AddWorkflowTransitionValidator, AddWorkflowTransitionValidatorParams, AdjustFavourite, AllUsersRememberMeCookies, AssignIssue, AssociateFieldToScreens, AssociateIssueTypeSchemes, AssociateIssueTypeSchemesWithDefault, AttachFile, AttachScreenshot, AttachTemporaryFile, AvatarPicker, BaseImporter, BrowseComponent, BrowseProject, BrowseProjects, BrowseVersion, BugzillaImport, BulkCancelWizard, BulkChooseOperation, BulkDelete, BulkEdit, BulkEdit1, BulkEditUserGroups, BulkMigrate, BulkMove, BulkWorkflowTransition, CantBrowseCreatedIssue, ChangePassword, CleanData, ClearRememberMeCookies, CloneIssueDetails, CloneWorkflow, CommentAssignIssue, ConfigureCsvMapping, ConfigureCustomField, ConfigureFieldLayout, ConfigureFieldLayoutScheme, ConfigureFieldScreen, ConfigureFieldScreenScheme, ConfigureFogBugzMapping, ConfigureIssueCache, ConfigureIssueTypeOptionScheme, ConfigureIssueTypeScreenScheme, ConfigureLogging, ConfigureOptionScheme, ConfigurePortalPages, ConfigureReport, ConfirmInstallationWithLicense, ConfirmNewInstallationWithOldLicense, ConvertIssueToSubTask, ConvertSubTaskToIssue, CopyFieldLayout, CopyFieldLayoutScheme, CopyScheme, CopyScheme, CopyScheme, CopyScheme, CreateCustomField, CreateDraftWorkflow, CreateIssue, CreateIssueDetails, CreateSubTaskIssue, CreateSubTaskIssueDetails, CreateWorklog, CsvImporter, CurrentUsersList, Dashboard, DateRangePicker, DeleteAttachment, DeleteAvatar, DeleteComment, DeleteComponent, DeleteCustomField, DeleteFilter, DeleteGroup, DeleteIssue, DeleteIssueSecurity, DeleteIssueSecurityLevel, DeleteIssueType, DeleteLinkType, DeleteMailServer, DeleteNotification, DeleteOptionScheme, DeletePermission, DeletePortalPage, DeletePriority, DeleteProject, DeleteProjectCategory, DeleteProjectEntity, DeleteProjectRole, DeleteRepository, DeleteResolution, DeleteScheme, DeleteScheme, DeleteScheme, DeleteScheme, DeleteScheme, DeleteStatus, DeleteSubTaskIssueType, DeleteTrustedApplication, DeleteUser, DeleteUserProperty, DeleteVersion, DeleteWorkflowSchemeEntity, DeleteWorkflowStep, DeleteWorkflowTransitionCondition, DeleteWorkflowTransitionPostFunction, DeleteWorkflowTransitions, DeleteWorkflowTransitionValidator, DeleteWorklog, DisableSubTasks, EditAnnouncementBanner, EditApplicationProperties, EditAttachmentSettings, EditBasicConfig, EditComment, EditComponent, EditCustomField, EditCustomFieldDefaults, EditCustomFieldOptions, EditDefaultDashboard, EditDefaultFieldLayoutItem, EditFieldLayout, EditFieldLayoutItem, EditFieldLayoutItemRenderer, EditFieldLayoutItemRendererConfirmation, EditFieldLayoutScheme, EditFieldScreen, EditFieldScreenScheme, EditFieldScreenSchemeItem, EditFilter, EditIssue, EditIssueSecurities, EditIssueType, EditIssueTypeScreenScheme, EditLabels, EditLinkType, EditListener, EditLookAndFeel, EditNotifications, EditPermissions, EditPortalPage, EditPriority, EditProfile, EditProject, EditProjectCategory, EditProjectEntity, EditProjectRole, EditResolution, EditScheme, EditScheme, EditScheme, EditScheme, EditService, EditStatus, EditSubTaskIssueTypes, EditTrustedApplication, EditUser, EditUserDefaultSettings, EditUserGroups, EditUserProjectRoles, EditUserProperties, EditUserProperty, EditVersionArchives, EditVersionDetails, EditVersionReleases, EditWorkflow, EditWorkflowSchemeEntities, EditWorkflowStep, EditWorkflowTransition, EditWorkflowTransitionConditionParams, EditWorkflowTransitionPostFunctionParams, EditWorkflowTransitionValidatorParams, EnterpriseSelectProjectRepository, FavouriteFilters, FilterPickerPopup, FilterSubscription, FogBugzImport, ForgotLoginDetails, FuncTestWriter, GenericEditProfile, GlobalPermissions, GroupBrowser, GroupPickerBrowser, GroupRoleActorAction, IconPicker, ImportAll, ImportWorkflow, IndexAdminImpl, IndexOptimize, IntegrityChecker, IssueActionSupport, IssueNavigator, IssuePicker, JellyRunner, JiraSupportRequest, JiraWebActionSupport, JiraWizardActionSupport, LDAPConfigurer, LinkExistingIssue, ListEventTypes, ListWorkflows, Logout, MailQueueAdmin, MailServerActionSupport, ManageAttachments, ManageConfigurationScheme, ManageFilters, ManageIssueTypeSchemes, ManageLinks, ManageSubscriptions, ManageSubTasks, ManageTrackbacks, ManageVersions, ManageWatchers, MantisImport, MapColumns, MapCustomFields, MapIssueTypes, MapPriorities, MapResolutions, MapStatuses, MapUsers, MapValidateImport, MergeVersions, MigrateIssueTypes, MoveIssue, MoveIssueConfirm, MoveIssueSubtasks, MoveIssueUpdateFields, MoveIssueUpdateWorkflow, MoveSubTask, MoveSubTaskChooseOperation, MoveSubTaskParent, ProjectActionSupport, ProjectEmail, ProjectImportBackupOverviewProgress, ProjectImportMappingProgress, ProjectImportMissingMandatoryUsersCannotCreate, ProjectImportMissingMandatoryUsersExtMgmt, ProjectImportMissingOptionalUsersCannotCreate, ProjectImportMissingOptionalUsersExtMgmt, ProjectImportMissingUsersAutoCreate, ProjectImportProgress, ProjectImportResultsAction, ProjectImportSelectBackup, ProjectImportSelectProject, ProjectImportSummary, ProjectRoleUsageAction, PublishDraftWorkflow, QuickSearch, RecentIssueHistory, ReleaseNote, RepositoryActionSupport, RepositoryTest, ResetFailedLoginCount, ResetPassword, RestoreDefaultDashboard, RunPortlet, SaveAsFilter, SaveConfiguration, SaveFilter, SchedulerAdmin, SchemeAwareIssueSecurityAction, SchemeAwareNotificationAction, SchemeAwarePermissionAction, SchemeAwareWorkflowAction, SchemeComparisonPickerAction, SchemeComparisonToolAction, SchemeGroupToRoleMapperAction, SchemeGroupToRolePickerAction, SchemeGroupToRoleResultAction, SchemeGroupToRoleTransformerAction, SchemeMergeAction, SchemeMergePreviewAction, SchemeMergeResultAction, SchemePurgeToolPreviewAction, SchemePurgeToolResultsAction, SchemePurgeTypePickerAction, SchemeToolsAction, SchemeTypePickerAction, SearchDescriptionEnabledAction, SelectComponentAssignees, SelectFieldLayoutScheme, SelectIssueTypeSchemeForProject, SelectIssueTypeScreenScheme, SelectProjectCategory, SelectProjectIssueSecurityScheme, SelectProjectPermissionScheme, SelectProjectRepository, SelectProjectScheme, SelectProjectSecuritySchemeStep2, SelectProjectWorkflowScheme, SelectProjectWorkflowSchemeStep2, SelectProjectWorkflowSchemeStep3, SelectScreenScheme, SendBulkMail, SendTestMail, ServiceExecutor, SessionTimeoutMessage, SetGlobalEmailPreference, SetPassword, SetSelectedIssue, Setup, Setup2, Setup2Existing, Setup3, SetupComplete, SetupDisplayLocaleInfo, SetupImport, ShowConstantsHelp, ShowTimeTrackingHelp, Signup, SimpleErrorCollection, SimpleWorkflowAction, TaskAdmin, TimeTrackingAdmin, TrackbackAdmin, UpdateIssueFields, UpdateMailServer, UpdateRepository, UpdateUserPreferences, UpdateWorklog, UploadXmlFile, UserBrowser, UserPickerBrowser, UserProperty, UserRememberMeCookies, UserRoleActorAction, ViewApplicationProperties, ViewAttachmentSettings, ViewCustomFields, ViewDefaultProjectRoleActors, ViewFieldLayouts, ViewFieldScreens, ViewFieldScreenSchemes, ViewGroup, ViewIssue, ViewIssueColumns, ViewIssueFields, ViewIssueTypes, ViewIssueTypeScreenSchemes, ViewKeyboardShortcuts, ViewLicense, ViewLinkTypes, ViewListeners, ViewLogging, ViewLookAndFeel, ViewMemoryInfo, ViewPlugins, ViewPriorities, ViewProfile, ViewProject, ViewProjectRoleActors, ViewProjectRoles, ViewProjects, ViewResolutions, ViewSchemes, ViewSchemes, ViewSchemes, ViewSchemes, ViewSchemes, ViewSearchRequestIssueColumns, ViewServices, ViewStatuses, ViewSystemInfo, ViewTranslations, ViewTrustedApplications, ViewUpgradeHistory, ViewUser, ViewUserDefaultSettings, ViewUserHover, ViewUserIssueColumns, ViewUserProjectRoles, ViewVoters, ViewWorkflowStep, ViewWorkflowStepMetaAttributes, ViewWorkflowSteps, ViewWorkflowTransition, ViewWorkflowTransitionConditionalResult, ViewWorkflowTransitionMetaAttributes, ViewWorkflowXml, VoteOrWatchIssue, WikiRendererHelpAction, WorkflowUIDispatcher, XmlBackup, XsrfErrorAction

public interface ErrorCollection

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
 void addError(java.lang.String field, java.lang.String message)
          Add a field-specific error message.
 void addErrorCollection(ErrorCollection errors)
          Populate this ErrorCollection with general and field-specific errors.
 void addErrorMessage(java.lang.String message)
          Add error message relating to system state (not field-specific).
 void addErrorMessages(java.util.Collection<java.lang.String> errorMessages)
          Append new error messages to those already collected.
 void addErrors(java.util.Map<java.lang.String,java.lang.String> errors)
          Append new field-specific errors to those already collected.
 java.util.Collection<java.lang.String> getErrorMessages()
          Get all non field-specific error messages.
 java.util.Map<java.lang.String,java.lang.String> getErrors()
          Get all field-specific errors.
 java.util.Collection<java.lang.String> getFlushedErrorMessages()
          Get error messages, then get rid of them.
 boolean hasAnyErrors()
          Whether any errors (of any type - field-specific or otherwise) have been collected.
 void setErrorMessages(java.util.Collection<java.lang.String> errorMessages)
          Populate this ErrorCollection with a new set of messages (existing errors are lost).
 

Method Detail

addError

void addError(java.lang.String field,
              java.lang.String message)
Add a field-specific error message.

Parameters:
field - Field name, eg. "assignee"
message - Error message.

addErrorMessage

void addErrorMessage(java.lang.String message)
Add error message relating to system state (not field-specific).

Parameters:
message - Error message.

getErrorMessages

java.util.Collection<java.lang.String> getErrorMessages()
Get all non field-specific error messages.

Returns:
Collection of error Strings.

setErrorMessages

void setErrorMessages(java.util.Collection<java.lang.String> errorMessages)
Populate this ErrorCollection with a new set of messages (existing errors are lost).

Parameters:
errorMessages - List of error message Strings.

getFlushedErrorMessages

java.util.Collection<java.lang.String> getFlushedErrorMessages()
Get error messages, then get rid of them.

Returns:
The (now cleared) error messages.

getErrors

java.util.Map<java.lang.String,java.lang.String> getErrors()
Get all field-specific errors.

Returns:
Map of String: String pairs, eg. {"assignee": "Assignee is required"}

addErrorCollection

void addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors.

Parameters:
errors - ErrorCollection whose errors/messages we obtain.

addErrorMessages

void addErrorMessages(java.util.Collection<java.lang.String> errorMessages)
Append new error messages to those already collected.

Parameters:
errorMessages - Collection of error strings.

addErrors

void addErrors(java.util.Map<java.lang.String,java.lang.String> errors)
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.


Copyright © 2002-2010 Atlassian. All Rights Reserved.