◆ linkForPath()
static String org.turro.students.command.StudentsEntityInfo.linkForPath |
( |
Path |
path, |
|
|
IContact |
contact, |
|
|
LinkType |
type |
|
) |
| |
|
static |
Definition at line 80 of file StudentsEntityInfo.java.
81 if(LinkType.INTERNAL.equals(type)) {
82 if(contact.isWebapp()) {
83 return "/app/frame?" + Interceptors.parameters(path.getRoot(), path.getNode(1)).encoded();
85 return "/user/" + path.getRoot() +
"s?item=" + path.getNode(1);
87 }
else if(LinkType.WEB_INTERNAL.equals(type)) {
88 return "/user/" + path.getRoot() +
"s?item=" + path.getNode(1);
89 }
else if(LinkType.WEB.equals(type)) {
90 String context = ElephantContext.getEntityWebContext(path);
91 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.students.command.StudentsEntityInfo.resolveLink |
( |
String |
type | ) |
|
◆ writeEntityInfo()
boolean org.turro.students.command.StudentsEntityInfo.writeEntityInfo |
( |
Writer |
out, |
|
|
Path |
path, |
|
|
EntityInfoType |
type, |
|
|
LinkType |
link |
|
) |
| |
Implements org.turro.action.IEntityInfo.
Definition at line 51 of file StudentsEntityInfo.java.
53 if(
null != path.getRoot())
switch (path.getRoot()) {
56 Challenge challenge =
new StudentsPU().find(Challenge.class, Long.valueOf(path.getNode(1)));
57 DescribeItCtrl dic =
new DescribeItCtrl(Application.getApplication().getConstructor());
58 dic.setEntityPath(path.getPath());
59 HashMap<String, Object> args =
new HashMap<>();
61 args.put(
"entityPath", path.getPath());
62 args.put(
"resolver",
this);
63 out.write(EntitiesInfo.getString(challenge,
new ChallengeWrapper(challenge),
"challenge", type, link, args));
65 }
catch (IOException ex) {
66 Logger.getLogger(StudentsEntityInfo.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
The documentation for this class was generated from the following file: