com.atlassian.jira.portal
Interface PortletAccessManager

All Known Implementing Classes:
DefaultPortletAccessManager

public interface PortletAccessManager

This provides access to Portlet objects

Since:
v3.13

Method Summary
 boolean canUserSeePortlet(User user, Portlet portlet)
          This returns true if the specified user is allowed to see the passed Portlet
 boolean canUserSeePortlet(User user, String portletKey)
          This returns true if the specified user is allowed to see the Portlet represented by the given portletKey
 Collection<Portlet> getAllPortlets()
          Return all the portlets available on the system.
 Portlet getPortlet(String portletKey)
          This returns a Portlet based on portletKey
 Portlet getPortlet(User user, String portletKey)
          Called to return a Portlet that can be seen by the User and which has the key of portletKey
 Collection<Portlet> getVisiblePortlets(User user)
          This returns all Portlet's that a user can see
 

Method Detail

getPortlet

Portlet getPortlet(User user,
                   String portletKey)
Called to return a Portlet that can be seen by the User and which has the key of portletKey

Parameters:
user - the user context in which to return the Portlet
portletKey - the key of the Portlet
Returns:
a Portlet if the user can see it or null if they dont have permission or the portletKey is invalid

getPortlet

Portlet getPortlet(String portletKey)
This returns a Portlet based on portletKey

Parameters:
portletKey - the key of the Portlet
Returns:
a Portlet or null if one can be found with the specified key

getAllPortlets

Collection<Portlet> getAllPortlets()
Return all the portlets available on the system.

Returns:
a collection of all the portlets available on the system.

getVisiblePortlets

Collection<Portlet> getVisiblePortlets(User user)
This returns all Portlet's that a user can see

Parameters:
user - the User in play
Returns:
a non null Collection of Portlet objects

canUserSeePortlet

boolean canUserSeePortlet(User user,
                          String portletKey)
This returns true if the specified user is allowed to see the Portlet represented by the given portletKey

Parameters:
user - the user to test.
portletKey - the key of the Portlet
Returns:
true if the user has permission to view the Portlet

canUserSeePortlet

boolean canUserSeePortlet(User user,
                          Portlet portlet)
This returns true if the specified user is allowed to see the passed Portlet

Parameters:
user - the user to test.
portlet - the portlet the check
Returns:
true if the user has permission to view the Portlet


Copyright © 2002-2009 Atlassian. All Rights Reserved.