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, ModuleId moduleId, View view, GadgetRequestContext gadgetRequestContext)
          Returns the URL to the rendered gadget.
 URI build(GadgetState gadget, View view, GadgetRequestContext gadgetRequestContext)
          Deprecated. as of 2.0, use build(GadgetState, ModuleId, View, GadgetRequestContext)
 
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

@Deprecated
public URI build(GadgetState gadget,
                            View view,
                            GadgetRequestContext gadgetRequestContext)
Deprecated. as of 2.0, use build(GadgetState, ModuleId, View, GadgetRequestContext)

Returns the URL to the rendered gadget.

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

build

public final URI build(GadgetState gadget,
                       ModuleId moduleId,
                       View view,
                       GadgetRequestContext gadgetRequestContext)
Description copied from interface: RenderedGadgetUriBuilder
Returns the URL to the rendered gadget.

Specified by:
build in interface RenderedGadgetUriBuilder
Parameters:
gadget - gadget used to insert the gadget's spec URL
moduleId - the moduleId to use in the URL. Should be unique for the HTML page that the gadget will be rendered in.
view - the view to render the gadget in
gadgetRequestContext - context for this request
Returns:
URL to the rendered gadget


Copyright © 2011 Atlassian. All Rights Reserved.