Package com.google.gdata.data

Examples of com.google.gdata.data.PlainTextConstruct


     * @throws MalformedURLException
     */
    public SiteEntry createSite(String title, String summary, String theme)
        throws MalformedURLException, IOException, ServiceException {
      SiteEntry entry = new SiteEntry();
      entry.setTitle(new PlainTextConstruct(title));
      entry.setSummary(new PlainTextConstruct(summary));

      // Set theme if user specified it.
      if (theme !=  null) {
        Theme tt = new Theme();
        tt.setValue(theme);
View Full Code Here


     * @throws MalformedURLException
     */
    public SiteEntry copySite(String title, String summary, String sourceHref)
        throws MalformedURLException, IOException, ServiceException {
      SiteEntry entry = new SiteEntry();
      entry.setTitle(new PlainTextConstruct(title));
      entry.setSummary(new PlainTextConstruct(summary));
      entry.addLink(SitesLink.Rel.SOURCE, Link.Type.ATOM, sourceHref);

      return service.insert(new URL(getSiteFeedUrl()), entry);
    }
View Full Code Here

        } else {
          throw new SitesException("Unknown kind '" + kind + "'");
        }
      }

      entry.setTitle(new PlainTextConstruct(title));
      setContentBlob(entry);

      // Upload to a parent page?
      if (parent !=  null) {
        if (parent.lastIndexOf("/") == -1) {
View Full Code Here

        String description) throws IOException, ServiceException  {
      String fileMimeType = mediaTypes.getContentType(file);

      AttachmentEntry newAttachment = new AttachmentEntry();
      newAttachment.setMediaSource(new MediaFileSource(file, fileMimeType));
      newAttachment.setTitle(new PlainTextConstruct(title));
      newAttachment.setSummary(new PlainTextConstruct(description));
      newAttachment.addLink(SitesLink.Rel.PARENT, Link.Type.ATOM, parentLink);

      return service.insert(new URL(getContentFeedUrl()), newAttachment);
    }
View Full Code Here

        throws MalformedURLException, IOException, ServiceException {
      MediaContent content = new MediaContent();
      content.setUri(contentUrl);

      WebAttachmentEntry webAttachment = new WebAttachmentEntry();
      webAttachment.setTitle(new PlainTextConstruct(title));
      webAttachment.setSummary(new PlainTextConstruct(description));
      webAttachment.setContent(content);
      webAttachment.addLink(SitesLink.Rel.PARENT, Link.Type.ATOM,
          filecabinet.getSelfLink().getHref());

      return service.insert(new URL(getContentFeedUrl()), webAttachment);
View Full Code Here

     * @throws ServiceException
     * @throws IOException
     */
    public AttachmentEntry updateAttachment(AttachmentEntry entry, String newTitle,
        String newDescription) throws IOException, ServiceException  {
      entry.setTitle(new PlainTextConstruct(newTitle));
      entry.setSummary(new PlainTextConstruct(newDescription));

      return entry.update();
    }
View Full Code Here

     */
    public AttachmentEntry updateAttachment(AttachmentEntry entry, File newFile,
        String newTitle, String newDescription) throws IOException, ServiceException  {
      entry.setMediaSource(new MediaFileSource(newFile, mediaTypes.getContentType(newFile)));
      if (newTitle != null) {
        entry.setTitle(new PlainTextConstruct(newTitle));
      }
      if (newDescription != null) {
        entry.setSummary(new PlainTextConstruct(newDescription));
      }

      return entry.updateMedia(true);
    }
View Full Code Here

        + id + " ...");

    if (parser.containsKey("title")) {
      String title = parser.getValue("title");
      System.out.println("...by changing title to " + title);
      requestEntry.setTitle(new PlainTextConstruct(title));
    }

    if (parser.containsKey("file")) {
      String filename = parser.getValue("file");
      System.out.println("...by appending contents from file " + filename);
View Full Code Here

    System.out.println("You want to update glossary with id:" + id + " ...");

    if (parser.containsKey("title")) {
      String title = parser.getValue("title");
      System.out.println("...by changing title to " + title);
      requestEntry.setTitle(new PlainTextConstruct(title));
    }

    if (parser.containsKey("file")) {
      String filename = parser.getValue("file");
      System.out.println("...by appending contents from file " + filename);
View Full Code Here

    System.out.println("You want to update document with id:" + id + "...");

    if (parser.containsKey("title")) {
      String title = parser.getValue("title");
      System.out.println("...by changing title to " + title);
      requestEntry.setTitle(new PlainTextConstruct(title));
    }

    if (parser.containsKey("tmids")) {
      String tmIds = parser.getValue("tmids");
      System.out.println("...by adding translation memories with ids: "
View Full Code Here

TOP

Related Classes of com.google.gdata.data.PlainTextConstruct

Copyright © 2018 www.massapicom. 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.