// case if no values are requested
if (post == null || sb == null) {
// we create empty entries for template strings
final serverObjects prop = defaultValues();
final RankingProfile ranking;
if (sb == null) ranking = new RankingProfile(ContentDomain.TEXT);
else ranking = sb.getRanking();
putRanking(prop, ranking, "local");
return prop;
}
if (post.containsKey("EnterRanking")) {
final RankingProfile ranking = new RankingProfile("local", post.toString());
sb.setConfig("rankingProfile", crypt.simpleEncode(ranking.toExternalString()));
final serverObjects prop = defaultValues();
//prop.putAll(ranking.toExternalMap("local"));
putRanking(prop, ranking, "local");
return prop;
}
if (post.containsKey("ResetRanking")) {
sb.setConfig("rankingProfile", "");
final RankingProfile ranking = new RankingProfile(ContentDomain.TEXT);
final serverObjects prop = defaultValues();
//prop.putAll(ranking.toExternalMap("local"));
putRanking(prop, ranking, "local");
return prop;
}
final RankingProfile localRanking = new RankingProfile("local", post.toString());
final serverObjects prop = new serverObjects();
putRanking(prop, localRanking, "local");
prop.putAll(localRanking.toExternalMap("local"));
return prop;
}