public abstract class AbstractConvertIssue extends JiraWebActionSupport
JiraWebActionSupport.MessageType
ErrorCollection.Reason
I18nHelper.BeanFactory
Modifier and Type | Field and Description |
---|---|
protected ConstantsManager |
constantsManager |
protected FieldLayoutManager |
fieldLayoutManager |
protected String |
guid |
protected String |
id |
protected Issue |
issue |
protected IssueManager |
issueManager |
protected String |
issueType |
protected PermissionManager |
permissionManager |
protected RendererManager |
rendererManager |
protected static String |
SECURITY_BREACH |
protected static int |
STEP_1 |
protected static int |
STEP_2 |
protected static int |
STEP_3 |
protected static int |
STEP_4 |
protected String |
targetStatusId |
protected WorkflowManager |
workflowManager |
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters
log
Modifier | Constructor and Description |
---|---|
protected |
AbstractConvertIssue(IssueConversionService service,
IssueManager issueManager,
FieldLayoutManager fieldLayoutManager,
ConstantsManager constantsManager,
WorkflowManager workflowManager,
RendererManager rendererManager,
IssueFactory issueFactory,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
protected void |
addI18nError(JiraServiceContext context,
String fieldName,
String i18nKey)
Convenience method for adding internationalized errors to the error collection
|
protected void |
addI18nError(JiraServiceContext context,
String fieldName,
String i18nKey,
String param)
Convenience method for adding internationalized errors to the error collection
|
protected void |
addI18nErrorMessage(JiraServiceContext context,
String i18nKey)
Conveniece method for adding internationalized error messages to the error collection
|
protected void |
addI18nErrorMessage(JiraServiceContext context,
String i18nKey,
String param)
Convenience method for adding internationalized error messages to the error collection
|
String |
doCancel()
Handles the request to cancel the issue conversion wizard.
|
String |
doConvert()
Last step of this wizard.
|
String |
doSetIssueType()
Second step of this wizard.
|
String |
doSetWorkflowStatus()
Third step of this wizard.
|
String |
doStartWizard()
First step of this wizard.
|
String |
doUpdateFields()
Fourth step of this wizard.
|
abstract String |
getActionPrefix()
Prefix used for jsps Actions.
|
abstract Collection |
getAvailableIssueTypes()
Gets a collection of
IssueType that are the available target Issue Types. |
protected ConvertIssueBean |
getBean()
Retrieves the wizard bean from the session.
|
Collection<FieldLayoutItem> |
getConvertFieldLayoutItems()
Returns a list of
FieldLayoutItem that need values for conversion. |
int |
getCurrentStep() |
JiraWorkflow |
getCurrentWorkflow()
Utility method used by convertissuetosubtask-updateworkflow.jsp and
convertissuetosubtask-confirm-part1.jsp
Retrieve and return current workflow for selected issue |
String |
getFieldHtml(FieldLayoutItem fieldLayoutItem)
Gets the create HTML for the given FieldLayoutItem.
|
String |
getFieldName(Field field)
Utility method used by convertissuetosubtask-confirm.jsp
|
String |
getGuid() |
String |
getId() |
Issue |
getIssue()
Retrieves the worked on issue based on the Issue id.
|
String |
getIssuePath() |
String |
getIssuetype() |
String |
getNewViewHtml(OrderableField field)
Gets the ne view of the field after values have been updated
|
String |
getOldViewHtml(OrderableField field)
Gets the old view of the field before update
|
String |
getParentIssueKey() |
abstract String |
getPropertiesPrefix()
Prefix used for i18n properties.
|
Collection |
getRemoveFields()
Returns a list of
OrderableField s that should be removed from the target issue. |
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.
|
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. |
String |
getTextKey(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(String guid) |
void |
setId(String id) |
void |
setIssuetype(String subTaskType) |
void |
setTargetStatusId(String targetStatusId) |
protected void |
validateStep1(JiraServiceContextImpl context)
Validates the first step of the wizard, subclasses can override to extend validation
|
protected boolean |
wasPassed(String param)
Returns true is the specified parameter was passed via request parameter value
|
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addMessageToResponse, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getAuthorizationSupport, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDescTranslation, getDmyDateFormatter, getEmptyResponse, getErrorMessages, getErrors, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getHttpRequest, getHttpResponse, getHttpSession, getJiraContactHelper, getJiraServiceContext, getLanguage, getLoggedInApplicationUser, getLoggedInUser, getNameTranslation, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirect, getRedirectSanitiser, getRequestSourceType, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getServletContext, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, hasGlobalPermission, hasGlobalPermission, hasIssuePermission, hasIssuePermission, hasIssuePermission, hasPermission, hasProjectPermission, hasProjectPermission, htmlEncode, insertContextPath, isInlineDialogMode, isSystemAdministrator, isUserExists, isUserExistsByKey, isUserExistsByName, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId, tagMauEventWithApplication, tagMauEventWithProject, urlEncode
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getResourceBundle, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, getUserPreferences, hasAnyErrors, isIndexing, isKeyDefined, removeKeyOrAddError
addError, addErrorMessage, doDefault, doExecute, doValidation, getCommandName, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addError, addErrorMessage, addErrorMessages, addErrors, hasAnyErrors, setErrorMessages
protected static final 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 String id
protected String issueType
protected String targetStatusId
protected String guid
protected AbstractConvertIssue(IssueConversionService service, IssueManager issueManager, FieldLayoutManager fieldLayoutManager, ConstantsManager constantsManager, WorkflowManager workflowManager, RendererManager rendererManager, IssueFactory issueFactory, PermissionManager permissionManager)
public 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
viewpublic 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 viewpublic 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
viewpublic 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
viewpublic 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 issuepublic String doCancel()
protected void initRequest(JiraServiceContext context)
context
- jira service contextprotected void validateStep1(JiraServiceContextImpl context)
context
- jira service contextpublic Issue getIssue()
protected boolean wasPassed(String param)
param
- parameter to checkprotected ConvertIssueBean getBean()
public MutableIssue getTargetIssue()
protected MutableIssue getTargetIssueObjectWithSecurityLevel()
public boolean isStatusChangeRequired()
public MutableIssue getUpdatedIssue()
public Collection<FieldLayoutItem> getConvertFieldLayoutItems()
FieldLayoutItem
that need values for conversion.FieldLayoutItem
public 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 String getFieldName(Field field)
field
- filedpublic String getOldViewHtml(OrderableField field)
field
- Field to displaypublic String getNewViewHtml(OrderableField field)
field
- Field to displaypublic String getFieldHtml(FieldLayoutItem fieldLayoutItem)
fieldLayoutItem
- Layoutitem describing field to displaypublic JiraWorkflow getCurrentWorkflow()
DataAccessException
- if WorkflowException occured during retrievalpublic String getId()
public void setId(String id)
public String getParentIssueKey()
public String getTargetStatusId()
public void setTargetStatusId(String targetStatusId)
public String getIssuetype()
public void setIssuetype(String subTaskType)
public String getGuid()
public void setGuid(String guid)
public int getCurrentStep()
protected void setCurrentStep(int step)
protected void addI18nErrorMessage(JiraServiceContext context, String i18nKey)
context
- jira service contexti18nKey
- message keyprotected void addI18nErrorMessage(JiraServiceContext context, String i18nKey, String param)
context
- jira service contexti18nKey
- message keyparam
- parameter valueprotected void addI18nError(JiraServiceContext context, String fieldName, String i18nKey)
context
- jira service contextfieldName
- field namei18nKey
- message keyprotected void addI18nError(JiraServiceContext context, String fieldName, String i18nKey, String param)
context
- jira service contextfieldName
- field namei18nKey
- message keyparam
- parameter valuepublic String getTextKey(String key)
key
- to getpublic String getIssuePath()
public abstract String getActionPrefix()
public abstract String getPropertiesPrefix()
public abstract 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.Copyright © 2002-2017 Atlassian. All Rights Reserved.