com.atlassian.jira.util
Interface ErrorCollection

All Known Implementing Classes:
AbstractAddPortlet, AbstractAddScheme, AbstractAddWorkflowTransitionDescriptor, AbstractAddWorkflowTransitionDescriptorParams, AbstractBrowser, AbstractBulkOperationAction, AbstractBulkOperationDetailsAction, AbstractCommentableAssignableIssue, AbstractCommentableIssue, AbstractConfigureFieldLayout, AbstractConfigurePortal, 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, AbstractUserReport, AbstractViewConstants, AbstractViewIssue, AbstractViewIssueColumns, AbstractViewSchemes, AbstractViewWorkflowMetaAttributes, AbstractWorkflowStep, AbstractWorkflowTransition, AbstractWorkflowTransitionAction, AbstractWorklogAction, AcknowledgeTask, ActivateWorkflow, ActivateWorkflowStep2, AddComment, AddComponent, AddDefaultPortlet, AddIssueSecurity, AddMailServer, AddNotification, AddPermission, AddPortalPage, AddPortlet, AddProject, AddProjectCategory, AddProjectEntity, AddRepository, AddScheme, AddScheme, AddScheme, AddScheme, AddUser, AddVersion, AddWorkflowSchemeEntity, AddWorkflowTransition, AddWorkflowTransitionCondition, AddWorkflowTransitionConditionParams, AddWorkflowTransitionFunctionParams, AddWorkflowTransitionPostFunction, AddWorkflowTransitionValidator, AddWorkflowTransitionValidatorParams, AdjustFavourite, Administrators, AssignIssue, AssociateFieldToScreens, AssociateIssueTypeSchemes, AssociateIssueTypeSchemesWithDefault, AttachFile, AttachmentsAdmin, BaseImporter, Browser, BugzillaImport, BulkCancelWizard, BulkChooseOperation, BulkDelete, BulkEdit, BulkEdit1, BulkEditUserGroups, BulkMigrate, BulkMove, BulkWorkflowTransition, CantBrowseCreatedIssue, ChangePassword, CleanData, CloneIssueDetails, CloneWorkflow, CommentAssignIssue, ComponentBrowser, ConfigureCsvMapping, ConfigureCustomField, ConfigureDefaultPortal, ConfigureFieldLayout, ConfigureFieldLayoutScheme, ConfigureFieldScreen, ConfigureFieldScreenScheme, ConfigureFogBugzMapping, ConfigureIssueCache, ConfigureIssueTypeOptionScheme, ConfigureIssueTypeScreenScheme, ConfigureLogging, ConfigureOptionScheme, ConfigurePortal, ConfigurePortalPages, ConfigureReport, ConfirmInstallationWithLicense, ConfirmNewInstallationWithOldLicense, ConvertIssueToSubTask, ConvertSubTaskToIssue, CopyFieldLayout, CopyFieldLayoutScheme, CopyScheme, CopyScheme, CopyScheme, CopyScheme, CreateCustomField, CreateDraftWorkflow, CreateIssue, CreateIssueDetails, CreateSubTaskIssue, CreateSubTaskIssueDetails, CreateWorklog, CsvImporter, Dashboard, DateRangePicker, DeleteAttachment, DeleteComment, DeleteComponent, DeleteCustomField, DeleteGroup, DeleteIssue, DeleteIssueSecurity, DeleteIssueSecurityLevel, DeleteIssueType, DeleteLinkType, DeleteMailServer, DeleteNotification, DeleteOptionScheme, DeletePermission, DeletePortalPage, DeletePortlet, 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, EditDefaultFieldLayoutItem, EditFieldLayout, EditFieldLayoutItem, EditFieldLayoutItemRenderer, EditFieldLayoutItemRendererConfirmation, EditFieldLayoutScheme, EditFieldScreen, EditFieldScreenScheme, EditFieldScreenSchemeItem, EditFilter, EditIssue, EditIssueSecurities, EditIssueType, EditIssueTypeScreenScheme, EditLinkType, EditListener, EditLookAndFeel, EditNotifications, EditPermissions, EditPortalPage, EditPriority, EditProfile, EditProject, EditProjectCategory, EditProjectEntity, EditProjectRole, EditResolution, EditScheme, EditScheme, EditScheme, EditScheme, EditService, EditStatus, EditSubTaskIssue, EditSubTaskIssueTypes, EditTrustedApplication, EditUser, EditUserDefaultSettings, EditUserGroups, EditUserProjectRoles, EditUserProperties, EditUserProperty, EditVersionArchives, EditVersionDetails, EditVersionReleases, EditWorkflow, EditWorkflowSchemeEntities, EditWorkflowStep, EditWorkflowTransition, EditWorkflowTransitionConditionParams, EditWorkflowTransitionPostFunctionParams, EditWorkflowTransitionValidatorParams, EnterpriseSelectProjectRepository, ExportAll, FavouriteFilters, FilterPickerPopup, FilterSubscription, FogBugzImport, ForgotPassword, FuncTestWriter, GenericEditProfile, GlobalPermissions, GroupBrowser, GroupPickerBrowser, GroupRoleActorAction, IconPicker, IDashboard, ImportAll, ImportWorkflow, IndexAdminImpl, IndexOptimize, IntegrityChecker, IssueActionSupport, IssueNavigator, IssuePicker, JellyRunner, JiraSupportRequest, JiraWebActionSupport, JiraWizardActionSupport, JiraXMLImport, 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, MoveIssueUpdateFields, MoveIssueUpdateWorkflow, MoveSubTask, MoveSubTaskChooseOperation, MoveSubTaskParent, PersonalBrowser, ProjectActionSupport, ProjectEmail, ProjectImportBackupOverviewProgress, ProjectImportMappingProgress, ProjectImportMissingMandatoryUsersCannotCreate, ProjectImportMissingMandatoryUsersExtMgmt, ProjectImportMissingOptionalUsersCannotCreate, ProjectImportMissingOptionalUsersExtMgmt, ProjectImportMissingUsersAutoCreate, ProjectImportProgress, ProjectImportResultsAction, ProjectImportSelectBackup, ProjectImportSelectProject, ProjectImportSummary, ProjectRoleUsageAction, PublishDraftWorkflow, QuickSearch, RecentIssueHistory, ReleaseNote, RepositoryActionSupport, RepositoryTest, RestoreDefaultDashboard, RunPortlet, SaveAsFilter, SaveConfiguration, SaveDefaultConfiguration, 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, SessionTimeoutMessage, SetGlobalEmailPreference, SetPassword, Setup, Setup2, Setup2Existing, Setup3, SetupComplete, SetupDisplayLocaleInfo, SetupImport, SetupLicense, SetupPortal, ShowConstantsHelp, Signup, SimpleErrorCollection, SimpleWorkflowAction, TaskAdmin, TimeTrackingAdmin, TrackbackAdmin, UpdateIssueFields, UpdateMailServer, UpdateRepository, UpdateUserPreferences, UpdateWorklog, UploadXmlFile, UserBrowser, UserPickerBrowser, UserProperty, UserRoleActorAction, UserVotes, UserWatches, VersionBrowser, ViewApplicationProperties, ViewAttachmentSettings, ViewCustomFields, ViewDefaultProjectRoleActors, ViewFieldLayouts, ViewFieldScreens, ViewFieldScreenSchemes, ViewGroup, ViewIssue, ViewIssueColumns, ViewIssueFields, ViewIssueTypes, ViewIssueTypeScreenSchemes, ViewLicense, ViewLinkTypes, ViewListeners, ViewLogging, ViewLookAndFeel, ViewPlugins, ViewPriorities, ViewProfile, ViewProject, ViewProjectRoleActors, ViewProjectRoles, ViewProjects, ViewResolutions, ViewSchemes, ViewSchemes, ViewSchemes, ViewSchemes, ViewSchemes, ViewSearchRequestIssueColumns, ViewServices, ViewStatuses, ViewSystemInfo, ViewTranslations, ViewTrustedApplications, ViewUser, ViewUserDefaultSettings, ViewUserIssueColumns, ViewUserPreferences, ViewUserProjectRoles, ViewVoters, ViewWorkflowStep, ViewWorkflowStepMetaAttributes, ViewWorkflowSteps, ViewWorkflowTransition, ViewWorkflowTransitionConditionalResult, ViewWorkflowTransitionMetaAttributes, ViewWorkflowXml, WikiRendererHelpAction, WikiRendererPreviewAction, WorkflowUIDispatcher

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(String field, String message)
          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 addErrorMessages(Collection errorMessages)
          Append new error messages to those already collected.
 void addErrors(Map errors)
          Append new field-specific errors to those already collected.
 Collection getErrorMessages()
          Get all non field-specific error messages.
 Map getErrors()
          Get all field-specific errors.
 Collection 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(Collection errorMessages)
          Populate this ErrorCollection with a new set of messages (existing errors are lost).
 

Method Detail

addError

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

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

addErrorMessage

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

Parameters:
message - Error message.

getErrorMessages

Collection getErrorMessages()
Get all non field-specific error messages.

Returns:
Collection of error Strings.

setErrorMessages

void setErrorMessages(Collection errorMessages)
Populate this ErrorCollection with a new set of messages (existing errors are lost).

Parameters:
errorMessages - List of error message Strings.

getFlushedErrorMessages

Collection getFlushedErrorMessages()
Get error messages, then get rid of them.

Returns:
The (now cleared) error messages.

getErrors

Map 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(Collection errorMessages)
Append new error messages to those already collected.

Parameters:
errorMessages - Collection of error strings.

addErrors

void addErrors(Map 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.



Copyright © 2002-2008 Atlassian. All Rights Reserved.