◆ linkForPath()
static String org.turro.dossier.command.DossierEntityInfo.linkForPath |
( |
Path |
path, |
|
|
IContact |
contact, |
|
|
LinkType |
type |
|
) |
| |
|
static |
Definition at line 100 of file DossierEntityInfo.java.
101 if(LinkType.INTERNAL.equals(type)) {
102 if(contact.isWebapp()) {
103 return "/app/frame?" + Interceptors.parameters(path.getRoot(), path.getNode(1)).encoded();
105 return "/user/my" + checkPath(path) +
"s?item=" + path.getNode(1);
107 }
else if(LinkType.WEB_INTERNAL.equals(type)) {
108 return "/user/my" + checkPath(path) +
"s?item=" + path.getNode(1);
109 }
else if(LinkType.WEB.equals(type)) {
110 String context = ElephantContext.getEntityWebContext(path);
111 return !Strings.isBlank(context) ? context +
"?item=" + path.getNode(1) :
linkForPath(path, contact, LinkType.WEB_INTERNAL);
static String linkForPath(Path path, IContact contact, LinkType type)
◆ resolveLink()
String org.turro.dossier.command.DossierEntityInfo.resolveLink |
( |
String |
type | ) |
|
◆ writeEntityInfo()
boolean org.turro.dossier.command.DossierEntityInfo.writeEntityInfo |
( |
Writer |
out, |
|
|
Path |
path, |
|
|
EntityInfoType |
type, |
|
|
LinkType |
link |
|
) |
| |
Implements org.turro.action.IEntityInfo.
Definition at line 58 of file DossierEntityInfo.java.
60 if(
null != path.getRoot())
switch (path.getRoot()) {
63 Dossier dossier =
new DossierPU().find(Dossier.class, Long.valueOf(path.getNode(1)));
64 DescribeItCtrl dic =
new DescribeItCtrl(Application.getApplication().getConstructor());
65 dic.setEntityPath(path.getPath());
66 HashMap<String, Object> args =
new HashMap<>();
68 args.put(
"entityPath", path.getPath());
69 args.put(
"resolver",
this);
70 out.write(EntitiesInfo.getString(dossier,
new DossierWrapper(dossier),
"dossier", type, link, args));
72 }
catch (IOException ex) {
73 Logger.getLogger(DossierEntityInfo.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
77 Issue issue =
new DossierPU().find(Issue.class, Long.valueOf(path.getNode(1)));
78 DescribeItCtrl dic =
new DescribeItCtrl(Application.getApplication().getConstructor());
79 dic.setEntityPath(path.getPath());
80 HashMap<String, Object> args =
new HashMap<>();
82 args.put(
"entityPath", path.getPath());
83 args.put(
"resolver",
this);
84 out.write(EntitiesInfo.getString(issue,
new IssueWrapper(issue),
"issue", type, link, args));
86 }
catch (IOException ex) {
87 Logger.getLogger(DossierEntityInfo.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
The documentation for this class was generated from the following file: