com.atlassian.gadgets.refimpl
Class AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl

java.lang.Object
  extended by com.atlassian.gadgets.refimpl.AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl
All Implemented Interfaces:
PluginGadgetSpecProviderPermission

public class AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl
extends Object
implements PluginGadgetSpecProviderPermission

Checks the PluginGadgetSpec for a "admin-only" parameter and, if the value is true, only allows admins to see the gadget in the gadget browser.


Constructor Summary
AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl(com.atlassian.sal.api.user.UserManager userManager)
           
 
Method Summary
 Vote voteOn(PluginGadgetSpec gadgetSpec)
          Returns the implementation's Vote on whether the specified gadget spec should be appear in the gadget browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl

public AllowAdminOnlyPluginGadgetSpecProviderPermissionImpl(com.atlassian.sal.api.user.UserManager userManager)
Method Detail

voteOn

public Vote voteOn(PluginGadgetSpec gadgetSpec)
Description copied from interface: PluginGadgetSpecProviderPermission

Returns the implementation's Vote on whether the specified gadget spec should be appear in the gadget browser.

If DENY is returned, the gadget should not appear, no matter what any other implementations vote may be.

If ALLOW is returned, the gadget should appear in the gadget browser unless another implementation explicitly denies its appearance.

PASS will be returned if the implementation has no opinion on whether the gadget should show up in the gadget browser.

Specified by:
voteOn in interface PluginGadgetSpecProviderPermission
Parameters:
gadgetSpec - the gadget spec found in a plugin that will be evaluated
Returns:
this implementation's Vote on whether to the gadget should appear in the gadget browser


Copyright © 2011 Atlassian. All Rights Reserved.