git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorSweidan Omar <TFS\sweidan.omar>
Mon, 10 Jan 2022 14:56:34 +0000 (14:56 +0000)
committerSweidan Omar <TFS\sweidan.omar>
Mon, 10 Jan 2022 14:56:34 +0000 (14:56 +0000)
server/user.jobengine.executors/src/user/jobengine/server/steps/NEXIOArchiveCheckerStep.java

index fbd88ba3887c06629955c63618784e228b7538fc..41da571a0e4ff509cfcd8b0d4ce1797f2fbb9498 100644 (file)
@@ -28,10 +28,11 @@ public class NEXIOArchiveCheckerStep extends JobStep {
        private static final Logger logger = LogManager.getLogger();\r
        private SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd-HHmmss");\r
 \r
-       private boolean check(Timestamp modified, Timestamp created, int duration, Media media, int videoFormat, int lastModifiedHours) {\r
+       private boolean check(Timestamp modified, Timestamp created, int duration, Media media, int videoFormat,\r
+                       int lastModifiedHours) {\r
                String title = media.getTitle();\r
 \r
-               //formatum\r
+               // formatum\r
                if (!(videoFormat == 3 || videoFormat == 19)) {\r
                        logger.debug(getMarker(), "{} unsupported video format", videoFormat);\r
                        return false;\r
@@ -40,7 +41,7 @@ public class NEXIOArchiveCheckerStep extends JobStep {
                if (!checkModifiedByTime(title, modified, lastModifiedHours))\r
                        return false;\r
 \r
-               //utolso modositas\r
+               // utolso modositas\r
                MediaFile mediaFile = getManager().getSystemMediaFile(media);\r
                boolean isModified = true;\r
                if (mediaFile == null) {\r
@@ -66,11 +67,12 @@ public class NEXIOArchiveCheckerStep extends JobStep {
        }\r
 \r
        private boolean checkModifiedByTime(String title, Timestamp modified, int lastModifiedHours) {\r
-               //utolso modositas a mosthoz kepest\r
-               //The result of this method can be a negative period if the end is before the start.\r
+               // utolso modositas a mosthoz kepest\r
+               // The result of this method can be a negative period if the end is before the\r
+               // start.\r
                long modifiedHours = Duration.between(modified.toInstant(), Instant.now()).toHours();\r
                if (modifiedHours < 0) {\r
-                       logger.info(getMarker(), "{} modification time greather than now", title);\r
+                       logger.info(getMarker(), "{} modification time greater than now", title);\r
                        return false;\r
                }\r
                if (modifiedHours < lastModifiedHours) {\r
@@ -118,8 +120,8 @@ public class NEXIOArchiveCheckerStep extends JobStep {
                return null;\r
        }\r
 \r
-       private void processClips(String storeName, StoreUri sourceStoreUri, StoreUri targetStoreUri, String outputPath, Iterator<Clip> clips,\r
-                       int lastModifiedHours) throws ClipNotFoundException, IOException, ProtocolException {\r
+       private void processClips(String storeName, StoreUri sourceStoreUri, StoreUri targetStoreUri, String outputPath,\r
+                       Iterator<Clip> clips, int lastModifiedHours) throws ClipNotFoundException, IOException, ProtocolException {\r
                int processed = 0;\r
                while (clips.hasNext()) {\r
 \r
@@ -138,7 +140,7 @@ public class NEXIOArchiveCheckerStep extends JobStep {
                                int videoFormat = 0;\r
                                frames = clip.getDuration();\r
 \r
-                               //ures clip\r
+                               // ures clip\r
                                if (frames == 1)\r
                                        continue;\r
 \r
@@ -164,10 +166,11 @@ public class NEXIOArchiveCheckerStep extends JobStep {
 \r
                                if (createEscort && !title.contains("*")) {\r
                                        String fileName = title + DOT_MXF;\r
-                                       DownloadableMedia downloadable = DownloadableMedia.create(title, fileName, modified, created, frames, 0, sourceStoreUri.getId(),\r
-                                                       targetStoreUri.getId(), mediaId);\r
+                                       DownloadableMedia downloadable = DownloadableMedia.create(title, fileName, modified, created,\r
+                                                       frames, 0, sourceStoreUri.getId(), targetStoreUri.getId(), mediaId);\r
                                        String escortFileName = storeName + "." + downloadable.getString("fileName");\r
-                                       if (EscortFiles.createMetadataIfNotExists(outputPath, escortFileName, downloadable.toPrettyString(""))) {\r
+                                       if (EscortFiles.createMetadataIfNotExists(outputPath, escortFileName,\r
+                                                       downloadable.toPrettyString(""))) {\r
                                                logger.info(getMarker(), "Archive status file created for {}", fileName);\r
                                        } else {\r
                                                logger.info(getMarker(), "Archive status file already exists for {}", fileName);\r
@@ -184,5 +187,4 @@ public class NEXIOArchiveCheckerStep extends JobStep {
                        }\r
                }\r
        }\r
-\r
 }\r