Package com.google.gdata.data.appsforyourdomain.generic

Examples of com.google.gdata.data.appsforyourdomain.generic.GenericEntry


      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    if (enable) {
      entry.addProperty(Constants.ENABLE, Constants.TRUE);
      entry.addProperty(Constants.FORWARD_TO, forwardTo);
      entry.addProperty(Constants.ACTION, action);
    } else {
      entry.addProperty(Constants.ENABLE, Constants.FALSE);
    }

    for (String user : users) {
      if (enable) {
        logger.log(Level.INFO,
View Full Code Here


      throw new IllegalArgumentException();
    }

    logger.log(Level.INFO, "Getting POP settings for user " + user + " ...");

    GenericEntry popEntry = retrieveSettingsEntry(user, Constants.POP);
    if (popEntry != null) {
      Map<String, String> pop = new HashMap<String, String>();
      pop.put(Constants.ENABLE, popEntry.getProperty(Constants.ENABLE));
      pop.put(Constants.ACTION, popEntry.getProperty(Constants.ACTION));
      return pop;
    }

    return null;
  }
View Full Code Here

      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    if (enable) {
      entry.addProperty(Constants.ENABLE, Constants.TRUE);
      entry.addProperty(Constants.ENABLE_FOR, enableFor);
      entry.addProperty(Constants.ACTION, action);
    } else {
      entry.addProperty(Constants.ENABLE, Constants.FALSE);
    }

    for (String user : users) {
      if (enable) {
        logger.log(Level.INFO,
View Full Code Here

      throw new IllegalArgumentException();
    }

    logger.log(Level.INFO, "Getting IMAP settings for user " + user + " ...");

    GenericEntry imapEntry = retrieveSettingsEntry(user, Constants.IMAP);
    if (imapEntry != null && imapEntry.getProperty(Constants.ENABLE).equals(Constants.TRUE))
      return true;

    return false;
  }
View Full Code Here

      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    entry.addProperty(Constants.ENABLE, String.valueOf(enable));

    for (String user : users) {
      logger.log(Level.INFO,
          "Updating IMAP settings ( enable: " + enable + " ) " + "for user " + user + " ...");
      updateSettings(user, entry, Constants.IMAP);
View Full Code Here

      throw new IllegalArgumentException();
    }

    logger.log(Level.INFO, "Getting vacation settings for user " + user + " ...");

    GenericEntry vacationEntry = retrieveSettingsEntry(user, Constants.VACATION);
    if (vacationEntry != null) {
      Map<String, String> vacation = new HashMap<String, String>();
      vacation.put(Constants.ENABLE, vacationEntry.getProperty(Constants.ENABLE));
      vacation.put(Constants.SUBJECT, vacationEntry.getProperty(Constants.SUBJECT));
      vacation.put(Constants.MESSAGE, vacationEntry.getProperty(Constants.MESSAGE));
      vacation.put(Constants.CONTACTS_ONLY, vacationEntry.getProperty(Constants.CONTACTS_ONLY));
      return vacation;
    }

    return null;
  }
View Full Code Here

      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    if (enable) {
      entry.addProperty(Constants.ENABLE, Constants.TRUE);
      entry.addProperty(Constants.SUBJECT, subject);
      entry.addProperty(Constants.MESSAGE, message);
      entry.addProperty(Constants.CONTACTS_ONLY, String.valueOf(contactsOnly));
    } else {
      entry.addProperty(Constants.ENABLE, Constants.FALSE);
    }


    for (String user : users) {
      if (enable) {
View Full Code Here

      throw new IllegalArgumentException();
    }

    logger.log(Level.INFO, "Getting signature settings for user " + user + " ...");

    GenericEntry signatureEntry = retrieveSettingsEntry(user, Constants.SIGNATURE);
    if (signatureEntry != null) return signatureEntry.getProperty(Constants.SIGNATURE);

    return null;
  }
View Full Code Here

      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    entry.addProperty(Constants.SIGNATURE, signature);

    for (String user : users) {
      logger.log(Level.INFO,
          "Updating signature ( signature: " + signature + " ) for user " + user + " ...");
      updateSettings(user, entry, Constants.SIGNATURE);
View Full Code Here

      throws IllegalArgumentException, ServiceException, MalformedURLException, IOException {
    if (users.size() == 0) {
      throw new IllegalArgumentException();
    }

    GenericEntry entry = new GenericEntry();
    entry.addProperty(Constants.PAGE_SIZE, pageSize);
    entry.addProperty(Constants.SHORTCUTS, String.valueOf(enableShortcuts));
    entry.addProperty(Constants.ARROWS, String.valueOf(enableArrows));
    entry.addProperty(Constants.SNIPPETS, String.valueOf(enableSnippets));
    entry.addProperty(Constants.UNICODE, String.valueOf(enableUnicode));

    for (String user : users) {
      logger.log(Level.INFO,
          "Updating general settings ( " + "pageSize: " + pageSize + ", shortcuts: "
              + enableShortcuts + ", arrows: " + enableArrows + ", snippets: " + enableSnippets
View Full Code Here

TOP

Related Classes of com.google.gdata.data.appsforyourdomain.generic.GenericEntry

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.