summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/openslx/satellitedaemon/db/DbImage.java11
-rw-r--r--src/main/java/org/openslx/satellitedaemon/filetransfer/FileUploadWorker.java2
2 files changed, 9 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 35cff33..61c753a 100644
--- a/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
+++ b/src/main/java/org/openslx/satellitedaemon/db/DbImage.java
@@ -18,6 +18,8 @@ public class DbImage
public final long changeTime;
public final long createTime;
public final String contentOperatingSystem;
+ public final boolean isValid;
+ public final boolean isDeleted;
public enum Status
{
@@ -26,7 +28,8 @@ public class DbImage
public DbImage(
String guid, String name, Integer rid, String path, String creator,
- Long fileSize, Long createTime, Long changeTime, String contentOperatingSystem)
+ Long fileSize, Long createTime, Long changeTime, String contentOperatingSystem,
+ Boolean isValid, Boolean isDeleted)
{
if ( rid == null )
rid = -1;
@@ -41,6 +44,8 @@ public class DbImage
this.createTime = createTime;
this.changeTime = changeTime;
this.contentOperatingSystem = contentOperatingSystem;
+ this.isValid = isValid;
+ this.isDeleted = isDeleted;
}
/**
@@ -54,7 +59,7 @@ public class DbImage
{
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)," +
- " image.content_operatingSystem" +
+ " image.content_operatingSystem, image.status_isValid, image.status_isDeleted" +
" 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)" +
@@ -73,7 +78,7 @@ public class DbImage
{
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)," +
- " image.content_operatingSystem" +
+ " image.content_operatingSystem, image.status_isValid, image.status_isDeleted" +
" 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 7f89146..156414d 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,
- image.contentOperatingSystem, true, false, "best", image.fileSize );
+ image.contentOperatingSystem, image.isValid, image.isDeleted, "best", image.fileSize );
String path = Globals.getImageFolder() + "/" + image.path;