19 package org.turro.alliance.content;
21 import java.io.IOException;
22 import java.io.Writer;
23 import java.util.HashMap;
24 import org.turro.action.EntitiesInfo;
25 import org.turro.action.EntityInfoType;
26 import org.turro.action.IEntityInfo;
27 import org.turro.action.LinkType;
28 import org.turro.annotation.EntityInfo;
29 import org.turro.json.Jsons;
30 import org.turro.log.WebLoggers;
31 import org.turro.path.Path;
32 import org.turro.util.Converter;
33 import org.turro.ws.service.WsConstants;
34 import org.turro.ws.service.p2p.P2PServer;
35 import org.turro.ws.service.p2p.P2Ps;
46 if(
"axparticipation".equals(path.getRoot())) {
48 String[] nodes = path.getNode(1).split(
"__");
49 Jsons ud = P2Ps.getP2PData(path.getFrom(2).substring(1), Converter.STANDARD.convert(nodes[1], Long.class),
50 P2PServer.P2P_SERVICE, WsConstants.USER_DATA, Jsons.object().add(
"userId", nodes[0]));
51 HashMap<String, Object> args =
new HashMap<>();
52 args.put(
"entityPath", path.getPath());
53 args.put(
"resolver",
this);
54 args.put(
"name", ud.getString(
"userName"));
55 args.put(
"email", ud.getString(
"userEmail"));
58 }
catch (IOException ex) {
static String getString(Object entity, Object wrapper, String label, EntityInfoType type, LinkType link)
boolean writeEntityInfo(Writer out, Path path, EntityInfoType type, LinkType link)
String resolveLink(String link)
static WebLoggers severe(Object entity)
WebLoggers exception(Throwable throwable)