4 attempt to pass pipeline

This commit is contained in:
omenem 2020-04-09 15:38:03 +02:00
parent 79b39de6bb
commit 0872d7654f
2 changed files with 3 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.dto; package ch.usi.inf.sa4.sanmarinoes.smarthut.dto;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import org.springframework.core.io.FileSystemResource;
public class SecurityCameraSaveRequest { public class SecurityCameraSaveRequest {
@ -20,7 +19,7 @@ public class SecurityCameraSaveRequest {
/** The name of the device as assigned by the user (e.g. 'Master bedroom light') */ /** The name of the device as assigned by the user (e.g. 'Master bedroom light') */
@NotNull private String name; @NotNull private String name;
private FileSystemResource surveillanceVideo; private String path;
public void setRoomId(Long roomId) { public void setRoomId(Long roomId) {
this.roomId = roomId; this.roomId = roomId;

View File

@ -1,6 +1,5 @@
package ch.usi.inf.sa4.sanmarinoes.smarthut.models; package ch.usi.inf.sa4.sanmarinoes.smarthut.models;
import java.io.File;
import javax.persistence.Column; import javax.persistence.Column;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@ -20,12 +19,10 @@ public class SecurityCamera extends Switchable {
@Column(name = "video", nullable = false) @Column(name = "video", nullable = false)
@NotNull @NotNull
private FileSystemResource surveillanceVideo = private String path = "backend/media/security_camera_videos/security_camera_1.mp4";
new FileSystemResource(
(new File("backend/media/security_camera_videos/security_camera_1.mp4")));
public FileSystemResource getSurveillanceVideo() { public FileSystemResource getSurveillanceVideo() {
return surveillanceVideo; return new FileSystemResource(path);
} }
@Override @Override