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

Method Detail

getPortlet

Portlet getPortlet(com.opensymphony.user.User user,
                   java.lang.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(java.lang.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

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

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

getVisiblePortlets

java.util.Collection<Portlet> getVisiblePortlets(com.opensymphony.user.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(com.opensymphony.user.User user,
                          java.lang.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(com.opensymphony.user.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-2010 Atlassian. All Rights Reserved.