com.atlassian.jira.web.action.issue
Class CreateIssue

java.lang.Object
  extended bywebwork.action.ActionSupport
      extended bycom.atlassian.jira.action.JiraActionSupport
          extended bycom.atlassian.jira.web.action.JiraWebActionSupport
              extended bycom.atlassian.jira.web.action.ProjectActionSupport
                  extended bycom.atlassian.jira.web.action.IssueActionSupport
                      extended bycom.atlassian.jira.web.action.issue.AbstractIssueSelectAction
                          extended bycom.atlassian.jira.web.action.issue.CreateIssue
All Implemented Interfaces:
webwork.action.Action, Assignable, webwork.action.CommandDriven, CustomFieldValuesAware, ErrorCollection, I18nHelper, webwork.action.IllegalArgumentAware, java.io.Serializable
Direct Known Subclasses:
CreateIssueDetails, CreateSubTaskIssue

public class CreateIssue
extends AbstractIssueSelectAction
implements Assignable, CustomFieldValuesAware

See Also:
Serialized Form

Nested Class Summary
 class CreateIssue.ButtonHolder
          struct for holding name:value string pairs.
 
Field Summary
protected  java.util.Map customFieldValuesHolder
           
(package private)  java.lang.String issuetype
           
(package private)  java.lang.Long pid
           
(package private)  java.lang.String priority
           
protected  java.lang.String reporter
           
(package private)  java.lang.Long security
           
 
Fields inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
id
 
Fields inherited from class com.atlassian.jira.web.action.IssueActionSupport
attachmentManager
 
Fields inherited from class com.atlassian.jira.web.action.ProjectActionSupport
projectManager, savedFilters
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request
 
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
CreateIssue()
           
 
Method Summary
 java.lang.String doDefault()
           
protected  java.lang.String doExecute()
           
protected  void doValidation()
           
 java.util.Collection getAllowedProjects()
           
 java.lang.String getAssignee()
          This is just a 'niceness' method so that the default assignee selected on the next page, if assignees are allowed, is the project lead.
 org.ofbiz.core.entity.GenericValue getAssignIn()
           
 java.util.List getButtons()
          Returns a list of CreateIssue.ButtonHolders for submit buttons required in addition to the standard 'submit' button.
 java.lang.String getCustomFieldCreateHtml(FieldLayoutItem fieldLayoutItem)
           
 java.util.List getCustomFields()
           
 java.util.Map getCustomFieldValuesHolder()
           
 java.lang.String getIssuetype()
           
 java.lang.String getIssueTypeDescription()
           
 org.ofbiz.core.entity.GenericValue getIssueTypeGV()
           
protected  java.util.Collection getIssueTypes()
           
 java.lang.Long getPid()
           
 java.lang.String getPriority()
           
 org.ofbiz.core.entity.GenericValue getProject()
           
 ProjectIssueType getProjectIssueType()
           
 java.lang.String getReporter()
           
 java.util.List getRequiredLayoutItems()
          Should check the project and issue type selected and only retrieve the correct fields
 java.lang.Long getSecurity()
           
 java.util.List getVisibleFieldLayoutItems()
           
 boolean isAttachable()
          Determine whether the current user can attach files to this issue
 boolean isHasProjectPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project)
          This is a special case where the has permissions should be informed that a new Issue is being created.
 boolean isSubTask()
           
protected  void recordHistoryIssueType()
           
 void setAssignee(java.lang.String assignee)
           
protected  void setHistoryIssuetype()
           
 void setIssuetype(java.lang.String issueType)
           
 void setPid(java.lang.Long pid)
           
 void setPriority(java.lang.String priority)
           
 void setReporter(java.lang.String reporter)
           
 void setSecurity(java.lang.Long security)
           
protected  void validateIssueType()
           
protected  void validateProject()
           
 
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
getDefaultSecurityLevel, getId, getIssue, getIssuePath, getKey, getSecurityLevel, getSecurityLevel, getSecurityLevelName, getSecurityLevels, getSecurityLevels, getViewIssueKey, getViewUrl, isEditable, isEditable, isIssueExists, redirectToView, resetIssue, setId, setIssue, setKey, setViewIssueKey
 
