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

index ea838cf58d325ddd52e01bf95edb877bed1b40d9..a8dcef248c1a0225bd03d87b273885b3feb6510a 100644 (file)
@@ -29,14 +29,16 @@ public class HarrisMissingMaterialCheckerStep extends JobStep {
        private static final String appendExtension = ".mxf";\r
 \r
        @StepEntry\r
-       public Object[] execute(BasicDBList vicFiles, String escortStoreName, String targetStoreName, String targetProtocol) throws Exception {\r
+       public Object[] execute(BasicDBList vicFiles, String escortStoreName, String targetStoreName, String targetProtocol)\r
+                       throws Exception {\r
                StoreUri escortStoreUri = null;\r
                StoreUri targetStoreUri = null;\r
                try {\r
                        getJobRuntime().setRelated(targetStoreName + " restore");\r
 \r
                        escortStoreUri = getManager().getStoreUri(escortStoreName, RemoteStoreProtocol.LOCAL);\r
-                       targetStoreUri = getManager().getStoreUri(targetStoreName, Enum.valueOf(RemoteStoreProtocol.class, targetProtocol));\r
+                       targetStoreUri = getManager().getStoreUri(targetStoreName,\r
+                                       Enum.valueOf(RemoteStoreProtocol.class, targetProtocol));\r
                        StoreUri sourceStoreUri = getManager().getStoreUri("TSM", RemoteStoreProtocol.TSM);\r
                        List<HarrisRecord> records = null;\r
                        for (Object vicFile : vicFiles) {\r
@@ -48,7 +50,7 @@ public class HarrisMissingMaterialCheckerStep extends JobStep {
                                Path vicFilePath = Paths.get(String.valueOf(vicFile));\r
 \r
                                if (!vicFilePath.toFile().exists()) {\r
-                                       logger.warn("File not exists: {}", vicFilePath);\r
+                                       logger.warn("File does not exist: {}", vicFilePath);\r
                                        continue;\r
                                }\r
 \r
@@ -99,8 +101,8 @@ public class HarrisMissingMaterialCheckerStep extends JobStep {
                return null;\r
        }\r
 \r
-       private boolean processRecord(HarrisRecord record, String targetStoreName, StoreUri sourceStoreUri, StoreUri targetStoreUri, StoreUri escortStoreUri)\r
-                       throws Exception {\r
+       private boolean processRecord(HarrisRecord record, String targetStoreName, StoreUri sourceStoreUri,\r
+                       StoreUri targetStoreUri, StoreUri escortStoreUri) throws Exception {\r
 \r
                String fileName = record.getFileName();\r
                String outputPath = Paths.get(escortStoreUri.toString(true)).toString();\r
@@ -110,7 +112,8 @@ public class HarrisMissingMaterialCheckerStep extends JobStep {
 \r
                String escortFileName = targetStoreName + "." + fileName;\r
 \r
-               //ha mar letezik, nem toltjuk fel ujra (a vic fajlbol kezzel torlik valamikor...)\r
+               // ha mar letezik, nem toltjuk fel ujra (a vic fajlbol kezzel torlik\r
+               // valamikor...)\r
                try {\r
                        if (EscortFiles.isMetadataExists(outputPath, escortFileName)) {\r
                                logger.debug(getMarker(), "Status file already exists {}", escortFileName);\r
@@ -121,22 +124,24 @@ public class HarrisMissingMaterialCheckerStep extends JobStep {
                        return true;\r
                }\r
 \r
-               //nincs bent MC-ben\r
+               // nincs bent MC-ben\r
                Media media = getManager().getMedia(record.getFileName());\r
                if (media == null) {\r
                        logger.error(getSessionMarker(), "File is not available in archive {}", record.getFileName());\r
                        return true;\r
                }\r
 \r
-               //              if (existsOnNexio(record, targetStoreName, targetStoreUri)) {\r
-               //                      logger.info(getMarker(),  "File {} already exists on {}", record.getFileName(), targetStoreName);\r
-               //                      return false;\r
-               //              }\r
+               // if (existsOnNexio(record, targetStoreName, targetStoreUri)) {\r
+               // logger.info(getMarker(), "File {} already exists on {}",\r
+               // record.getFileName(), targetStoreName);\r
+               // return false;\r
+               // }\r
 \r
-               DownloadableMedia downloadable = DownloadableMedia.create(media.getTitle(), fileName, media.getModified(), media.getCreated(), media.getLength(), 0L,\r
-                               sourceStoreUri.getId(), targetStoreUri.getId(), media.getId());\r
+               DownloadableMedia downloadable = DownloadableMedia.create(media.getTitle(), fileName, media.getModified(),\r
+                               media.getCreated(), media.getLength(), 0L, sourceStoreUri.getId(), targetStoreUri.getId(),\r
+                               media.getId());\r
 \r
-               //alapbol magasabb (1-99)\r
+               // alapbol magasabb (1-99)\r
                downloadable.put("priority", 50);\r
                downloadable.put("isNexio", true);\r
 \r