@ParametersAreNonnullByDefault public class

DefaultAttachmentValidator

extends Object
implements AttachmentValidator
java.lang.Object
   ↳ com.atlassian.jira.issue.attachment.DefaultAttachmentValidator

Class Overview

Default implementations for AttachmentValidator

Summary

Public Constructors
DefaultAttachmentValidator(I18nHelper.BeanFactory i18nBeanFactory, PermissionManager permissionManager, IssueManager issueManager, AttachmentManager attachmentManager)
Public Methods
boolean canCreateAttachments(ApplicationUser user, Issue issue, ErrorCollection errorCollection)
Verifies if user may create attachment for given issue.
boolean canCreateTemporaryAttachments(ApplicationUser user, Either<IssueProject> issueOrProject, ErrorCollection errorCollection)
Verifies if user may create temporary attachment for given issue or project (in case if the issue is being created).
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.issue.AttachmentValidator

Public Constructors

public DefaultAttachmentValidator (I18nHelper.BeanFactory i18nBeanFactory, PermissionManager permissionManager, IssueManager issueManager, AttachmentManager attachmentManager)

Public Methods

public boolean canCreateAttachments (ApplicationUser user, Issue issue, ErrorCollection errorCollection)

Verifies if user may create attachment for given issue.

Parameters
user user who creates attachment
issue target issue
errorCollection error collections that will be filled in case of error
Returns
  • true if user can create attachments

public boolean canCreateTemporaryAttachments (ApplicationUser user, Either<IssueProject> issueOrProject, ErrorCollection errorCollection)

Verifies if user may create temporary attachment for given issue or project (in case if the issue is being created).

Parameters
user user who creates temporary attachment
issueOrProject target issue or project (in case if the issue is being created)
errorCollection error collections that will be filled in case of error
Returns
  • true if user can create temporary attachments