Package com.google.wave.api

Examples of com.google.wave.api.Blip.first()


    // 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
View Full Code Here


    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.");
      blip.first(ElementType.IMAGE).updateElement(
          ImmutableMap.of("url", "http://www.google.com/logos/poppy09.gif"));
    }
View Full Code Here

      // 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.");
      blip.first(ElementType.IMAGE).updateElement(
          ImmutableMap.of("url", "http://www.google.com/logos/poppy09.gif"));
    }

    // Update installer either way.
    String extensionInstallerUrl = "http://google-wave-resources.googlecode.com/svn/trunk/" +
View Full Code Here

    }

    // Update installer either way.
    String extensionInstallerUrl = "http://google-wave-resources.googlecode.com/svn/trunk/" +
        "samples/extensions/gadgets/mappy/installer.xml";
    blip.first(ElementType.INSTALLER).updateElement(
        ImmutableMap.of("manifest", extensionInstallerUrl));
  }

  @Capability(contexts = {Context.SELF})
  @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.