Methods inherited from class com.atlassian.jira.web.action.IssueActionSupport
getActionManager, getAttachmentManager, getCustomFieldManager, getDaysPerWeek, getHoursPerDay, getIssueManager, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getSearchRequest, getUrlEncoded, getWorkflow, isCustomFieldHidden, isFieldHidden, isFieldHidden, isFieldHidden, setCurrentIssue
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSavedFilters, getSelectedProject, isEnterprise, setSelectedProject, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, getAssignableUsers, getAssignableUsers, getCachedGroups, getColumnViewHtml, getComponentManager, getConstantsManager, getCustomFieldHtml, getCustomFieldXML, getDefaultAssignee, getDefaultResourceBundle, getField, getLocale, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getText, getText, getText, getText, getText, getUserFullName, getUserPreferences, getVersionManager, isDefaultAssignee, isDefaultAssignee, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, processDefaultAssignee, processDefaultAssignee, processDefaultAssignee, setReturnUrl
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, execute, getActionName, getApplicationProperties, getDelegator, getLocaleUtils, getResult, getUnescapedText, getWatcherManager, hasAnyErrors, isIndexing
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, addIllegalArgumentException, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, 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
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

pid

java.lang.Long pid

issuetype

java.lang.String issuetype

priority

java.lang.String priority

security

java.lang.Long security

reporter

protected java.lang.String reporter

customFieldValuesHolder

protected java.util.Map customFieldValuesHolder
Constructor Detail

CreateIssue

public CreateIssue()
Method Detail

doDefault

public java.lang.String doDefault()
                           throws java.lang.Exception
Throws:
java.lang.Exception

setHistoryIssuetype

protected void setHistoryIssuetype()

doValidation

protected void doValidation()

validateProject

protected void validateProject()
                        throws java.lang.Exception
Throws:
java.lang.Exception

validateIssueType

protected void validateIssueType()

doExecute

protected java.lang.String doExecute()
                              throws java.lang.Exception
Throws:
java.lang.Exception

recordHistoryIssueType

protected void recordHistoryIssueType()

getIssueTypes

protected java.util.Collection getIssueTypes()

getAllowedProjects

public java.util.Collection getAllowedProjects()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

getPid

public java.lang.Long getPid()

setPid

public void setPid(java.lang.Long pid)

getProject

public org.ofbiz.core.entity.GenericValue getProject()
                                              throws org.ofbiz.core.entity.GenericEntityException
Overrides:
getProject in class AbstractIssueSelectAction
Throws:
org.ofbiz.core.entity.GenericEntityException

getIssuetype

public java.lang.String getIssuetype()

setIssuetype

public void setIssuetype(java.lang.String issueType)

getIssueTypeGV

public org.ofbiz.core.entity.GenericValue getIssueTypeGV()

getPriority

public java.lang.String getPriority()

setPriority

public void setPriority(java.lang.String priority)

getAssignee

public java.lang.String getAssignee()
This is just a 'niceness' method so that the default assignee selected on the next page, if assignees are allowed, is the project lead.

Specified by:
getAssignee in interface Assignable

setAssignee

public void setAssignee(java.lang.String assignee)
Specified by:
setAssignee in interface Assignable

getSecurity

public java.lang.Long getSecurity()

setSecurity

public void setSecurity(java.lang.Long security)

isSubTask

public boolean isSubTask()

getRequiredLayoutItems

public java.util.List getRequiredLayoutItems()
Should check the project and issue type selected and only retrieve the correct fields

Returns:

getVisibleFieldLayoutItems

public java.util.List getVisibleFieldLayoutItems()

getAssignIn

public org.ofbiz.core.entity.GenericValue getAssignIn()
                                               throws java.lang.Exception
Specified by:
getAssignIn in interface Assignable
Throws:
java.lang.Exception

getIssueTypeDescription

public java.lang.String getIssueTypeDescription()

isAttachable

public boolean isAttachable()
                     throws java.lang.Exception
Determine whether the current user can attach files to this issue

Throws:
java.lang.Exception

getReporter

public java.lang.String getReporter()

setReporter

public void setReporter(java.lang.String reporter)

getCustomFields

public java.util.List getCustomFields()
                               throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getCustomFieldCreateHtml

public java.lang.String getCustomFieldCreateHtml(FieldLayoutItem fieldLayoutItem)

getCustomFieldValuesHolder

public java.util.Map getCustomFieldValuesHolder()
Specified by:
getCustomFieldValuesHolder in interface CustomFieldValuesAware

getButtons

public java.util.List getButtons()
                          throws WorkflowException
Returns a list of CreateIssue.ButtonHolders for submit buttons required in addition to the standard 'submit' button.

Throws:
WorkflowException

isHasProjectPermission

public boolean isHasProjectPermission(int permissionsId,
                                      org.ofbiz.core.entity.GenericValue project)
This is a special case where the has permissions should be informed that a new Issue is being created.

Overrides:
isHasProjectPermission in class JiraWebActionSupport

getProjectIssueType

public ProjectIssueType getProjectIssueType()


Copyright © 2002-2005 Atlassian. All Rights Reserved.