gpt4 book ai didi

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

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

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

WorkflowManager.getWorkflow介绍

[英]Retrieve the workflow for a given issue.
[中]检索给定问题的工作流。

代码示例

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

public JiraWorkflow getWorkflowForType(Long projectId, String issueTypeId) throws WorkflowException
{
  return workflowManager.getWorkflow(projectId, issueTypeId);
}

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

@Override
  public JiraWorkflow apply(String input)
  {
    return workflowManager.getWorkflow(input);
  }
}));

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

public JiraWorkflow getWorkflowForType(final Long projectId, final String issueTypeId) throws WorkflowException
{
  return workflowManager.getWorkflow(projectId, issueTypeId);
}

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

public JiraWorkflow getWorkflowForType(final Long projectId, final String issueTypeId) throws WorkflowException
{
  return workflowManager.getWorkflow(projectId, issueTypeId);
}

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

JiraWorkflow getExistingWorkflowByProjectId(String issueTypeId, long projectId) throws WorkflowException
{
  JiraWorkflow workflow = workflowManager.getWorkflow(projectId, issueTypeId);
  if (workflow == null)
  {
    throw new WorkflowException("Could not find workflow associated with project '" + projectId + "', issuetype " + issueTypeId);
  }
  return workflow;
}

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

private JiraWorkflow getExistingWorkflow(String issueTypeId) throws WorkflowException
{
  JiraWorkflow workflow = workflowManager.getWorkflow(projectId, issueTypeId);
  if (workflow == null)
  {
    throw new WorkflowException("Could not find workflow associated with project '" + projectId + "', issuetype " + issueTypeId);
  }
  return workflow;
}

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

private JiraWorkflow getWorkflowForType(final Long projectId, final String issueTypeId) throws WorkflowException
{
  return getWorkflowManager().getWorkflow(projectId, issueTypeId);
}

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

private Collection<ActionDescriptor> getActionsForIssue(MutableIssue issue) {
  return workflowManager.getWorkflow(issue).getAllActions();
}

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

@Override
public JiraWorkflow getWorkflow()
{
  JiraWorkflow workflow = super.getWorkflow();
  if (workflow == null && isNotBlank(newWorkflowName))
  {
    workflow = workflowManager.getWorkflow(newWorkflowName);
    setWorkflow(workflow);
  }
  return workflow;
}

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

/** Gets non-null target workflow for an issue type in the current project. */
JiraWorkflow getTargetWorkflow(String issueTypeId) throws WorkflowException
{
  String workflowName = targetScheme.getActualWorkflow(issueTypeId);
  JiraWorkflow workflow = workflowManager.getWorkflow(workflowName);
  if (workflow == null)
  {
    throw new WorkflowException("Could not find workflow associated with issuetype " + issueTypeId);
  }
  return workflow;
}

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

/** Gets non-null target workflow for an issue type in the current project. */
private JiraWorkflow getTargetWorkflow(String issueTypeId) throws WorkflowException
{
  String workflowName = targetScheme.getActualWorkflow(issueTypeId);
  JiraWorkflow workflow = workflowManager.getWorkflow(workflowName);
  if (workflow == null)
  {
    throw new WorkflowException("Could not find workflow associated with issuetype " + issueTypeId);
  }
  return workflow;
}

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

public JiraWorkflow getSubTaskTargetWorkflow(String subTaskTypeID) throws WorkflowException
{
  return getWorkflowManager().getWorkflow(getTargetPid(), subTaskTypeID);
}

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

ActionDescriptor getActionDescriptor(Issue issue, int actionId)
{
  final JiraWorkflow workflow = workflowManager.getWorkflow(issue);
  if (workflow == null)
  {
    return null;
  }
  final WorkflowDescriptor descriptor = workflow.getDescriptor();
  if (descriptor == null)
  {
    return null;
  }
  return descriptor.getAction(actionId);
}

代码示例来源:origin: com.atlassian.jira.plugins/jira-workflow-sharing-plugin

public boolean isParentWorkflowActive(JiraWorkflow workflow)
  {
    //not an draft workflow? Well you don't have a parent so your parent is active for the purposes
    // of this method.
    if(!workflow.isDraftWorkflow())
    {
      return true;
    }
    JiraWorkflow parentWorkflow = workflowManager.getWorkflow(workflow.getName());
    return parentWorkflow != null && parentWorkflow.isActive();
  }
}

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

public JiraWorkflow getWorkflow(final JiraServiceContext jiraServiceContext, final String name)
{
  if (StringUtils.isEmpty(name))
  {
    jiraServiceContext.getErrorCollection().addErrorMessage(getI18nBean().getText("admin.workflows.service.error.null.name"));
    return null;
  }
  return workflowManager.getWorkflow(name);
}

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

@Override
  public ActionDescriptor get()
  {
    return workflowManager.getWorkflow(getIssue()).getDescriptor().getAction(actionId);
  }
});

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

public boolean isParentWorkflowActive(JiraWorkflow workflow)
{
  //not an draft workflow? Well you don't have a parent so your parent is active for the purposes
  // of this method.
  if(!workflow.isDraftWorkflow())
  {
    return true;
  }
  JiraWorkflow parentWorkflow = workflowManager.getWorkflow(workflow.getName());
  return parentWorkflow != null && parentWorkflow.isActive();
}

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

public ActionDescriptor getActionDescriptor(WorkflowTransitionKey workflowTransitionKey)
{
  String workflowName = workflowTransitionKey.getWorkflowName();
  String actionDescriptorId = workflowTransitionKey.getActionDescriptorId();
  JiraWorkflow workflow = workflowManager.getWorkflow(workflowName);
  return workflow.getDescriptor().getAction(Integer.parseInt(actionDescriptorId));
}

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

/**
 * Returns <meta> attributes of the initial "create issue" workflow action.
 */
private Map getWorkflowMetaAttributes() throws WorkflowException
{
  JiraWorkflow workflow = ComponentAccessor.getWorkflowManager().getWorkflow(getPid(), getIssuetype());
  return workflow.getDescriptor().getInitialAction(1).getMetaAttributes();
}

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

public Status getDestinationStatus(final WorkflowTransitionKey workflowTransitionKey)
{
  final ActionDescriptor actionDescriptor =
      getBulkWorkflowTransitionOperation().getActionDescriptor(workflowTransitionKey);
  final JiraWorkflow workflow = workflowManager.getWorkflow(workflowTransitionKey.getWorkflowName());
  final int newStepId = actionDescriptor.getUnconditionalResult().getStep();
  if (newStepId == JiraWorkflow.ACTION_ORIGIN_STEP_ID)
  {
    return getOriginStatus(workflowTransitionKey);
  }
  else
  {
    final StepDescriptor step = workflow.getDescriptor().getStep(newStepId);
    return workflow.getLinkedStatus(step);
  }
}

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