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

index 1a892e50eb989e0a203ee2c9e9406d9632a800c9..c65ab01b9ba2179827863d618d78d9fa27d5fcef 100644 (file)
@@ -45,7 +45,8 @@ public class DownloadRecordingFromNexioStep extends JobStep {
        private int check(int value, String name) {\r
                if (value == 0) {\r
                        logger.error(marker, "A folyamat '{}' bemeneti paramétere 0.", name);\r
-                       throw new NullPointerException(String.format("System is not configured properly, missing '%s' input parameter.", name));\r
+                       throw new NullPointerException(\r
+                                       String.format("System is not configured properly, missing '%s' input parameter.", name));\r
                }\r
                return value;\r
        }\r
@@ -53,14 +54,15 @@ public class DownloadRecordingFromNexioStep extends JobStep {
        private String check(String value, String name) {\r
                if (StringUtils.isBlank(value)) {\r
                        logger.error(marker, "A folyamat '{}' bemeneti paramétere üres.", name);\r
-                       throw new NullPointerException(String.format("System is not configured properly, missing '%s' input parameter.", name));\r
+                       throw new NullPointerException(\r
+                                       String.format("System is not configured properly, missing '%s' input parameter.", name));\r
                }\r
                return value;\r
        }\r
 \r
        @StepEntry\r
-       public Object[] execute(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, String nexioUserName, String nexioPassword,\r
-                       IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
+       public Object[] execute(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort,\r
+                       String nexioUserName, String nexioPassword, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception {\r
                marker = jobRuntime.getSessionMarker();\r
                manager = jobEngine.getItemManager();\r
                setAndCheck(archiveItem, targetPath, targetFileName, nexioPort, nexioUserName, nexioPassword);\r
@@ -103,7 +105,7 @@ public class DownloadRecordingFromNexioStep extends JobStep {
 \r
                        BasicDBObject clip = (BasicDBObject) clipsCollection.findOne(new BasicDBObject(LONGNAMEID, sourceFileName));\r
                        if (clip == null)\r
-                               throw new Exception("Clip not exists in NEXIO");\r
+                               throw new Exception("Clip does not exist in NEXIO");\r
 \r
                        long duration = NoSQLUtils.asLong(clip, DURATION);\r
                        if (duration == 0)\r
@@ -118,16 +120,18 @@ public class DownloadRecordingFromNexioStep extends JobStep {
                } catch (Exception e) {\r
                        logger.catching(e);\r
                        if (!archiveItem.removeCatchedFile())\r
-                               logger.error(getMarker(), "A {} állomány .catched jelző állománya nem törölhető.", new File(archiveItem.getMediaFile()).getName());\r
-                       Message m = new ParameterizedMessage("Az '{}' állomány feldolgozása sikertelen. A rendszer hibaüzenete: {}", sourceFileName, e.getMessage());\r
+                               logger.error(getMarker(), "A {} állomány .catched jelző állománya nem törölhető.",\r
+                                               new File(archiveItem.getMediaFile()).getName());\r
+                       Message m = new ParameterizedMessage("Az '{}' állomány feldolgozása sikertelen. A rendszer hibaüzenete: {}",\r
+                                       sourceFileName, e.getMessage());\r
                        logger.error(marker, m);\r
                        throw new Exception(m.getFormattedMessage());\r
                }\r
                return new Object[] { 0 };\r
        }\r
 \r
-       private void setAndCheck(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, String nexioUserName, String nexioPassword)\r
-                       throws Exception {\r
+       private void setAndCheck(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort,\r
+                       String nexioUserName, String nexioPassword) throws Exception {\r
                DB db = NoSQLUtils.getNoSQLDB();\r
                if (db == null) {\r
                        logger.error(marker, "Az NoSQL adatkezelő réteg nem elérhető.");\r
@@ -151,7 +155,8 @@ public class DownloadRecordingFromNexioStep extends JobStep {
 \r
                if (StringUtils.isBlank(NEXIO_HOST)) {\r
                        logger.error(marker, "A 'nexio.host' rendszer paraméter nem található.");\r
-                       throw new NullPointerException("System is not configured properly, 'jobengine.selenio.address' startup parameter missing.");\r
+                       throw new NullPointerException(\r
+                                       "System is not configured properly, 'jobengine.selenio.address' startup parameter missing.");\r
                }\r
                check(nexioPort, "nexioPort");\r
                check(nexioUserName, "nexioUserName");\r