19 package org.turro.dossier.command;
21 import java.io.IOException;
22 import java.io.Writer;
23 import java.util.HashMap;
24 import java.util.logging.Level;
25 import java.util.logging.Logger;
26 import org.turro.string.Strings;
27 import org.turro.action.EntitiesInfo;
28 import org.turro.action.EntityInfoType;
29 import org.turro.action.IEntityInfo;
30 import org.turro.action.Interceptors;
31 import org.turro.action.LinkType;
32 import org.turro.annotation.EntityInfo;
33 import org.turro.auth.Authentication;
34 import org.turro.dossier.db.DossierPU;
35 import org.turro.dossier.dossier.DossierWrapper;
36 import org.turro.dossier.entity.Dossier;
37 import org.turro.dossier.entity.DossierType;
38 import org.turro.dossier.entity.Issue;
39 import org.turro.dossier.issue.IssueWrapper;
40 import org.turro.elephant.context.Application;
41 import org.turro.elephant.context.ElephantContext;
42 import org.turro.entities.Entities;
43 import org.turro.entities.IElephantEntity;
44 import org.turro.path.Path;
45 import org.turro.plugin.contacts.IContact;
46 import org.turro.www.describeit.DescribeItCtrl;
60 if(
null != path.getRoot())
switch (path.getRoot()) {
66 HashMap<String, Object> args =
new HashMap<>();
68 args.put(
"entityPath", path.getPath());
69 args.put(
"resolver",
this);
72 }
catch (IOException ex) {
80 HashMap<String, Object> args =
new HashMap<>();
82 args.put(
"entityPath", path.getPath());
83 args.put(
"resolver",
this);
86 }
catch (IOException ex) {
105 return "/user/my" + checkPath(path) +
"s?item=" + path.getNode(1);
108 return "/user/my" + checkPath(path) +
"s?item=" + path.getNode(1);
116 private static String checkPath(Path path) {
117 String root = path.getRoot();
118 if(
"dossier".equals(root)) {
static String getString(Object entity, Object wrapper, String label, EntityInfoType type, LinkType link)
static Parameters parameters(String root)
static IContact getIContact()
static String linkForPath(Path path, IContact contact, LinkType type)
boolean writeEntityInfo(Writer out, Path path, EntityInfoType type, LinkType link)
String resolveLink(String type)
IConstructor getConstructor()
static Application getApplication()
static String logMsg(String msg)
static String getEntityWebContext(String path)
static IElephantEntity getController(String path)
void setEntityPath(String entityPath)