@Internal public class DefaultMessageHandlerContext extends Object implements MessageHandlerContext
Constructor and Description |
---|
DefaultMessageHandlerContext(CommentManager commentManager,
MessageHandlerExecutionMonitor monitor,
IssueManager issueManager,
AttachmentManager attachmentManager)
|
DefaultMessageHandlerContext(CommentManager commentManager,
MessageHandlerExecutionMonitor monitor,
IssueManager issueManager,
AttachmentManager attachmentManager,
TextFieldCharacterLengthValidator textFieldCharacterLengthValidator,
PermissionManager permissionManager,
ApplicationProperties applicationProperties,
ApplicationRoleManager applicationRoleManager,
UserService userService) |
Modifier and Type | Method and Description |
---|---|
ChangeItemBean |
createAttachment(File file,
String filename,
String contentType,
ApplicationUser author,
Issue issue)
Creates attachment (when run in real mode) or does nothing if run in dry run mode.
|
Comment |
createComment(Issue issue,
ApplicationUser author,
String body,
boolean dispatchEvent)
Creates a new issue comment in JIRA or a dummy comment in dry run mode
|
Issue |
createIssue(ApplicationUser reporter,
Issue issue)
Creates a new issue in JIRA or a dummy issue in dry run mode
|
ApplicationUser |
createUser(String username,
String password,
String email,
String fullname,
Integer userEventType)
Creates user in JIRA or just dummy user if run in dry run mode
|
MessageHandlerExecutionMonitor |
getMonitor() |
boolean |
isRealRun() |
public DefaultMessageHandlerContext(CommentManager commentManager, MessageHandlerExecutionMonitor monitor, IssueManager issueManager, AttachmentManager attachmentManager, TextFieldCharacterLengthValidator textFieldCharacterLengthValidator, PermissionManager permissionManager, ApplicationProperties applicationProperties, ApplicationRoleManager applicationRoleManager, UserService userService)
@Deprecated public DefaultMessageHandlerContext(CommentManager commentManager, MessageHandlerExecutionMonitor monitor, IssueManager issueManager, AttachmentManager attachmentManager)
public ApplicationUser createUser(String username, String password, String email, String fullname, Integer userEventType) throws PermissionException, CreateException
MessageHandlerContext
createUser
in interface MessageHandlerContext
PermissionException
CreateException
public Comment createComment(Issue issue, ApplicationUser author, String body, boolean dispatchEvent)
MessageHandlerContext
createComment
in interface MessageHandlerContext
public Issue createIssue(@Nullable ApplicationUser reporter, Issue issue) throws CreateException
MessageHandlerContext
createIssue
in interface MessageHandlerContext
CreateException
public ChangeItemBean createAttachment(File file, String filename, String contentType, ApplicationUser author, Issue issue) throws AttachmentException
MessageHandlerContext
createAttachment
in interface MessageHandlerContext
IssueUpdater.doUpdate(com.atlassian.jira.issue.util.IssueUpdateBean, boolean)
AttachmentException
public boolean isRealRun()
isRealRun
in interface MessageHandlerContext
true
if the context works in production mode (when handlers are run from the service)
or false
if runspublic MessageHandlerExecutionMonitor getMonitor()
getMonitor
in interface MessageHandlerContext
Copyright © 2002-2019 Atlassian. All Rights Reserved.