com.atlassian.jira.web.action
Class Dashboard

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.ProjectActionSupport
                  extended by com.atlassian.jira.web.action.IssueActionSupport
                      extended by com.atlassian.jira.web.action.Dashboard
All Implemented Interfaces:
ErrorCollection, I18nHelper, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
RunPortlet

public class Dashboard
extends IssueActionSupport

The action invoked to render a user's dashboard pages on the user's home page.

Since:
??
See Also:
Serialized Form

Field Summary
 
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
Dashboard(PortalPageService portalPageService)
           
 
Method Summary
protected  String doExecute()
          Action command that is executed for the dashboard.
protected  void doValidation()
          Check to make sure that it is possible to move the requested portlets.
 String getApplicationTitle()
           
 String getConfigureOnUrl()
          Returns to the caller the URL of the 'Configure: ON' link on the dashboard.
 Long getCurrentPageId()
          Return to the caller the id of the PortalPage being rendered.
 PortalPage getCurrentPortalPage()
          Return to the caller the PortalPage being rendered.
 Collection getDisplayPages()
          Return a list of pages that the user will see of the dashboard.
 String getManageDashboardUrl()
          Return to the caller the URL for the "Manage Dashboard" link on the user's dashboard.
 Long getMoveToPageId()
           
protected  PortalPageService getPortalPageService()
           
 Long[] getSelectedPortlets()
           
 List getSelectedPortletsList()
           
 Long getSelectPageId()
           
 Collection getUserPreferredPages()
          Return to the caller a list of PortalPages that the user *should* see on the dashboard.
 String getWarningMessage()
          Return a warning HTML string that will be displayed on the GUI.
 boolean isConfigureAllowed()
          Tells the caller if the user should be presented with the links to edit the current page.
 boolean isConfiguring()
          Called to decide if user is viewing the page in configure mode.
 boolean isHasPermission(String permName)
           
 boolean isSelectedPortlet(Long id)
           
 void setConfiguring(boolean configure)
          Set the configuring state in the user's session.
 void setMoveToPageId(Long moveToPageId)
           
 void setSelectedPortlets(Long[] selectedPortlets)
           
 void setSelectPageId(Long selectPageId)
           
 
Methods inherited from class com.atlassian.jira.web.action.IssueActionSupport
getAttachmentManager, getCustomFieldManager, getDaysPerWeek, getHoursPerDay, getIssueManager, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getSearchRequest, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isFieldHidden, isFieldHidden, isFieldHidden, setCurrentIssue, setSearchRequest, updateSearchRequest
 
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSelectedProjectId, setSelectedProject, setSelectedProject
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConstantsManager, 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, 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, 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
 

Constructor Detail

Dashboard

public Dashboard(PortalPageService portalPageService)
Method Detail

doValidation

protected void doValidation()
Check to make sure that it is possible to move the requested portlets.

Overrides:
doValidation in class webwork.action.ActionSupport

doExecute

protected String doExecute()
Action command that is executed for the dashboard. This command is really only used when a portlet is moved from one portal page to another.

The work done do render the dashboard is done in the JSP through the DashboardPageWebComponent.

Overrides:
doExecute in class webwork.action.ActionSupport
Returns:
the view to render.

getApplicationTitle

public String getApplicationTitle()

isHasPermission

public boolean isHasPermission(String permName)
Overrides:
isHasPermission in class JiraWebActionSupport

getConfigureOnUrl

public String getConfigureOnUrl()
Returns to the caller the URL of the 'Configure: ON' link on the dashboard.

Returns:
URL for the 'Configure: ON' link.

getManageDashboardUrl

public String getManageDashboardUrl()
Return to the caller the URL for the "Manage Dashboard" link on the user's dashboard.

Returns:
URL for the 'Manage Dashboard' link.

getCurrentPageId

public Long getCurrentPageId()
Return to the caller the id of the PortalPage being rendered. This method may load the PortalPage into memory if it has not already been read.

Returns:
the id of the PortalPage being rendered.

getCurrentPortalPage

public PortalPage getCurrentPortalPage()
Return to the caller the PortalPage being rendered. This method may load the PortalPage into memory if it has not already been read.

Returns:
the PortalPage being rendered.

getUserPreferredPages

public Collection getUserPreferredPages()
Return to the caller a list of PortalPages that the user *should* see on the dashboard. This will be the user's owned dashboard page on standard or the user's favourite pages on other editions.

The user may see more PortalPages on the dashboard if they are looking at a page they don't have favourited.

Returns:
a collection of pages that the user should see on the dashboard.

getDisplayPages

public Collection getDisplayPages()
Return a list of pages that the user will see of the dashboard. This will be the same as getUserPreferredPages() except when the user is looking at a page that don't have favourited. In that case a new collection with the extra page included will be returned.

Returns:
the list of pages that the user will see on the dashboard.

isConfiguring

public boolean isConfiguring()
Called to decide if user is viewing the page in configure mode. The page can only be in configure mode if the mode is in the session and they are the owner of the page.

Returns:
true of the page is in configure mode or false otherwise.

setConfiguring

public void setConfiguring(boolean configure)
Set the configuring state in the user's session.

Parameters:
configure - the state to set in the session.

isConfigureAllowed

public boolean isConfigureAllowed()
Tells the caller if the user should be presented with the links to edit the current page. This is not the same as isUserCurrentPageOwner() as sometimes we wish to display the edit links on the system default page so that the user can initialise their first dashboard.

Returns:
true if the edit links should be shown.

getWarningMessage

public String getWarningMessage()
Return a warning HTML string that will be displayed on the GUI.

Returns:
the HTML to display on the GUI.

getSelectedPortlets

public Long[] getSelectedPortlets()

getSelectedPortletsList

public List getSelectedPortletsList()

setSelectedPortlets

public void setSelectedPortlets(Long[] selectedPortlets)

isSelectedPortlet

public boolean isSelectedPortlet(Long id)

getMoveToPageId

public Long getMoveToPageId()

setMoveToPageId

public void setMoveToPageId(Long moveToPageId)

getSelectPageId

public Long getSelectPageId()

setSelectPageId

public void setSelectPageId(Long selectPageId)

getPortalPageService

protected PortalPageService getPortalPageService()


Copyright © 2002-2009 Atlassian. All Rights Reserved.