@ParametersAreNonnullByDefault public class DefaultAttachmentValidator extends Object implements AttachmentValidator
AttachmentValidator
Constructor and Description |
---|
DefaultAttachmentValidator(I18nHelper.BeanFactory i18nBeanFactory,
PermissionManager permissionManager,
IssueManager issueManager,
AttachmentManager attachmentManager) |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateAttachments(ApplicationUser user,
Issue issue,
ErrorCollection errorCollection)
Verifies if user may create attachment for given issue.
|
boolean |
canCreateAttachments(ApplicationUser user,
Issue issue,
String nextStatusId,
ErrorCollection errorCollection)
Check if the given user has permission to add an attachment during a workflow transition to a step with given id.
|
boolean |
canCreateTemporaryAttachments(ApplicationUser user,
io.atlassian.fugue.Either<Issue,Project> issueOrProject,
ErrorCollection errorCollection)
Verifies if user may create temporary attachment for given issue or project (in case if the issue is being
created).
|
public DefaultAttachmentValidator(I18nHelper.BeanFactory i18nBeanFactory, PermissionManager permissionManager, IssueManager issueManager, AttachmentManager attachmentManager)
public boolean canCreateAttachments(@Nullable ApplicationUser user, Issue issue, ErrorCollection errorCollection)
AttachmentValidator
canCreateAttachments
in interface AttachmentValidator
user
- user who creates attachmentissue
- target issueerrorCollection
- error collections that will be filled in case of errorpublic boolean canCreateAttachments(@Nullable ApplicationUser user, @Nonnull Issue issue, @Nullable String nextStatusId, @Nonnull ErrorCollection errorCollection)
AttachmentValidator
canCreateAttachments
in interface AttachmentValidator
user
- user who creates attachmentissue
- issue before workflow transition described by actionDescriptornextStatusId
- the status the issue will be in after workflow transition; if null the logic is the same
as in AttachmentValidator.canCreateAttachments(ApplicationUser, Issue, ErrorCollection)
errorCollection
- error collections that will be filled in case of errorpublic boolean canCreateTemporaryAttachments(@Nullable ApplicationUser user, io.atlassian.fugue.Either<Issue,Project> issueOrProject, ErrorCollection errorCollection)
AttachmentValidator
canCreateTemporaryAttachments
in interface AttachmentValidator
user
- user who creates temporary attachmentissueOrProject
- target issue or project (in case if the issue is being created)errorCollection
- error collections that will be filled in case of errorCopyright © 2002-2022 Atlassian. All Rights Reserved.