// Invoked when any blip we are interested in is submitted.
LOG.info("onBlipSubmitted");
Blip blip = e.getBlip();
String gadgetUrl = "http://jkitchensinky.appspot.com/public/embed.xml";
Gadget gadget = Gadget.class.cast(blip.first(ElementType.GADGET,
Gadget.restrictByUrl(gadgetUrl)).value());
if (gadget != null &&
gadget.getProperty("loaded", "no").equals("yes") &&
gadget.getProperty("seen", "no").equals("no")) {
// Elements should always be updated through a BlipContentRefs to
// correspond the matching operations for the wire.
blip.first(ElementType.GADGET, Gadget.restrictByUrl(gadgetUrl)).updateElement(
ImmutableMap.of("seen", "yes"));
blip.append("\nSeems all to have worked out.");