com.atlassian.gadgets.embedded.internal
Class GadgetUrlBuilder

java.lang.Object
  extended by com.atlassian.gadgets.util.AbstractUrlBuilder
      extended by com.atlassian.gadgets.embedded.internal.GadgetUrlBuilder
All Implemented Interfaces:
UrlBuilder, RenderedGadgetUriBuilder

public class GadgetUrlBuilder
extends AbstractUrlBuilder
implements RenderedGadgetUriBuilder

Builds URLs to the rendered gadget.


Field Summary
 
Fields inherited from class com.atlassian.gadgets.util.AbstractUrlBuilder
applicationProperties, webResourceManager
 
Constructor Summary
GadgetUrlBuilder(com.atlassian.sal.api.ApplicationProperties applicationProperties, com.atlassian.plugin.webresource.WebResourceManager webResourceManager, SecurityTokenFactory securityTokenFactory, GadgetSpecFactory gadgetSpecFactory)
          Constructor.
 
Method Summary
 URI build(GadgetState gadget, View view, GadgetRequestContext gadgetRequestContext)
          Returns the URL to the rendered gadget.
 
Methods inherited from class com.atlassian.gadgets.util.AbstractUrlBuilder
buildImageUrl, buildRpcJsUrl, getBaseUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetUrlBuilder

public GadgetUrlBuilder(com.atlassian.sal.api.ApplicationProperties applicationProperties,
                        com.atlassian.plugin.webresource.WebResourceManager webResourceManager,
                        SecurityTokenFactory securityTokenFactory,
                        GadgetSpecFactory gadgetSpecFactory)
Constructor.

Parameters:
applicationProperties - the ApplicationProperties implementation to use
webResourceManager - the WebResourceManager implementation to use
securityTokenFactory - the SecurityTokenFactory implementation to use
gadgetSpecFactory - the GadgetSpecFactory implementation to use
Method Detail

build

public final URI build(GadgetState gadget,
                       View view,
                       GadgetRequestContext gadgetRequestContext)
Returns the URL to the rendered gadget.

Specified by:
build in interface RenderedGadgetUriBuilder
Parameters:
gadget - the gadget used to insert the gadget's spec URL
view - the view to render the gadget in
gadgetRequestContext - the context associated with the current gadget request
Returns:
URL to the rendered gadget


Copyright © 2009 Atlassian. All Rights Reserved.