Package net.pterodactylus.sone.data

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


    Profile profile = currentSone.getProfile();
    Field field = profile.getFieldById(fieldId);
    if (field == null) {
      return createErrorJsonObject("invalid-field-id");
    }
    profile.removeField(field);
    currentSone.setProfile(profile);
    webInterface.getCore().touchConfiguration();
    return createSuccessJsonObject().put("field", new ObjectNode(instance).put("id", new TextNode(field.getId())));
  }
View Full Code Here


        fieldId = request.getHttpRequest().getParam("field");
        field = profile.getFieldById(fieldId);
        if (field == null) {
          throw new RedirectException("invalid.html");
        }
        profile.removeField(field);
        currentSone.setProfile(profile);
      }
      throw new RedirectException("editProfile.html#profile-fields");
    }
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.