19 package org.turro.alliance.service;
21 import org.turro.attach.search.Attachments;
22 import org.turro.attach.zul.AttachmentUtil;
23 import org.turro.collections.KeyValueMap;
24 import org.turro.dossier.db.DossierPU;
25 import org.turro.dossier.entity.Dossier;
26 import org.turro.elephant.context.Application;
27 import org.turro.json.Jsons;
28 import org.turro.reflection.stub.Stubs;
29 import org.turro.security.SecurityGroup;
30 import org.turro.sql.SqlClause;
31 import org.turro.util.Converter;
32 import org.turro.visual.DossierJsonVisualFilter;
33 import org.turro.ws.service.IWsService;
34 import org.turro.ws.service.WsService;
35 import org.turro.ws.service.p2p.SecuredP2PService;
41 @WsService(path = AxP2PServer.AX_P2P_SERVICE, name =
"Alliance P2P Server")
42 public class
AxP2PServer extends SecuredP2PService implements IWsService {
44 public static final String AX_P2P_SERVICE =
"/axp2pserver";
49 Dossier project = SqlClause.select(
"d").from(
"Dossier d")
50 .where().equal(
"id", Converter.STANDARD.convert(json.getString(
"projectId"), Long.class))
54 writeJsonResponse(application,
56 .
filter(Stubs.jsonverb(project)));
59 writeJsonResponse(application,
Attachments.
from(
"/dossier/" + json.getString(
"projectId"))
60 .onlyPublic().banRestricted().getTree().toJson());
void doProcess(Application application, KeyValueMap map, Jsons json, String reason)
static Attachments from(String path)
static boolean respond(Respond respond, Long id)
static JsonVisualFilter from(String securityGroup)
String filter(String json)