|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object webwork.action.ActionSupport com.atlassian.jira.action.JiraActionSupport com.atlassian.jira.web.action.JiraWebActionSupport com.atlassian.jira.web.action.issue.AbstractConvertIssue
public abstract class AbstractConvertIssue
Abstract class for issue conversion Contains all do* methods and vast majority of logic
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper |
---|
I18nHelper.BeanFactory |
Field Summary | |
---|---|
protected ConstantsManager |
constantsManager
|
protected FieldLayoutManager |
fieldLayoutManager
|
protected java.lang.String |
guid
|
protected java.lang.String |
id
|
protected Issue |
issue
|
protected IssueManager |
issueManager
|
protected java.lang.String |
issueType
|
protected PermissionManager |
permissionManager
|
protected RendererManager |
rendererManager
|
protected static java.lang.String |
SECURITY_BREACH
|
protected static int |
STEP_1
|
protected static int |
STEP_2
|
protected static int |
STEP_3
|
protected static int |
STEP_4
|
protected java.lang.String |
targetStatusId
|
protected WorkflowManager |
workflowManager
|
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport |
---|
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters |
Fields inherited from class com.atlassian.jira.action.JiraActionSupport |
---|
log |
Fields inherited from class webwork.action.ActionSupport |
---|
command, errorMap, errorMessages |
Fields inherited from interface webwork.action.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
protected |
AbstractConvertIssue(IssueConversionService service,
IssueManager issueManager,
FieldLayoutManager fieldLayoutManager,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
RendererManager rendererManager,
IssueFactory issueFactory,
PermissionManager permissionManager)
|
Method Summary | |
---|---|
protected void |
addI18nError(JiraServiceContext context,
java.lang.String fieldName,
java.lang.String i18nKey)
Convenience method for adding internationalized errors to the error collection |
protected void |
addI18nError(JiraServiceContext context,
java.lang.String fieldName,
java.lang.String i18nKey,
java.lang.String param)
Convenience method for adding internationalized errors to the error collection |
protected void |
addI18nErrorMessage(JiraServiceContext context,
java.lang.String i18nKey)
Conveniece method for adding internationalized error messages to the error collection |
protected void |
addI18nErrorMessage(JiraServiceContext context,
java.lang.String i18nKey,
java.lang.String param)
Convenience method for adding internationalized error messages to the error collection |
java.lang.String |
doCancel()
Handles the request to cancel the issue conversion wizard. |
java.lang.String |
doConvert()
Last step of this wizard. |
java.lang.String |
doSetIssueType()
Second step of this wizard. |
java.lang.String |
doSetWorkflowStatus()
Third step of this wizard. |
java.lang.String |
doStartWizard()
First step of this wizard. |
java.lang.String |
doUpdateFields()
Fourth step of this wizard. |
abstract java.lang.String |
getActionPrefix()
Prefix used for jsps Actions. |
abstract java.util.Collection |
getAvailableIssueTypes()
Gets a collection of IssueType that are the available target Issue Types. |
protected ConvertIssueBean |
getBean()
Retrieves the wizard bean from the session. |
java.util.Collection |
getConvertFieldLayoutItems()
Returns a list of FieldLayoutItem that need values for conversion. |
java.lang.String |
getCurrentJQL()
Returns the JQL representation of the current search request in the session. |
int |
getCurrentStep()
|
JiraWorkflow |
getCurrentWorkflow()
Utility method used by convertissuetosubtask-updateworkflow.jsp and convertissuetosubtask-confirm-part1.jsp Retrieve and return current workflow for selected issue |
java.lang.String |
getFieldHtml(FieldLayoutItem fieldLayoutItem)
Gets the create HTML for the given FieldLayoutItem. |
java.lang.String |
getFieldName(Field field)
Utility method used by convertissuetosubtask-confirm.jsp |
java.lang.String |
getGuid()
|
java.lang.String |
getId()
|
Issue |
getIssue()
Retrieves the worked on issue based on the Issue id. |
java.lang.String |
getIssuePath()
|
java.lang.String |
getIssuetype()
|
java.lang.String |
getNewViewHtml(OrderableField field)
Gets the ne view of the field after values have been updated |
java.lang.String |
getOldViewHtml(OrderableField field)
Gets the old view of the field before update |
java.lang.String |
getParentIssueKey()
|
abstract java.lang.String |
getPropertiesPrefix()
Prefix used for i18n properties. |
java.util.Collection |
getRemoveFields()
Returns a list of OrderableField s that should be removed from the target issue. |
SearchRequest |
getSearchRequest()
This method will return the one in the current search request, or return null if one does not exist. |
MutableIssue |
getTargetIssue()
Get Target Issue with Security Level set to null if it is needed. |
protected MutableIssue |
getTargetIssueObjectWithSecurityLevel()
Get the issue with updated Issue type and status. |
java.lang.String |
getTargetStatusId()
|
JiraWorkflow |
getTargetWorkflow()
Utility method used by convertissuetosubtask-confirm.jsp and convertissuetosubtask-confirm-part1.jsp Retrieve and return workflow for selected issue's project and new (target) issue type. |
java.lang.String |
getTextKey(java.lang.String key)
Utility method to get appropriate key for property. |
MutableIssue |
getUpdatedIssue()
Gets the target issue with new values set on issue |
protected abstract void |
initExtraFields(ConvertIssueBean bean,
JiraServiceContext context)
Allows subclasses to set and init own fields. |
protected void |
initRequest(JiraServiceContext context)
Checks for valid state, populates the bean with values from parameters and updates bean with new GUID |
boolean |
isStatusChangeRequired()
Whether or not the issue's status is valid in the workflow |
protected void |
setCurrentStep(int step)
|
void |
setGuid(java.lang.String guid)
|
void |
setId(java.lang.String id)
|
void |
setIssuetype(java.lang.String subTaskType)
|
void |
setTargetStatusId(java.lang.String targetStatusId)
|
protected void |
validateStep1(JiraServiceContextImpl context)
Validates the first step of the wizard, subclasses can override to extend validation |
protected boolean |
wasPassed(java.lang.String param)
Returns true is the specified parameter was passed via request parameter value |
Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
---|
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getDefaultResourceBundle, getDelegator, getKeysForPrefix, getLocale, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText0, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError |
Methods inherited from class webwork.action.ActionSupport |
---|
addError, addErrorMessage, doDefault, doExecute, doValidation, getCommandName, 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 |
---|
getCommandName, setCommand |
Field Detail |
---|
protected static final java.lang.String SECURITY_BREACH
protected final IssueManager issueManager
protected final ConstantsManager constantsManager
protected final FieldLayoutManager fieldLayoutManager
protected final WorkflowManager workflowManager
protected final PermissionManager permissionManager
protected final RendererManager rendererManager
protected static final int STEP_1
protected static final int STEP_2
protected static final int STEP_3
protected static final int STEP_4
protected Issue issue
protected java.lang.String id
protected java.lang.String issueType
protected java.lang.String targetStatusId
protected java.lang.String guid
Constructor Detail |
---|
protected AbstractConvertIssue(IssueConversionService service, IssueManager issueManager, FieldLayoutManager fieldLayoutManager, ConstantsManager constantsManager, WorkflowManager workflowManager, RendererManager rendererManager, IssueFactory issueFactory, PermissionManager permissionManager)
Method Detail |
---|
public java.lang.String doStartWizard()
Action.ERROR
view.
Checks user's permission, if denied returns SECURITY_BREACH
view.
Checks if given issue is convertable, if not returns Action.ERROR
view.
Returns Action.SUCCESS
view
public java.lang.String doSetIssueType()
Action.ERROR
view.
Checks user's permission, if denied returns SECURITY_BREACH
view.
Checks if given issue is convertable and validates other values,
if not returns Action.ERROR
view.
Returns view to update workflow or update fields view
public java.lang.String doSetWorkflowStatus()
Action.ERROR
view.
Checks user's permission, if denied returns SECURITY_BREACH
view.
Checks if given issue is convertable and valid values were entered,
if not returns Action.ERROR
view.
Returns Action.SUCCESS
view
public java.lang.String doUpdateFields()
Action.ERROR
view.
Checks user's permission, if denied returns SECURITY_BREACH
view.
Checks if given issue is convertable and valid values were entered,
if not returns Action.ERROR
view.
Returns Action.SUCCESS
view
public java.lang.String doConvert()
Action.ERROR
view.
Checks user's permission, if denied returns SECURITY_BREACH
view.
Checks if given issue is convertable and valid values were entered,
if not returns Action.ERROR
view.
Executes the conversion.
Returns to the issue
public java.lang.String doCancel()
protected void initRequest(JiraServiceContext context)
context
- jira service contextprotected void validateStep1(JiraServiceContextImpl context)
context
- jira service contextpublic Issue getIssue()
protected boolean wasPassed(java.lang.String param)
param
- parameter to check
protected ConvertIssueBean getBean()
public MutableIssue getTargetIssue()
protected MutableIssue getTargetIssueObjectWithSecurityLevel()
public boolean isStatusChangeRequired()
public MutableIssue getUpdatedIssue()
public java.util.Collection getConvertFieldLayoutItems()
FieldLayoutItem
that need values for conversion.
FieldLayoutItem
public java.util.Collection getRemoveFields()
OrderableField
s that should be removed from the target issue.
OrderableField
s that should be removed from the target issue.public JiraWorkflow getTargetWorkflow()
DataAccessException
- if WorkflowException occured during retrievalpublic java.lang.String getFieldName(Field field)
field
- filed
public java.lang.String getOldViewHtml(OrderableField field) throws FieldLayoutStorageException
field
- Field to display
FieldLayoutStorageException
- thrown if exception thrown during retrievalpublic java.lang.String getNewViewHtml(OrderableField field) throws FieldLayoutStorageException
field
- Field to display
FieldLayoutStorageException
- thrown if exception thrown during retrievalpublic java.lang.String getFieldHtml(FieldLayoutItem fieldLayoutItem)
fieldLayoutItem
- Layoutitem describing field to display
public JiraWorkflow getCurrentWorkflow()
DataAccessException
- if WorkflowException occured during retrievalpublic SearchRequest getSearchRequest()
public java.lang.String getCurrentJQL()
public java.lang.String getId()
public void setId(java.lang.String id)
public java.lang.String getParentIssueKey()
public java.lang.String getTargetStatusId()
public void setTargetStatusId(java.lang.String targetStatusId)
public java.lang.String getIssuetype()
public void setIssuetype(java.lang.String subTaskType)
public java.lang.String getGuid()
public void setGuid(java.lang.String guid)
public int getCurrentStep()
protected void setCurrentStep(int step)
protected void addI18nErrorMessage(JiraServiceContext context, java.lang.String i18nKey)
context
- jira service contexti18nKey
- message keyprotected void addI18nErrorMessage(JiraServiceContext context, java.lang.String i18nKey, java.lang.String param)
context
- jira service contexti18nKey
- message keyparam
- parameter valueprotected void addI18nError(JiraServiceContext context, java.lang.String fieldName, java.lang.String i18nKey)
context
- jira service contextfieldName
- field namei18nKey
- message keyprotected void addI18nError(JiraServiceContext context, java.lang.String fieldName, java.lang.String i18nKey, java.lang.String param)
context
- jira service contextfieldName
- field namei18nKey
- message keyparam
- parameter valuepublic java.lang.String getTextKey(java.lang.String key)
key
- to get
public java.lang.String getIssuePath()
public abstract java.lang.String getActionPrefix()
public abstract java.lang.String getPropertiesPrefix()
public abstract java.util.Collection getAvailableIssueTypes()
IssueType
that are the available target Issue Types.
IssueType
protected abstract void initExtraFields(ConvertIssueBean bean, JiraServiceContext context)
bean
- bean that holds params.context
- jira service context.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |