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

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.AbstractViewIssue
                              extended bycom.atlassian.jira.web.action.issue.AbstractCommentableIssue
                                  extended bycom.atlassian.jira.web.action.issue.AddComment
                                      extended bycom.atlassian.jira.web.action.issue.ViewIssue
All Implemented Interfaces:
webwork.action.Action, webwork.action.CommandDriven, ErrorCollection, I18nHelper, webwork.action.IllegalArgumentAware, OperationContext, Serializable
Direct Known Subclasses:
ManageAttachments, ManageLinks, ManageTrackbacks

public class ViewIssue
extends AddComment
implements OperationContext

See Also:
Serialized Form

Field Summary
(package private)  String actionOrder
           
(package private)  List actions
           
(package private)  List components
           
(package private)  List fixVersions
           
(package private)  String page
           
(package private)  List versions
           
(package private)  String vote
           
(package private)  String watch
           
 
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
 
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
ViewIssue(RepositoryManager repositoryManager, PermissionManager permissionManager, TrackbackManager trackbackManager, ThumbnailManager thumbnailManager, SubTaskManager subTaskManager, IssueLinkManager issueLinkManager, IssueLinkTypeManager issueLinkTypeManager, VoteManager voteManager, WatcherManager watcherManager, com.atlassian.plugin.PluginManager pluginManager, IssueUtilsBean issueUtilsBean, FieldManager fieldManager, FieldScreenRendererFactory fieldScreenRendererFactory, FieldLayoutManager fieldLayoutManager, RendererManager rendererManager, IssueFactory issueFactory)
           
 
Method Summary
protected  String doExecute()
           
 String doMoveIssueLink()
           
