Tabnine Logo
com.atlassian.jira.workflow
Code IndexAdd Tabnine to your IDE (free)

How to use com.atlassian.jira.workflow

Best Java code snippets using com.atlassian.jira.workflow (Showing top 20 results out of 315)

origin: com.atlassian.jira/jira-core

@Override
public AssignableWorkflowScheme copyDraft(DraftWorkflowScheme draft, ApplicationUser user, String newDescription)
{
  AssignableWorkflowScheme.Builder copyOfDraftBuilder = new AssignableWorkflowSchemeBuilder()
      .setName(getNameForCopy(draft))
      .setDescription(newDescription)
      .setMappings(draft.getMappings());
  return createScheme(copyOfDraftBuilder.build());
}
origin: com.atlassian.jira/jira-tests

public AssignableState addStateForScheme(AssignableWorkflowScheme scheme)
{
  return addState(new MockAssignableWorkflowSchemeState.Builder()
      .setId(scheme.getId())
      .setName(scheme.getName())
      .setDescription(scheme.getDescription())
      .setMappings(scheme.getMappings())
      .build());
}
origin: com.atlassian.jira/jira-core

@Override
public void replaceSchemeWithDraft(DraftWorkflowScheme draft)
{
  AssignableWorkflowScheme parentScheme = getParentForDraft(draft.getId())
      .builder()
      .setMappings(draft.getMappings())
      .build();
  updateWorkflowScheme(parentScheme);
  deleteWorkflowScheme(draft);
}
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-tests

public DraftState addStateForScheme(DraftWorkflowScheme scheme)
{
  return addState(new MockDraftWorkflowSchemeState.Builder(scheme.getParentScheme().getId())
      .setId(scheme.getId())
      .setMappings(scheme.getMappings())
      .setLastModifiedDate(scheme.getLastModifiedDate()).build());
}
origin: com.atlassian.jira/jira-core

private void cleanUpSchemes(AssignableWorkflowScheme intermediateScheme)
{
  AssignableWorkflowScheme originalScheme = workflowSchemeManager.getParentForDraft(targetScheme.getId());
  if (!workflowSchemeManager.isActive(originalScheme))
  {
    workflowSchemeManager.deleteWorkflowScheme(originalScheme);
    intermediateScheme = intermediateScheme.builder()
        .setName(originalScheme.getName())
        .setDescription(originalScheme.getDescription())
        .build();
    workflowSchemeManager.updateWorkflowScheme(intermediateScheme);
  }
}
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

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

protected String doExecute() throws Exception
{
  xml = WorkflowUtil.convertDescriptorToXML(workflow.getDescriptor());
  return SUCCESS;
}
origin: com.atlassian.jira/jira-api

/**
 * Given a map of transientVars from a Workflow Function, returns the {@link ApplicationUser} object of the caller.
 *
 * @param transientVars the "transientVars" from the workflow FunctionProvider
 * @return the username of the caller (can be null for anonymous).
 * @since 6.0
 */
public static ApplicationUser getCallerUser(Map transientVars)
{
  return WorkflowFunctionUtils.getUserByKey(getCallerKey(transientVars));
}
origin: com.atlassian.jira/jira-core

public boolean hasDraftWorkflow()
{
  // Test if we can get a draft workflow with our name from the manager.
  return workflowManager.getDraftWorkflow(getName()) != null;
}
origin: com.atlassian.jira/jira-core

private WorkflowPropertyEditor createEditor()
{
  return editor.stepPropertyEditor(workflow, step)
      .nameKey("attributeKey")
      .valueKey("attributeValue");
}
origin: com.atlassian.jira/jira-core

@Override
public DraftState getDraftForParent(long parentId)
{
  return support.createStateFrom(findSchemeGvFromParent(parentId));
}
origin: com.atlassian.jira/jira-core

@Override
public List<ActionDescriptor> getSortedAvailableActions(final Issue issue, final ApplicationUser user)
{
  return getSortedAvailableActions(issue, TransitionOptions.defaults(), user);
}
origin: com.atlassian.jira/jira-core

@Override
public boolean isValidAction(final Issue issue, final int actionId, final ApplicationUser user)
{
  return isValidAction(issue, actionId, TransitionOptions.defaults(), user);
}
origin: com.atlassian.jira/jira-core

@Override
public DraftState get(long id)
{
  final GenericValue schemeGv = getGenericValue(id);
  return support.createStateFrom(schemeGv);
}
origin: com.atlassian.jira/jira-core

public AssignableWorkflowScheme getParentForDraft(long draftSchemeId)
{
  long parentId = draftWorkflowSchemeStore.getParentId(draftSchemeId);
  return getWorkflowSchemeObj(parentId);
}
origin: com.atlassian.jira/jira-core

private DraftWorkflowScheme getDraftForParent(long parentId)
{
  DraftWorkflowSchemeStore.DraftState draftScheme = draftWorkflowSchemeStore.getDraftForParent(parentId);
  return toWorkflowScheme(draftScheme);
}
origin: com.atlassian.jira/jira-core

@Override
public DraftWorkflowScheme getDraft(long id)
{
  DraftWorkflowSchemeStore.DraftState draftScheme = draftWorkflowSchemeStore.get(id);
  return toWorkflowScheme(draftScheme);
}
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;
}
com.atlassian.jira.workflow

Most used classes

  • JiraWorkflow
    Domain object representing the permitted states and transitions of issues.
  • WorkflowManager
    The WorkflowManager is used to interface with the workflow implementation
  • WorkflowTransitionUtil
  • WorkflowUtil
  • AssignableWorkflowScheme
    A workflow scheme that can be assigned to a project.
  • IssueWorkflowManager,
  • WorkflowScheme,
  • AssignableWorkflowScheme$Builder,
  • AssignableWorkflowSchemeStore$AssignableState$Builder,
  • AssignableWorkflowSchemeStore$AssignableState,
  • ConfigurableJiraWorkflow,
  • DraftWorkflowSchemeStore$DraftState$Builder,
  • DraftWorkflowSchemeStore$DraftState,
  • TransitionOptions,
  • WorkflowActionsBean,
  • WorkflowFunctionUtils,
  • WorkflowPropertyEditor$WorkflowPropertyEditorFactory,
  • WorkflowPropertyEditor,
  • WorkflowSchemeManager
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now