/** * Returns the thumbnail of the gadget. * * @return the thumbnail of the gadget. */ public String getThumbnail() { return getProperty(THUMBNAIL); }
/** * Returns the cached iframe source of the gadget. * * @return the cached iframe source of the gadget. */ public String getIframe() { return getProperty(IFRAME); }
/** * Returns the category of the gadget. * * @return the category of the gadget. */ public String getCategory() { return getProperty(CATEGORY); }
/** * Returns the title of the gadget. * * @return the title of the gadget. */ public String getTitle() { return getProperty(TITLE); }
/** * Returns the author of the gadget. * * @return the author of the gadget. */ public String getAuthor() { return getProperty(AUTHOR); }
/** * Returns the pref of the gadget. * * @return the pref of the gadget. */ public String getPref() { return getProperty(PREF); }
/** * Returns the URL for the gadget. * * @return the URL for the gadget. */ public String getUrl() { return getProperty(URL); }
/** * Check if an {@link org.waveprotocol.wave.model.document.raw.impl.Element} * is and a {@link Gadget} * * @param rawElement * @param element * @return */ private boolean sameGadgets(org.waveprotocol.wave.model.document.raw.impl.Element rawElement, Gadget element) { String ifr1 = rawElement.getAttribute("ifr"); String ifr2 = element.getProperty("ifr"); return (ifr1 != null && ifr1.equals(ifr2)); } }
public void testUrlConstructor() { Gadget gadget = new Gadget(URL); assertEquals(ElementType.GADGET, gadget.getType()); assertEquals(URL, gadget.getProperty(URL)); assertEquals(URL, gadget.getUrl()); } }
public void testDefaultConstructor() { Gadget gadget = new Gadget(); assertEquals(ElementType.GADGET, gadget.getType()); assertEquals(EMPTY_STRING, gadget.getProperty(URL)); assertEquals(EMPTY_STRING, gadget.getUrl()); }
public void testDefaultConstructor() { Gadget gadget = new Gadget(); assertEquals(ElementType.GADGET, gadget.getType()); assertEquals(EMPTY_STRING, gadget.getProperty(URL)); assertEquals(EMPTY_STRING, gadget.getUrl()); }
public void testUrlConstructor() { Gadget gadget = new Gadget(URL); assertEquals(ElementType.GADGET, gadget.getType()); assertEquals(URL, gadget.getProperty(URL)); assertEquals(URL, gadget.getUrl()); } }
assertEquals(updatedPropertyValue, gadget.getProperty(propertyName)); assertNotNull(gadget.getProperty(newPropertyName)); assertEquals(newPropertyValue, gadget.getProperty(newPropertyName)); assertNull(gadget.getProperty(propertyNameToDelete));
assertEquals(updatedPropertyValue, gadget.getProperty(propertyName)); assertNotNull(gadget.getProperty(newPropertyName)); assertEquals(newPropertyValue, gadget.getProperty(newPropertyName)); assertNull(gadget.getProperty(propertyNameToDelete));