protected  void doValidation()
           
 String getActionOrder()
           
 Collection getActions()
           
 org.ofbiz.core.entity.GenericValue getAssignIn()
           
 Map getAvailableActions()
           
 Map getAvailableActions(org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use getAvailableActions(com.atlassian.jira.issue.Issue) instead.
 Map getAvailableActions(Issue issue)
           
 Collection getComponents()
           
 Long getCurrentSubTaskSequence()
           
 String getCustomFieldHtml(FieldLayoutItem fieldLayoutItem, CustomField field, Issue issue)
           
 String getCustomFieldValue(org.ofbiz.core.entity.GenericValue customfield)
          Used for XML view of an issue
 String getCustomFieldXML(CustomField field, Issue issue)
           
 String getDurationString(Long millis)
          Used by the rss view to display time estimates.
 String getEstimate()
           
protected  FieldScreenRenderer getFieldScreenRenderer()
           
 List getFieldScreenRenderTabs()
           
 Collection getFileAttachments()
           
 Collection getFixVersions()
           
 Collection getImageAttachments()
           
 Collection getIssueOperations()
           
 Collection getIssueTabPanels()
           
 String getIssuetype()
           
 String getIssueUrl()
           
 JiraWorkflow getJiraWorkflow()
           
 String getOldIssueUrl()
           
 String getPage()
          Determine which page of the ViewIssue we're on

Options are : comments - brief overview of the issue and all the comments (default) details - detailed view of the issue history - the history log of the issue

 PagerManager getPagerManager()
           
 org.ofbiz.core.entity.GenericValue getParentIssue()
           
 String getRenderedContent(String fieldName, String value, Issue issue)
           
 String getRenderedContentNoBreaks(String fieldName, String value, Issue issue)
           
protected  RepositoryManager getRepositoryManager()
           
 String getRssMode()
           
 int getSelectedTab()
           
 SearchSort getSorter()
           
 SubTaskBean getSubTaskBean()
           
 Collection getSubTaskIssueTypes()
           
 SubTaskQuickCreationWebComponent getSubTaskQuickCreationWebComponent()
           
 Long getSubTaskSequence()
           
 String getSubTaskView()
           
 Collection getThumbnails()
           
 String getTimeOriginalEstimate()
           
 String getTimeSpent()
           
 com.atlassian.trackback.Trackback getTrackback(Long id)
           
 Collection getTrackbacks()
           
 Set getValidCustomFields()
          Used for XML view of an issue
 Collection getVersions()
           
 String getView()
          Retrieve the value of the view variable.
 List getVisibleCustomFields()
           
 List getVisibleCustomFields(org.ofbiz.core.entity.GenericValue issue)
          Deprecated. Use getVisibleCustomFields(com.atlassian.jira.issue.Issue) instead.
 List getVisibleCustomFields(Issue issue)
           
 Collection getWatcherList()
           
 boolean isAllowedReorderSubTasks()
           
 boolean isAttachable()
          Determine whether the current user can attach files to this issue
 boolean isCanViewProjectRepositories()
          Check that the user has permission to view repositories and that the project has at least one associated repository
 boolean isCanViewVoterWatcherList()
           
 boolean isCanViewWatcherList()
           
 boolean isIssueLinkCreatable()
          Tests whether linking is enabled and the user has the link issue permission in the issue's project and whether there are any existing (non-system) issue link types.
 boolean isIssueReportedByMe()
           
 boolean isMovable()
          Determine whether the current user can Move the issue
 boolean isShowIssueDetails(Long projectId, org.ofbiz.core.entity.GenericValue issue)
          Determine if table displaying time tracking, attachments, environment, issue linking, trackbacks is required.
 boolean isSubTask()
          Determines whether the issue is a sub task - i.e.
 boolean isToolkitAvailable()
           
 Boolean isViewIssue()
          Return Boolean.TRUE if this is the ViewIssue page (so the UI can customise itself).
 boolean isVotedAlready()
          Determine whether the current user has voted already or not
 boolean isWatchingAlready()
          Determine whether the current user is already watching the issue or not
 boolean isWorkable()
          Determine whether the current user can work on this issue
 boolean isWorkflowAllowsEdit()
           
 void setActionOrder(String actionOrder)
           
 void setCurrentSubTaskSequence(Long currentSubTaskSequence)
           
 void setIssuetype(String issuetypeId)
           
 void setPage(String page)
           
 void setResetPager(String resetPager)
           
 void setRssMode(String rssMode)
           
 void setSubTaskSequence(Long subTaskSequence)
           
 void setSubTaskView(String subTaskView)
           
 void setView(String view)
          Set the view, valid value are null or rss
 void setVote(String vote)
           
 void setWatch(String watch)
           
 
Methods inherited from class com.atlassian.jira.web.action.issue.AddComment
doDefault, isAbleToComment
 
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractCommentableIssue
createComment, doCommentValidation, getComment, getCommentLevel, getCommentLevels, getCustomFieldValuesHolder, getFieldScreenRendererLayoutItemForField, getFieldScreenRendererWithAllFields, getIssueOperation, setComment, setCommentLevel, setCustomFieldValuesHolder
 
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractViewIssue
getAttachments, getIssueLinkManager, getLinkCollection, getLinkCollection, getPossibleComponents, getPossibleVersions, getPossibleVersionsReleasedFirst, getSubTaskManager, isScreenshotAttachable, isSubTaskCreatable
 
Methods inherited from class com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
getDefaultSecurityLevel, getId, getIssue, getIssueObject, getIssueObjectNoSecurityCheck, getIssuePath, getKey, getProject, getSecurityLevel, getSecurityLevel, getSecurityLevelName, getSecurityLevels, getSecurityLevels, getViewIssueKey, getViewUrl, isEditable, isEditable, isIssueExists, isWorkflowAllowsEdit, 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, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isFieldHidden, isFieldHidden, isFieldHidden, setCurrentIssue
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSelectedProjectId, setSelectedProject
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getCalendarTranslationFilenameForLanguage, getComponentManager, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getSavedFilters, getSelectedProject, getText, getTimeFormat, getUserFullName, getVersionManager, getWebworkStack, getWebworkStack, isHasCalendarTranslationForLanguage, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, 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, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, 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.issue.customfields.OperationContext
getCustomFieldValuesHolder, getIssueOperation
 
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

page

String page

actionOrder

String actionOrder

actions

List actions

versions

List versions

components

List components

fixVersions

List fixVersions

vote

String vote

watch

String watch
Constructor Detail

ViewIssue

public ViewIssue(RepositoryManager repositoryManager,
                 PermissionManager permissionManager,
                 TrackbackManager trackbackManager,
                 ThumbnailManager thumbnailManager,
                 SubTaskManager subTaskManager,
                 IssueLinkManager issueLinkManager,
                 IssueLinkTypeManager issueLinkTypeManager,
                 VoteManager voteManager,
                 WatcherManager watcherManager,
                 com.atlassian.plugin.PluginManager pluginManager,
                 IssueUtilsBean issueUtilsBean,
                 FieldManager fieldManager,
                 FieldScreenRendererFactory fieldScreenRendererFactory,
                 FieldLayoutManager fieldLayoutManager,
                 RendererManager rendererManager,
                 IssueFactory issueFactory)
Method Detail

doValidation

protected void doValidation()
Overrides:
doValidation in class AddComment

doExecute

protected String doExecute()
                    throws Exception
Overrides:
doExecute in class AddComment
Throws:
Exception

getPagerManager

public PagerManager getPagerManager()

getComponents

public Collection getComponents()
                         throws Exception
Throws:
Exception

getVersions

public Collection getVersions()
                       throws Exception
Throws:
Exception

getFixVersions

public Collection getFixVersions()
                          throws Exception
Throws:
Exception

isMovable

public boolean isMovable()
                  throws Exception
Determine whether the current user can Move the issue

Throws:
Exception

isWorkable

public boolean isWorkable()
                   throws Exception
Determine whether the current user can work on this issue

Throws:
Exception

isWorkflowAllowsEdit

public boolean isWorkflowAllowsEdit()

isAttachable

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

Throws:
Exception

isViewIssue

public Boolean isViewIssue()
Return Boolean.TRUE if this is the ViewIssue page (so the UI can customise itself).

Any subclass should probably return FALSE.


isWatchingAlready

public boolean isWatchingAlready()
                          throws Exception
Determine whether the current user is already watching the issue or not

Throws:
Exception

isIssueReportedByMe

public boolean isIssueReportedByMe()
                            throws Exception
Throws:
Exception

getPage

public String getPage()
Determine which page of the ViewIssue we're on

Options are : comments - brief overview of the issue and all the comments (default) details - detailed view of the issue history - the history log of the issue


setPage

public void setPage(String page)

getActions

public Collection getActions()
                      throws Exception
Throws:
Exception

getIssueTabPanels

public Collection getIssueTabPanels()

getIssueOperations

public Collection getIssueOperations()

getAvailableActions

public Map getAvailableActions()
                        throws Exception
Throws:
Exception

getAvailableActions

public Map getAvailableActions(Issue issue)
                        throws Exception
Throws:
Exception

getAvailableActions

public Map getAvailableActions(org.ofbiz.core.entity.GenericValue issue)
                        throws Exception
Deprecated. Use getAvailableActions(com.atlassian.jira.issue.Issue) instead.

Throws:
Exception

getEstimate

public String getEstimate()
                   throws Exception
Throws:
Exception

getTimeOriginalEstimate

public String getTimeOriginalEstimate()
                               throws Exception
Throws:
Exception

getTimeSpent

public String getTimeSpent()
                    throws Exception
Throws:
Exception

setVote

public void setVote(String vote)

setWatch

public void setWatch(String watch)

getVisibleCustomFields

public List getVisibleCustomFields()

getVisibleCustomFields

public List getVisibleCustomFields(Issue issue)

getVisibleCustomFields

public List getVisibleCustomFields(org.ofbiz.core.entity.GenericValue issue)
Deprecated. Use getVisibleCustomFields(com.atlassian.jira.issue.Issue) instead.


setResetPager

public void setResetPager(String resetPager)

isCanViewProjectRepositories

public boolean isCanViewProjectRepositories()
Check that the user has permission to view repositories and that the project has at least one associated repository


getRepositoryManager

protected RepositoryManager getRepositoryManager()

getIssueUrl

public String getIssueUrl()

getOldIssueUrl

public String getOldIssueUrl()

getTrackbacks

public Collection getTrackbacks()
                         throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getTrackback

public com.atlassian.trackback.Trackback getTrackback(Long id)
                                               throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getThumbnails

public Collection getThumbnails()
                         throws Exception
Throws:
Exception

getFileAttachments

public Collection getFileAttachments()
                              throws Exception
Throws:
Exception

getImageAttachments

public Collection getImageAttachments()
                               throws Exception
Throws:
Exception

isToolkitAvailable

public boolean isToolkitAvailable()

getValidCustomFields

public Set getValidCustomFields()
                         throws FieldException
Used for XML view of an issue

Throws:
FieldException

getCustomFieldValue

public String getCustomFieldValue(org.ofbiz.core.entity.GenericValue customfield)
                           throws Exception
Used for XML view of an issue

Throws:
Exception

getView

public String getView()
Retrieve the value of the view variable. currently null or rss


setView

public void setView(String view)
Set the view, valid value are null or rss

Parameters:
view -

getDurationString

public String getDurationString(Long millis)
Used by the rss view to display time estimates.

Parameters:
millis -

getParentIssue

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

getSubTaskBean

public SubTaskBean getSubTaskBean()

getSorter

public SearchSort getSorter()

doMoveIssueLink

public String doMoveIssueLink()
                       throws Exception
Throws:
Exception

isAllowedReorderSubTasks

public boolean isAllowedReorderSubTasks()

getSubTaskView

public String getSubTaskView()

setSubTaskView

public void setSubTaskView(String subTaskView)

getCurrentSubTaskSequence

public Long getCurrentSubTaskSequence()

setCurrentSubTaskSequence

public void setCurrentSubTaskSequence(Long currentSubTaskSequence)

getSubTaskSequence

public Long getSubTaskSequence()

setSubTaskSequence

public void setSubTaskSequence(Long subTaskSequence)

getSubTaskIssueTypes

public Collection getSubTaskIssueTypes()

getAssignIn

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

getJiraWorkflow

public JiraWorkflow getJiraWorkflow()
                             throws WorkflowException
Throws:
WorkflowException

isIssueLinkCreatable

public boolean isIssueLinkCreatable()
Tests whether linking is enabled and the user has the link issue permission in the issue's project and whether there are any existing (non-system) issue link types.


setIssuetype

public void setIssuetype(String issuetypeId)

getIssuetype

public String getIssuetype()

isShowIssueDetails

public boolean isShowIssueDetails(Long projectId,
                                  org.ofbiz.core.entity.GenericValue issue)
                           throws Exception
Determine if table displaying time tracking, attachments, environment, issue linking, trackbacks is required.

Throws:
Exception

isSubTask

public boolean isSubTask()
Description copied from class: AbstractViewIssue
Determines whether the issue is a sub task - i.e. if it has any incoming sub-task issue links

Overrides:
isSubTask in class AbstractViewIssue

isVotedAlready

public boolean isVotedAlready()
Determine whether the current user has voted already or not


isCanViewVoterWatcherList

public boolean isCanViewVoterWatcherList()
                                  throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

isCanViewWatcherList

public boolean isCanViewWatcherList()
                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getWatcherList

public Collection getWatcherList()

getActionOrder

public String getActionOrder()

setActionOrder

public void setActionOrder(String actionOrder)

getFieldScreenRenderTabs

public List getFieldScreenRenderTabs()

getFieldScreenRenderer

protected FieldScreenRenderer getFieldScreenRenderer()

getSubTaskQuickCreationWebComponent

public SubTaskQuickCreationWebComponent getSubTaskQuickCreationWebComponent()

getSelectedTab

public int getSelectedTab()

getCustomFieldHtml

public String getCustomFieldHtml(FieldLayoutItem fieldLayoutItem,
                                 CustomField field,
                                 Issue issue)

getCustomFieldXML

public String getCustomFieldXML(CustomField field,
                                Issue issue)
                         throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

getRssMode

public String getRssMode()

setRssMode

public void setRssMode(String rssMode)

getRenderedContent

public String getRenderedContent(String fieldName,
                                 String value,
                                 Issue issue)
                          throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

getRenderedContentNoBreaks

public String getRenderedContentNoBreaks(String fieldName,
                                         String value,
                                         Issue issue)
                                  throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException


Copyright © 2002-2006 Atlassian. All Rights Reserved.