summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-10-09 14:48:37 +0200
committerBjörn Hagemeister2014-10-09 14:48:37 +0200
commitddb132af1e6aba5cfa2f9c5d0204156b0627a67c (patch)
tree22ef0935e8eaab9e0fd357f9ecc21deca7436b76 /src
parentCreate just one object of AsymKeyHolder for getting public and private Key. (diff)
downloadsatellite-daemon-ddb132af1e6aba5cfa2f9c5d0204156b0627a67c.tar.gz
satellite-daemon-ddb132af1e6aba5cfa2f9c5d0204156b0627a67c.tar.xz
satellite-daemon-ddb132af1e6aba5cfa2f9c5d0204156b0627a67c.zip
Added type of operating system from db to DbImage.
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/openslx/satellitedaemon/db/DbImage.java12
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/org/openslx/satellitedaemon/db/DbImage.java b/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
index 03ad078..35cff33 100644
--- a/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
+++ b/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
@@ -17,13 +17,16 @@ public class DbImage
public final long fileSize;
public final long changeTime;
public final long createTime;
+ public final String contentOperatingSystem;
public enum Status
{
only_local, to_be_published, being_published, successfully_published, to_be_decentralized, being_decentralized, successfully_decentralized
}
- public DbImage(String guid, String name, Integer rid, String path, String creator, Long fileSize, Long createTime, Long changeTime)
+ public DbImage(
+ String guid, String name, Integer rid, String path, String creator,
+ Long fileSize, Long createTime, Long changeTime, String contentOperatingSystem)
{
if ( rid == null )
rid = -1;
@@ -37,6 +40,7 @@ public class DbImage
this.fileSize = fileSize;
this.createTime = createTime;
this.changeTime = changeTime;
+ this.contentOperatingSystem = contentOperatingSystem;
}
/**
@@ -49,7 +53,8 @@ public class DbImage
public static List<DbImage> getAllMarkedForUpload()
{
return MySQL.findAll( DbImage.class, "SELECT image.GUID_imageID, image.image_name, image.imageVersion, image.image_path," +
- " user.loginName AS userID, image.image_filesize, UNIX_TIMESTAMP(image.rec_create_time), UNIX_TIMESTAMP(image.rec_change_time)" +
+ " user.loginName AS userID, image.image_filesize, UNIX_TIMESTAMP(image.rec_create_time), UNIX_TIMESTAMP(image.rec_change_time)," +
+ " image.content_operatingSystem" +
" FROM m_VLData_imageInfo image" +
" INNER JOIN m_user user ON (image.image_owner = user.userID)" +
" INNER JOIN m_institution institution ON (institution.institutionID = user.institution)" +
@@ -67,7 +72,8 @@ public class DbImage
public static List<DbImage> getAllMarkedForDownload()
{
return MySQL.findAll( DbImage.class, "SELECT image.GUID_imageID, image.image_name, image.imageVersion, image.image_path," +
- " user.loginName AS userID, image.image_filesize, UNIX_TIMESTAMP(image.rec_create_time), UNIX_TIMESTAMP(image.rec_change_time)" +
+ " user.loginName AS userID, image.image_filesize, UNIX_TIMESTAMP(image.rec_create_time), UNIX_TIMESTAMP(image.rec_change_time)," +
+ " image.content_operatingSystem" +
" FROM m_VLData_imageInfo image" +
" INNER JOIN m_user user ON (image.image_owner = user.userID)" +
" INNER JOIN m_institution institution ON (institution.institutionID = user.institution)" +
diff --git a/src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java b/src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java
index 1034dd7..7f89146 100644
--- a/src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java
+++ b/src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java
@@ -32,7 +32,7 @@ public class FileUploadWorker implements Runnable
ImageData imDat = new ImageData(
image.guid, image.rid,
image.name, image.createTime, image.changeTime, image.creator,
- "anyThing", true, false, "best", image.fileSize );
+ image.contentOperatingSystem, true, false, "best", image.fileSize );
String path = Globals.getImageFolder() + "/" + image.path;