gpt4 book ai didi

com.atlassian.jira.workflow.WorkflowManager.updateWorkflow()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 18:15:05 27 4
gpt4 key购买 nike

本文整理了Java中com.atlassian.jira.workflow.WorkflowManager.updateWorkflow()方法的一些代码示例,展示了WorkflowManager.updateWorkflow()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowManager.updateWorkflow()方法的具体详情如下:
包路径:com.atlassian.jira.workflow.WorkflowManager
类名称:WorkflowManager
方法名:updateWorkflow

WorkflowManager.updateWorkflow介绍

[英]Saves the given JiraWorkflow, which may be either a "live" or "draft" version. This method does not save the changes to the active workflow. Instead, this is meant to be used to make persistent changes to your working edit. Once all changes have been made you can over write the active workflow by calling #overwriteActiveWorkflow(ApplicationUser,String)
[中]保存给定的JiraWorkflow,它可以是“实时”或“草稿”版本。此方法不会保存对活动工作流的更改。相反,这是用来对工作编辑进行持久更改的。完成所有更改后,您可以通过调用#overwriteActiveWorkflow(ApplicationUser,String)重写活动工作流

代码示例

代码示例来源:origin: com.atlassian.jira/jira-core

public void updateWorkflow(final JiraServiceContext jiraServiceContext, final JiraWorkflow workflow)
{
  if (!hasAdminPermission(jiraServiceContext))
  {
    addError(jiraServiceContext, "admin.workflows.service.error.no.admin.permission", Reason.FORBIDDEN);
    return;
  }
  if ((workflow == null) || (workflow.getDescriptor() == null))
  {
    addError(jiraServiceContext, "admin.workflows.service.error.update.no.workflow", Reason.VALIDATION_FAILED);
    return;
  }
  if (!workflow.isEditable())
  {
    addError(jiraServiceContext, "admin.workflows.service.error.not.editable", Reason.VALIDATION_FAILED);
    return;
  }
  // This lock ensures that the overwriteWorkflow action above allows for an atomic validation and overwrite
  // of the workflow.  
  overwriteWorkflowLock.lock();
  try
  {
    workflowManager.updateWorkflow(jiraServiceContext.getLoggedInApplicationUser(), workflow);
  }
  finally
  {
    overwriteWorkflowLock.unlock();
  }
}

代码示例来源:origin: com.atlassian.studio/studio-jira-fisheye-plugin

workflowManager.updateWorkflow(ctx.getUser().getName(), workflow);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com