com.atlassian.jira.web.action.util.portal
Class PortalPageRetriever

java.lang.Object
  extended by com.atlassian.jira.web.action.util.portal.PortalPageRetriever

public class PortalPageRetriever
extends Object

Object used by actions to retrieve PortalPages. This class caches the results of lookups to ensure they are quick.

Since:
v3.13

Constructor Summary
PortalPageRetriever(PortalPageService portalPageService, UserHistoryManager userHistoryManager, JiraAuthenticationContext authenticationContext)
           
PortalPageRetriever(PortalPageService portalPageService, UserHistoryManager userHistoryManager, JiraAuthenticationContext authenticationContext, Long requestedPageId)
           
 
Method Summary
 Long getPageId()
          Return the id of the PortalPage a user is currently using.
 PortalPage getPortalPage(JiraServiceContext ctx)
          Return the PortalPage a user is currently using.
 Long getRequestedPageId()
           
 void setRequestedPageId(Long requestedPageId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortalPageRetriever

public PortalPageRetriever(PortalPageService portalPageService,
                           UserHistoryManager userHistoryManager,
                           JiraAuthenticationContext authenticationContext,
                           Long requestedPageId)

PortalPageRetriever

public PortalPageRetriever(PortalPageService portalPageService,
                           UserHistoryManager userHistoryManager,
                           JiraAuthenticationContext authenticationContext)
Method Detail

getPageId

public Long getPageId()
Return the id of the PortalPage a user is currently using. It returns the id stored in this object if it exists or the id from the session if it does not. It will return null of the id could not be returned found in either.

Returns:
the id of PortalPage the user is currently operating under.

getRequestedPageId

public Long getRequestedPageId()

setRequestedPageId

public void setRequestedPageId(Long requestedPageId)

getPortalPage

public PortalPage getPortalPage(JiraServiceContext ctx)
Return the PortalPage a user is currently using. This method caches the result of the first lookup and continues to return the same value. While the same value may be returned, only the first call will ever put error messages into the passed context. null may be returned if it is not possible to work user's current PortalPage.

Parameters:
ctx - the service context to execute the method
Returns:
the user's current PortalPage or null if no such page exists.


Copyright © 2002-2014 Atlassian. All Rights Reserved.