com.atlassian.jira.web.action.admin.workflow
Class AbstractWorkflowStep

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
              extended by com.atlassian.jira.web.action.admin.workflow.AbstractWorkflowStep
All Implemented Interfaces:
ErrorCollection, I18nHelper, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
DeleteWorkflowStep, EditWorkflowStep, ViewWorkflowStep, ViewWorkflowSteps

public class AbstractWorkflowStep
extends JiraWebActionSupport

Copyright (c) 2002-2004 All rights reserved.

See Also:
Serialized Form

Field Summary
protected  ConstantsManager constantsManager
           
protected  JiraWorkflow workflow
           
protected  WorkflowService workflowService
           
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, savedFilters, selectedProject
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AbstractWorkflowStep(JiraWorkflow workflow, ConstantsManager constantsManager, WorkflowService workflowService)
           
 
Method Summary
 ConstantsManager getConstantsManager()
           
 String getStepName()
           
 String getStepStatus()
           
 Collection getUnlinkedStatuses()
           
 Collection getUnlinkedStatuses(boolean genericValues)
           
 Collection getUnlinkedStatusesGVs()
           
 JiraWorkflow getWorkflow()
           
 String getWorkflowDisplayName()
           
 boolean isCanDeleteStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
           
 boolean isOldStepOnDraft(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
          This method is used to determine if workflowstep belongs to a draft workflow and is present on the original workflow that was used to create the draft.
 boolean isStepWithoutTransitionsOnDraft(int stepId)
          Used to detect if a step on a draft, does not have any outgoing transitions on the original workflow.
 void setStepName(String stepName)
           
 void setStepStatus(String stepStatus)
           
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getSearchSortReverseDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUserFullName, getVersionManager, getWebworkStack, getWebworkStack, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isSystemAdministrator, isUserExists, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, doDefault, doExecute, doValidation, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

workflow

protected final JiraWorkflow workflow

constantsManager

protected final ConstantsManager constantsManager

workflowService

protected final WorkflowService workflowService
Constructor Detail

AbstractWorkflowStep

public AbstractWorkflowStep(JiraWorkflow workflow,
                            ConstantsManager constantsManager,
                            WorkflowService workflowService)
Method Detail

getStepName

public String getStepName()

setStepName

public void setStepName(String stepName)

getUnlinkedStatusesGVs

public Collection getUnlinkedStatusesGVs()

getUnlinkedStatuses

public Collection getUnlinkedStatuses()

getUnlinkedStatuses

public Collection getUnlinkedStatuses(boolean genericValues)

getStepStatus

public String getStepStatus()

setStepStatus

public void setStepStatus(String stepStatus)

getWorkflow

public JiraWorkflow getWorkflow()

getWorkflowDisplayName

public String getWorkflowDisplayName()

getConstantsManager

public ConstantsManager getConstantsManager()
Overrides:
getConstantsManager in class JiraWebActionSupport

isOldStepOnDraft

public boolean isOldStepOnDraft(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
This method is used to determine if workflowstep belongs to a draft workflow and is present on the original workflow that was used to create the draft. This means this step cannot be deleted, and cannot be associated with a different status.

Parameters:
stepDescriptor - The stepDescriptor in being edited.
Returns:
True if the step is an existing step and the workflow is a draft workflow

isCanDeleteStep

public boolean isCanDeleteStep(com.opensymphony.workflow.loader.StepDescriptor stepDescriptor)
                        throws WorkflowException
Throws:
WorkflowException

isStepWithoutTransitionsOnDraft

public boolean isStepWithoutTransitionsOnDraft(int stepId)
Used to detect if a step on a draft, does not have any outgoing transitions on the original workflow. Adding transitions to such a step is not allowed.

Parameters:
stepId - The id of the step in question.
Returns:
True if the step does not have any outgoing transitions on the original workflow


Copyright © 2002-2009 Atlassian. All Rights Reserved.