diff options
author | Simon Rettberg | 2015-09-10 14:18:34 +0200 |
---|---|---|
committer | Simon Rettberg | 2015-09-10 14:18:34 +0200 |
commit | dc7a65b342c0fdda16242c73e4dade209e814b1f (patch) | |
tree | 05493a92b5f72de6cbd8f79b819c35ae20df0b11 | |
parent | [client] Determine parent window for message box if null is passed (diff) | |
download | tutor-module-dc7a65b342c0fdda16242c73e4dade209e814b1f.tar.gz tutor-module-dc7a65b342c0fdda16242c73e4dade209e814b1f.tar.xz tutor-module-dc7a65b342c0fdda16242c73e4dade209e814b1f.zip |
[server] Include image path in xml lecture list
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java | 11 | ||||
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java | 5 |
2 files changed, 10 insertions, 6 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java index 53eb1a24..b93e1464 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java @@ -412,7 +412,7 @@ public class DbLecture { MysqlStatement stmt = connection.prepareStatement("SELECT" + " l.lectureid, l.displayname AS lecturename, l.description," + " l.endtime, l.usecount, o.displayname AS osname, v.virtname, b.istemplate," - + " v.virtid, ov.virtoskeyword" + + " v.virtid, ov.virtoskeyword, i.filepath" + " FROM lecture l " + " INNER JOIN imageversion i USING (imageversionid)" + " INNER JOIN imagebase b USING (imagebaseid)" @@ -426,9 +426,10 @@ public class DbLecture { VmChooserListXml list = new VmChooserListXml(true); while (rs.next()) { String prio = rs.getBoolean("istemplate") ? "10" : "100"; - list.add(new VmChooserEntryXml(prio, "-", rs.getString("lecturename"), - rs.getString("description"), rs.getString("lectureid"), rs.getString("virtid"), - rs.getString("virtname"), rs.getString("virtoskeyword"), rs.getString("osname"), "")); + list.add(new VmChooserEntryXml(rs.getString("filepath"), prio, "-", + rs.getString("lecturename"), rs.getString("description"), rs.getString("lectureid"), + rs.getString("virtid"), rs.getString("virtname"), rs.getString("virtoskeyword"), + rs.getString("osname"), "")); } return list; } catch (SQLException e) { @@ -442,7 +443,7 @@ public class DbLecture { // Get required data about lecture and used image MysqlStatement stmt = connection.prepareStatement("SELECT" + " l.displayname AS lecturename, l.starttime, l.endtime, l.isenabled," - + " o.virtoskeyword, i.filepath, i.virtualizerconfig" + + " o.virtoskeyword, i.virtualizerconfig" + " FROM lecture l " + " INNER JOIN imageversion i USING (imageversionid)" + " INNER JOIN imagebase b USING (imagebaseid)" diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java index 102483bc..1e5725fb 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/web/VmChooserEntryXml.java @@ -8,6 +8,8 @@ import org.simpleframework.xml.Root; public class VmChooserEntryXml { @Element + private VmChooserParamXml image_name; + @Element private VmChooserParamXml priority; @Element private VmChooserParamXml creator; @@ -28,9 +30,10 @@ public class VmChooserEntryXml { @Element private VmChooserParamXml os_name; - public VmChooserEntryXml(String priority, String creator, String short_description, + public VmChooserEntryXml(String imageFilePath, String priority, String creator, String short_description, String long_description, String uuid, String virtId, String virtualizerName, String osVirtName, String osDisplayName, String icon) { + this.image_name = new VmChooserParamXml(imageFilePath); this.priority = new VmChooserParamXml(priority); this.creator = new VmChooserParamXml(creator); this.short_description = new VmChooserParamXml(short_description); |