gpt4 book ai didi

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

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

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

WorkflowManager.getPostFunctionsForWorkflow介绍

[英]Retrieve a map: actions -> post functions for a workflow.
[中]检索地图:操作->发布工作流的功能。

代码示例

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

private Set<Map<String, String>> getTransitions(final int webHookListenerId, JiraWorkflow workflow) {
  Set<Map<String, String>> transitions = Sets.newHashSet();
  final Map<ActionDescriptor, Collection<FunctionDescriptor>> actionToPostfunctionsMap = workflowManager.getPostFunctionsForWorkflow(workflow);
  for (Map.Entry<ActionDescriptor, Collection<FunctionDescriptor>> entry : actionToPostfunctionsMap.entrySet()) {
    if (isWebHookLinked(webHookListenerId, entry.getValue())) {
      transitions.add(ImmutableMap.of("workflow", workflow.getName(), "transition", entry.getKey().getName()));
    }
  }
  return transitions;
}

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

public MultiMap getAssociatedWorkflows(EventType eventType, boolean statusCheck)
{
  MultiMap workflowTransitionMap = new MultiValueMap();
  Collection<JiraWorkflow> workflows = workflowManager.getWorkflows();
  Long eventTypeId = eventType.getId();
  for (final JiraWorkflow workflow : workflows)
  {
    Map<ActionDescriptor, Collection<FunctionDescriptor>> transitionPostFunctionMap = workflowManager.getPostFunctionsForWorkflow(workflow);
    Collection<ActionDescriptor> keys = transitionPostFunctionMap.keySet();
    for (final ActionDescriptor actionDescriptor : keys)
    {
      Collection<FunctionDescriptor> postFunctions = transitionPostFunctionMap.get(actionDescriptor);
      for (final FunctionDescriptor functionDescriptor : postFunctions)
      {
        if (functionDescriptor.getArgs().containsKey(EVENT_TYPE_ID) &&
            eventTypeId.equals(new Long((String) functionDescriptor.getArgs().get(EVENT_TYPE_ID))))
        {
          workflowTransitionMap.put(workflow.getName(), actionDescriptor);
          // Exit now as we only need one association for a status check
          if (statusCheck)
          {
            return workflowTransitionMap;
          }
        }
      }
    }
  }
  return workflowTransitionMap;
}

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

for (final JiraWorkflow workflow : workflows)
  Map<ActionDescriptor, Collection<FunctionDescriptor>> transitionPostFunctionMap = workflowManager.getPostFunctionsForWorkflow(workflow);

代码示例来源:origin: com.atlassian.labs.hipchat/hipchat-for-jira-plugin

final String workflowName = issueTypeWorkflow.getValue();
final JiraWorkflow workflow = workflowManager.getWorkflow(workflowName);
final Map<ActionDescriptor, Collection<FunctionDescriptor>> postFunctionsForWorkflow = workflowManager.getPostFunctionsForWorkflow(
    workflow);

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