Package net.pterodactylus.sone.data

Examples of net.pterodactylus.sone.data.Profile.addField()


        webInterface.getCore().touchConfiguration();
        throw new RedirectException("editProfile.html");
      } else if (request.getHttpRequest().getPartAsStringFailsafe("add-field", 4).equals("true")) {
        String fieldName = request.getHttpRequest().getPartAsStringFailsafe("field-name", 256).trim();
        try {
          profile.addField(fieldName);
          currentSone.setProfile(profile);
          fields = profile.getFields();
          webInterface.getCore().touchConfiguration();
          throw new RedirectException("editProfile.html#profile-fields");
        } catch (IllegalArgumentException iae1) {
View Full Code Here


        if (fieldName == null) {
          logger.log(Level.WARNING, String.format("Downloaded profile field for Sone %s with missing data! Name: %s, Value: %s", sone, fieldName, fieldValue));
          return null;
        }
        try {
          profile.addField(fieldName).setValue(fieldValue);
        } catch (IllegalArgumentException iae1) {
          logger.log(Level.WARNING, String.format("Duplicate field: %s", fieldName), iae1);
          return null;
        }
      }
View Full Code Here

      String fieldName = configuration.getStringValue(fieldPrefix + "/Name").getValue(null);
      if (fieldName == null) {
        break;
      }
      String fieldValue = configuration.getStringValue(fieldPrefix + "/Value").getValue("");
      profile.addField(fieldName).setValue(fieldValue);
    }

    /* load posts. */
    Set<Post> posts = new HashSet<Post>();
    while (true) {
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.