pageKey = "page";
}
- Request request = (Request) dataProvider.getData(requestKey);
+ Request request = (Request) dataProvider.get(requestKey);
String pageString = request.getHttpRequest().getParam(parameter);
int page = 0;
try {
} catch (NumberFormatException nfe1) {
/* ignore. */
}
- dataProvider.setData(pageKey, page);
+ dataProvider.set(pageKey, page);
}
}
} else if (member.equals("likes")) {
return core.getLikes(post);
} else if (member.equals("liked")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
+ Sone currentSone = (Sone) dataProvider.get("currentSone");
return (currentSone != null) && (currentSone.isLikedPostId(post.getId()));
} else if (member.equals("new")) {
return core.isNewPost(post.getId(), false);
if ("likes".equals(member)) {
return core.getLikes(reply);
} else if (member.equals("liked")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
+ Sone currentSone = (Sone) dataProvider.get("currentSone");
return (currentSone != null) && (currentSone.isLikedReplyId(reply.getId()));
} else if (member.equals("new")) {
return core.isNewReply(reply.getId(), false);
String name = parameters.get("name");
String nameKey = parameters.get("nameKey");
if (nameKey != null) {
- name = String.valueOf(dataProvider.getData(nameKey));
+ name = String.valueOf(dataProvider.get(nameKey));
}
String key = parameters.get("key");
String value = null;
if (key != null) {
- value = String.valueOf(dataProvider.getData(key));
+ value = String.valueOf(dataProvider.get(key));
}
if (value == null) {
value = parameters.get("value");
} else if (member.equals("local")) {
return sone.getInsertUri() != null;
} else if (member.equals("friend")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
+ Sone currentSone = (Sone) dataProvider.get("currentSone");
return (currentSone != null) && currentSone.hasFriend(sone.getId());
} else if (member.equals("current")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
+ Sone currentSone = (Sone) dataProvider.get("currentSone");
return (currentSone != null) && currentSone.equals(sone);
} else if (member.equals("modified")) {
return core.isModifiedSone(sone);
} else if (member.equals("locked")) {
return core.isLocked(sone);
} else if (member.equals("trust")) {
- Sone currentSone = (Sone) dataProvider.getData("currentSone");
+ Sone currentSone = (Sone) dataProvider.get("currentSone");
Trust trust = core.getTrust(currentSone, sone);
if (trust == null) {
return new Trust(null, null, null);
jsonPost.put("time", post.getTime());
StringWriter stringWriter = new StringWriter();
DataProvider dataProvider = postTemplate.createDataProvider();
- dataProvider.setData("post", post);
- dataProvider.setData("currentSone", currentSone);
+ dataProvider.set("post", post);
+ dataProvider.set("currentSone", currentSone);
try {
postTemplate.render(dataProvider, stringWriter);
} catch (TemplateException te1) {
jsonReply.put("time", reply.getTime());
StringWriter stringWriter = new StringWriter();
DataProvider dataProvider = replyTemplate.createDataProvider();
- dataProvider.setData("reply", reply);
- dataProvider.setData("currentSone", currentSone);
+ dataProvider.set("reply", reply);
+ dataProvider.set("currentSone", currentSone);
try {
replyTemplate.render(dataProvider, stringWriter);
} catch (TemplateException te1) {