String direction = request.getHttpRequest().getParam("direction");
try {
if ("up".equals(direction)) {
profile.moveFieldUp(field);
} else if ("down".equals(direction)) {
profile.moveFieldDown(field);
} else {
return createErrorJsonObject("invalid-direction");
}
} catch (IllegalArgumentException iae1) {
return createErrorJsonObject("not-possible");