From: Sweidan Omar Date: Mon, 2 May 2022 09:26:06 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=11273702947e54e6b602f6dba0c2111dd2b00fe9;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C33256 --- diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/DownloadRecordingFromNexioStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/DownloadRecordingFromNexioStep.java index 1a892e50..c65ab01b 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/DownloadRecordingFromNexioStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/DownloadRecordingFromNexioStep.java @@ -45,7 +45,8 @@ public class DownloadRecordingFromNexioStep extends JobStep { private int check(int value, String name) { if (value == 0) { logger.error(marker, "A folyamat '{}' bemeneti paramétere 0.", name); - throw new NullPointerException(String.format("System is not configured properly, missing '%s' input parameter.", name)); + throw new NullPointerException( + String.format("System is not configured properly, missing '%s' input parameter.", name)); } return value; } @@ -53,14 +54,15 @@ public class DownloadRecordingFromNexioStep extends JobStep { private String check(String value, String name) { if (StringUtils.isBlank(value)) { logger.error(marker, "A folyamat '{}' bemeneti paramétere üres.", name); - throw new NullPointerException(String.format("System is not configured properly, missing '%s' input parameter.", name)); + throw new NullPointerException( + String.format("System is not configured properly, missing '%s' input parameter.", name)); } return value; } @StepEntry - public Object[] execute(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, String nexioUserName, String nexioPassword, - IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { + public Object[] execute(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, + String nexioUserName, String nexioPassword, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { marker = jobRuntime.getSessionMarker(); manager = jobEngine.getItemManager(); setAndCheck(archiveItem, targetPath, targetFileName, nexioPort, nexioUserName, nexioPassword); @@ -103,7 +105,7 @@ public class DownloadRecordingFromNexioStep extends JobStep { BasicDBObject clip = (BasicDBObject) clipsCollection.findOne(new BasicDBObject(LONGNAMEID, sourceFileName)); if (clip == null) - throw new Exception("Clip not exists in NEXIO"); + throw new Exception("Clip does not exist in NEXIO"); long duration = NoSQLUtils.asLong(clip, DURATION); if (duration == 0) @@ -118,16 +120,18 @@ public class DownloadRecordingFromNexioStep extends JobStep { } catch (Exception e) { logger.catching(e); if (!archiveItem.removeCatchedFile()) - logger.error(getMarker(), "A {} állomány .catched jelző állománya nem törölhető.", new File(archiveItem.getMediaFile()).getName()); - Message m = new ParameterizedMessage("Az '{}' állomány feldolgozása sikertelen. A rendszer hibaüzenete: {}", sourceFileName, e.getMessage()); + logger.error(getMarker(), "A {} állomány .catched jelző állománya nem törölhető.", + new File(archiveItem.getMediaFile()).getName()); + Message m = new ParameterizedMessage("Az '{}' állomány feldolgozása sikertelen. A rendszer hibaüzenete: {}", + sourceFileName, e.getMessage()); logger.error(marker, m); throw new Exception(m.getFormattedMessage()); } return new Object[] { 0 }; } - private void setAndCheck(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, String nexioUserName, String nexioPassword) - throws Exception { + private void setAndCheck(ArchiveItem archiveItem, String targetPath, String targetFileName, int nexioPort, + String nexioUserName, String nexioPassword) throws Exception { DB db = NoSQLUtils.getNoSQLDB(); if (db == null) { logger.error(marker, "Az NoSQL adatkezelő réteg nem elérhető."); @@ -151,7 +155,8 @@ public class DownloadRecordingFromNexioStep extends JobStep { if (StringUtils.isBlank(NEXIO_HOST)) { logger.error(marker, "A 'nexio.host' rendszer paraméter nem található."); - throw new NullPointerException("System is not configured properly, 'jobengine.selenio.address' startup parameter missing."); + throw new NullPointerException( + "System is not configured properly, 'jobengine.selenio.address' startup parameter missing."); } check(nexioPort, "nexioPort"); check(nexioUserName, "nexioUserName");