com.atlassian.gadgets.directory.internal.impl
Class GadgetSpecUrlRenderPermissionImpl

java.lang.Object
  extended by com.atlassian.gadgets.directory.internal.impl.GadgetSpecUrlRenderPermissionImpl
All Implemented Interfaces:
GadgetSpecUrlRenderPermission

public class GadgetSpecUrlRenderPermissionImpl
extends Object
implements GadgetSpecUrlRenderPermission

Simple implementation that allows only syntactically valid URIs which are present in the directory.


Constructor Summary
GadgetSpecUrlRenderPermissionImpl(Directory directory)
          Constructor.
 
Method Summary
 Vote voteOn(String gadgetSpecUri)
          Returns the implementation's Vote on whether the specified gadget spec should be allowed to render.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetSpecUrlRenderPermissionImpl

public GadgetSpecUrlRenderPermissionImpl(Directory directory)
Constructor.

Parameters:
directory - the Directory implementation to check for gadget specs
Method Detail

voteOn

public Vote voteOn(String gadgetSpecUri)
Description copied from interface: GadgetSpecUrlRenderPermission

Returns the implementation's Vote on whether the specified gadget spec should be allowed to render.

If DENY is returned, the gadget URI is explicitly forbidden to render, no matter what any other implementations vote may be.

If ALLOW is returned, the gadget URI is explicitly allowed to render unless another implementation explicitly denies the rendering permission.

PASS will be returned if the implementation has no opinion on whether the URI may render.

Specified by:
voteOn in interface GadgetSpecUrlRenderPermission
Parameters:
gadgetSpecUri - the gadget spec URI to evaluate
Returns:
this implementation's Vote on whether to render the gadget


Copyright © 2011 Atlassian. All Rights Reserved.