com.atlassian.gadgets.test
Class GadgetIframeParser

java.lang.Object
  extended by com.atlassian.gadgets.test.GadgetIframeParser

public class GadgetIframeParser
extends Object

Wrapper for a gadget iframe DOM element that provides convenient access to element attributes and gadget properties that can be parsed from the element.


Method Summary
 String getModuleId()
          Returns the module ID of the gadget represented by this parser.
 String getName()
          Returns the name attribute of the iframe.
 URI getRenderedGadgetUrl()
          Returns the URI of the rendered gadget represented by this parser.
static GadgetIframeParser parseIframe(Node iframe)
          Creates and returns a new GadgetIframeParser for the specified iframe DOM node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseIframe

public static GadgetIframeParser parseIframe(Node iframe)
Creates and returns a new GadgetIframeParser for the specified iframe DOM node.

Parameters:
iframe - the iframe DOM node. Must not be null or a NullPointerException will be thrown
Returns:
a new GadgetIframeParser for the specified iframe DOM node
Throws:
IllegalArgumentException - if the specified DOM node is not an iframe element
NullPointerException - if the specified DOM node is null

getModuleId

public String getModuleId()
Returns the module ID of the gadget represented by this parser. This is parsed from the iframe id attribute.

Returns:
the module ID of the gadget

getName

public String getName()
Returns the name attribute of the iframe.

Returns:
the iframe name

getRenderedGadgetUrl

public URI getRenderedGadgetUrl()
Returns the URI of the rendered gadget represented by this parser. This is the iframe src attribute.

Returns:
the URI of the rendered gadget


Copyright © 2010 Atlassian. All Rights Reserved.