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 java.lang.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, java.util.Map session)
           
PortalPageRetriever(PortalPageService portalPageService, java.util.Map session, java.lang.Long requestedPageId)
           
 
Method Summary
 java.lang.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.
 java.lang.Long getRequestedPageId()
           
 void setRequestedPageId(java.lang.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,
                           java.util.Map session,
                           java.lang.Long requestedPageId)

PortalPageRetriever

public PortalPageRetriever(PortalPageService portalPageService,
                           java.util.Map session)
Method Detail

getPageId

public java.lang.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 java.lang.Long getRequestedPageId()

setRequestedPageId

public void setRequestedPageId(java.lang.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-2010 Atlassian. All Rights Reserved.