From 9660396eccb3e87db0fcb73a631112b3fd3be9f4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Thu, 2 Nov 2017 14:00:00 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30683 --- client/DxPlay/App.ico | Bin 1078 -> 0 bytes client/DxPlay/DxPlay.csproj | 4 +- client/DxPlay/maestro.ico | Bin 0 -> 3262 bytes .../Configuration/configuration-playout.json | 2 +- client/Maestro/Maestro.csproj | 7 +- client/Maestro/Program.cs | 6 +- .../installforge-installer-project.ifp | Bin 4211 -> 3576 bytes client/Maestro/maestro.ico | Bin 0 -> 3262 bytes .../PasswordEncrypter.csproj | 6 ++ client/PasswordEncrypter/maestro.ico | Bin 0 -> 3262 bytes .../run-mediacube-server-bsh.launch | 2 +- server/-configuration/scheduledjobs.json | 2 +- .../jobtemplates/retrieve-material.xml | 4 + .../jobtemplates/retrieve-ondemand.xml | 17 +++- .../CheckMORPHEUSMissingMaterialsStep.java | 10 +- .../CheckTrafficMissingMaterialsStep.java | 4 +- .../steps/OutputPathAndNameSelectorStep.java | 72 ++++++++++--- .../server/steps/TSMRestoreStep.java | 13 ++- .../server/steps/UserNotificationStep.java | 19 ++++ .../pages/jobselector.zul | 4 +- .../pages/retrieveselector.zul | 23 +++++ .../zk/model/RetrieveSelectorModel.java | 96 ++++++++++++++++++ .../user/jobengine/zk/model/SearchModel.java | 39 +++---- .../jobengine/server/steps/JobStepTest.java | 31 ++++++ 24 files changed, 292 insertions(+), 69 deletions(-) delete mode 100644 client/DxPlay/App.ico create mode 100644 client/DxPlay/maestro.ico create mode 100644 client/Maestro/maestro.ico create mode 100644 client/PasswordEncrypter/maestro.ico create mode 100644 server/user.jobengine.executors/src/user/jobengine/server/steps/UserNotificationStep.java create mode 100644 server/user.jobengine.osgi.server/pages/retrieveselector.zul create mode 100644 server/user.jobengine.osgi.server/src/user/jobengine/zk/model/RetrieveSelectorModel.java diff --git a/client/DxPlay/App.ico b/client/DxPlay/App.ico deleted file mode 100644 index 3a5525fd794f7a7c5c8e6187f470ea3af38cd2b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmeH`JqiLb5Jq2i7wlw@u$6cW3t<%&y~-AX?GzRsD}|+a4i8{qH!_Jr!fvBt=Of7^ zVSkcuz5z!;)6^K(0%ky6$MxL7w1hd(01LoTg=eJ*VFbY%A~7H~MMUu40~#8tHp51> zEgQaNpV3##jK0#8+kc(PVR{@>4nzIA7n{pvz3Z!U$_X;L%`NYd9Y<9?IQd;KJxtPn zn$OMo=Jl7)&9UQr@AJviu20$8Z8*&R<{9 diff --git a/client/DxPlay/DxPlay.csproj b/client/DxPlay/DxPlay.csproj index 9057acb4..107cb7ff 100644 --- a/client/DxPlay/DxPlay.csproj +++ b/client/DxPlay/DxPlay.csproj @@ -6,7 +6,7 @@ {0B44B3D7-52D7-4C0E-9B1C-F48CEEDA36FE} Debug AnyCPU - App.ico + maestro.ico DxPlay @@ -216,7 +216,6 @@ Component - Code @@ -227,6 +226,7 @@ PlayerForm.cs + PreserveNewest diff --git a/client/DxPlay/maestro.ico b/client/DxPlay/maestro.ico new file mode 100644 index 0000000000000000000000000000000000000000..e81b6ff606a93e28bea7a0d54407e15000a7e890 GIT binary patch literal 3262 zcmbuBc~Dd57Qj!CMKOST8C2A|JVk7kO_W`W2q-Qf$Wpb%x+5Y;SX4Gap=?rlA_58s zV!N){mysJJu?@81SFV0 zAAkggP(}ur1prF{U_Jmig8Kaz#?%>xD=eK>J8iXIx6Q)VWv1aA5{dMMOm$4uC7W8< z+ivjQ85l-M%%vpe`UIY^+2CzzZa+zv{3QxaO|6B?R@pf3*y4LQubd@TjVXG#@}73F zYOLTUd#nEu8|NL1Ow2Vkwf?DvL?Ri^`FhRz?caIqK9g12rF<@X^sph#tU45G!hoIr zt-SLAg1tz(aKm}ap0(>ejpi;Sku*NjqCaJZx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&DI zVIjD_xVu0XxndwFnb&iDsi0&bzi2wYaB5fn)Xtnqt;rx|XHw}BGrP^!Ywgv1GMQ{* z;q?81NXfwKL1`_@2u17m6OCd;VXO$W?jS}#iZPGLs=S01mi!_^q;N)0nMu!$ZwP+r zVt(lYLCM^%T%FE~ljN)j+2E@^hfgoJSg)t2ujT{5L|uIcH@|%$3GA-^p^-rq?;=`v z7^5G@8cw40qiFp>jBylWhAL=*!U`*4g{83EOi;F5aD55CbP>PU2q~N{uJr1|Iyr*J z2f~sZ-28OO25;f&m_EzM*2R0n)*sGZC_|Lbhx!Dn<`j&69A$>0bq6r|5sV&$u}@(Q z(Xxj=()%8gd#>VJw!*SyLaKA0q)MQAnUZtMW!sOoF5WW@=e!43ho+YH5>rbX=N;Pu zg057sltaG{%Gp?BJX#w_bc_|DYC5B8j7M1%`NN&E`up_pehi9vz!LU9dESRy#~8PM&R~sks)lHk9-`v? zyMN?KRikuoaGb4+&q{0O$^X}rPsH?DMynk?9NqoHX`R}NP#suT9m#ua7+UOaWo_niXG1fo)tbh0^U-?^R z9@W)r?^cOTzyIh - Resources\mediacube_logo_small.ico + maestro.ico true @@ -293,9 +293,6 @@ PreserveNewest - - - @@ -326,8 +323,8 @@ - + diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index 158b8073..676ae4fa 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -82,15 +82,15 @@ namespace Maestro { private void CreateForms() { string[] files = Directory.GetFiles("./Configuration", "*.json"); if (files.Length == 0) { - MessageBox.Show("Hiányos konfiguráció!"); - Application.Exit(); + MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); + TerminateApplication(); } foreach (String file in files) { CreateForm(file); } if (forms.Count == 0) { MessageBox.Show(new Form() { TopMost = true }, "Nincs aktív konfiguráció!"); - //TerminateApplication(); + TerminateApplication(); } } diff --git a/client/Maestro/Resources/installforge-installer-project.ifp b/client/Maestro/Resources/installforge-installer-project.ifp index a64b33d3d80a7231d97d71b9725b7fde2c9caef5..ef230307baed3572002fb489d606a9ac057acb9d 100644 GIT binary patch delta 435 zcmeyY@I!h+CZqAjELq0MWh`2v<(XAgiA5=TSq165Tpp>3DXB#YnUnKbtS9F(u`}ys z6--uSl9*h^VgloDu4U3?f^jBqX3=9bnEZ&PlF@i_4C_Vd3Nw?Kpwyhy#NyN#mx_R# z#7e!?id0@MLnDjHbJ(nyE6hwL|790vF)`6I1qrAkYY0dzE-ue6N^#9gE~+djNiBlv zHGpf?VT+VS*5Q^@nwnSQ780PBl9R*BWn?t@BbznY5^eT8D6KMi54#hX9mpZaXgPTT z7sMHBI6{?>&GLL-%o$FUkju0?nTuweEe**R|all z;x_0gjx2HycmRnlhCBlMs+|F~UxCe7r(DXq@KyXfX3nwqyi_lldL+5tqoWw#EKq~t zr-iA(@aFM-td)0{w?P8e(7!!-B>9xW1T4asgY^?_d{tgP#xA?a$Q9hEoW&pI`?yho zQ-#yvpwmRWwwPf~I=d|z>rB#^H9ihiucGGbn6n(gLhi=9xBx*zh zDQE2--YB3I>$t0w&5Exb;r3vXc6iJqNdByMv)$MJ zBjVt8XSM=Z>>ukwu!VroBE*!6NwtPgWdUA&>DT>Ek}BX0Lv6u~#kZ zUc$pr__w5hIL%AkyyMGa|4cz`gI43j2i>0KoQNS@8|&ll9;4|ck{ovl30 vYuOLhEfPqH;nFw5M`m8A9p()o5ZoU>hk;a)8t5UHk_um;w!FWGKU&^T5El~! diff --git a/client/Maestro/maestro.ico b/client/Maestro/maestro.ico new file mode 100644 index 0000000000000000000000000000000000000000..e81b6ff606a93e28bea7a0d54407e15000a7e890 GIT binary patch literal 3262 zcmbuBc~Dd57Qj!CMKOST8C2A|JVk7kO_W`W2q-Qf$Wpb%x+5Y;SX4Gap=?rlA_58s zV!N){mysJJu?@81SFV0 zAAkggP(}ur1prF{U_Jmig8Kaz#?%>xD=eK>J8iXIx6Q)VWv1aA5{dMMOm$4uC7W8< z+ivjQ85l-M%%vpe`UIY^+2C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{T-8JJHM7$a2KULfx% zmsbBIul5z*vh6816IPfDE6fEqmLpg6yRYaWSM`y?Y5XEX5j_;SAHch)+m@llNdoTW zl^v2X2e*LjJ^||ewX|BZ%63!v!$%{kPPG0A#yo*C!^TBnDB~DL4^q}26yM#@Q@&DI zVIjD_xVu0XxndwFnb&iDsi0&bzi2wYaB5fn)Xtnqt;rx|XHw}BGrP^!Ywgv1GMQ{* z;q?81NXfwKL1`_@2u17m6OCd;VXO$W?jS}#iZPGLs=S01mi!_^q;N)0nMu!$ZwP+r zVt(lYLCM^%T%FE~ljN)j+2E@^hfgoJSg)t2ujT{5L|uIcH@|%$3GA-^p^-rq?;=`v z7^5G@8cw40qiFp>jBylWhAL=*!U`*4g{83EOi;F5aD55CbP>PU2q~N{uJr1|Iyr*J z2f~sZ-28OO25;f&m_EzM*2R0n)*sGZC_|Lbhx!Dn<`j&69A$>0bq6r|5sV&$u}@(Q z(Xxj=()%8gd#>VJw!*SyLaKA0q)MQAnUZtMW!sOoF5WW@=e!43ho+YH5>rbX=N;Pu zg057sltaG{%Gp?BJX#w_bc_|DYC5B8j7M1%`NN&E`up_pehi9vz!LU9dESRy#~8PM&R~sks)lHk9-`v? zyMN?KRikuoaGb4+&q{0O$^X}rPsH?DMynk?9NqoHX`R}NP#suT9m#ua7+UOaWo_niXG1fo)tbh0^U-?^R z9@W)r?^cOTzyIhMinimumRecommendedRules.ruleset true + + maestro.ico + @@ -74,5 +77,8 @@ + + + \ No newline at end of file diff --git a/client/PasswordEncrypter/maestro.ico b/client/PasswordEncrypter/maestro.ico new file mode 100644 index 0000000000000000000000000000000000000000..e81b6ff606a93e28bea7a0d54407e15000a7e890 GIT binary patch literal 3262 zcmbuBc~Dd57Qj!CMKOST8C2A|JVk7kO_W`W2q-Qf$Wpb%x+5Y;SX4Gap=?rlA_58s zV!N){mysJJu?@81SFV0 zAAkggP(}ur1prF{U_Jmig8Kaz#?%>xD=eK>J8iXIx6Q)VWv1aA5{dMMOm$4uC7W8< z+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F)3iRh-Ku);!EVct`|3Mrg{T-8JJHM7$a2KULfx% zmsbBIul5z*vh6816IPfDE6fEqmLpg6yRYaWSM`y?Y5XEX5j_;SAHch)+m@llNdoTW zl^v2X2e*LjJ^||ewX|BZ%63!v!$%{kPPG0A#yo*C!^TBnDB~DL4^q}26yM#@Q@&DI zVIjD_xVu0XxndwFnb&iDsi0&bzi2wYaB5fn)Xtnqt;rx|XHw}BGrP^!Ywgv1GMQ{* z;q?81NXfwKL1`_@2u17m6OCd;VXO$W?jS}#iZPGLs=S01mi!_^q;N)0nMu!$ZwP+r zVt(lYLCM^%T%FE~ljN)j+2E@^hfgoJSg)t2ujT{5L|uIcH@|%$3GA-^p^-rq?;=`v z7^5G@8cw40qiFp>jBylWhAL=*!U`*4g{83EOi;F5aD55CbP>PU2q~N{uJr1|Iyr*J z2f~sZ-28OO25;f&m_EzM*2R0n)*sGZC_|Lbhx!Dn<`j&69A$>0bq6r|5sV&$u}@(Q z(Xxj=()%8gd#>VJw!*SyLaKA0q)MQAnUZtMW!sOoF5WW@=e!43ho+YH5>rbX=N;Pu zg057sltaG{%Gp?BJX#w_bc_|DYC5B8j7M1%`NN&E`up_pehi9vz!LU9dESRy#~8PM&R~sks)lHk9-`v? zyMN?KRikuoaGb4+&q{0O$^X}rPsH?DMynk?9NqoHX`R}NP#suT9m#ua7+UOaWo_niXG1fo)tbh0^U-?^R z9@W)r?^cOTzyIh - + diff --git a/server/-configuration/scheduledjobs.json b/server/-configuration/scheduledjobs.json index a872b482..58bc474b 100644 --- a/server/-configuration/scheduledjobs.json +++ b/server/-configuration/scheduledjobs.json @@ -64,7 +64,7 @@ ] }, { - "active": true, + "active": false, "name" : "OCTOPUS adatok szinkronizálása", "template": "sync-octopus.xml", "executeimmediate": true, diff --git a/server/user.jobengine.executors/jobtemplates/retrieve-material.xml b/server/user.jobengine.executors/jobtemplates/retrieve-material.xml index 6f381175..b36cf922 100644 --- a/server/user.jobengine.executors/jobtemplates/retrieve-material.xml +++ b/server/user.jobengine.executors/jobtemplates/retrieve-material.xml @@ -5,6 +5,7 @@ + @@ -19,6 +20,9 @@ + + + diff --git a/server/user.jobengine.executors/jobtemplates/retrieve-ondemand.xml b/server/user.jobengine.executors/jobtemplates/retrieve-ondemand.xml index 10f7884c..53807a42 100644 --- a/server/user.jobengine.executors/jobtemplates/retrieve-ondemand.xml +++ b/server/user.jobengine.executors/jobtemplates/retrieve-ondemand.xml @@ -2,10 +2,12 @@ - - + + + + @@ -16,7 +18,13 @@ - + + + + + + + @@ -42,6 +50,9 @@ + + + diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java index 7e494610..8071c713 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckMORPHEUSMissingMaterialsStep.java @@ -23,11 +23,12 @@ import user.jobengine.server.IJobRuntime; public class CheckMORPHEUSMissingMaterialsStep extends JobStep { private static final Logger logger = LogManager.getLogger(); - private static final String TARGET_NAME_PATTERN = "targetNamePattern"; + private static final String SUCCESSRECIPIENT = "successRecipient"; + private static final String TARGETNAMEPATTERN = "targetNamePattern"; private static final String MATERIAL_ID = "Material ID"; private static final String RETRIEVE_MATERIAL = "Adásanyag visszatöltés"; - private static final String TARGET_PATH = "targetPath"; - private static final String MEDIA_CUBE_MEDIA = "mediaCubeMedia"; + private static final String TARGETPATH = "targetPath"; + private static final String MEDIACUBEMEDIA = "mediaCubeMedia"; private static final String JOBTEMPLATE = "retrieve-material.xml"; private static final String CSV_EXT = ".csv"; private String targetPath; @@ -65,7 +66,8 @@ public class CheckMORPHEUSMissingMaterialsStep extends JobStep { return; } - jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), TARGET_PATH, targetPath, TARGET_NAME_PATTERN, "%s")); + jobEngine.submit(JOBTEMPLATE, RETRIEVE_MATERIAL, + ListUtils.asMap(MEDIACUBEMEDIA, medias.get(0), TARGETPATH, targetPath, TARGETNAMEPATTERN, "%s", SUCCESSRECIPIENT, null)); } private void processMissingMaterialCSV(Path csvFilePath) throws Exception { diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckTrafficMissingMaterialsStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckTrafficMissingMaterialsStep.java index d4f096e6..39c1648f 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckTrafficMissingMaterialsStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/CheckTrafficMissingMaterialsStep.java @@ -26,6 +26,7 @@ public class CheckTRAFFICMissingMaterialsStep extends JobStep { private static final String SQLSERVER_JDBC_SQL_SERVER_DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; private static final String SQL = "{call dbo.clIFsp_EC_MAM(1001, 32, Null, Null, ?)}"; private static final String JOBTEMPLATE = "retrieve-material.xml"; + private static final String SUCCESSRECIPIENT = "successRecipient"; @StepEntry public Object[] execute(String dbUrl, String userName, String password, int lookupDays, String targetPath, IJobEngine jobEngine, IJobRuntime jobRuntime) @@ -82,7 +83,8 @@ public class CheckTRAFFICMissingMaterialsStep extends JobStep { } String title = "Traffic adásanyag visszatöltés: " + trafficId; - jobEngine.submit(JOBTEMPLATE, title, ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), TARGET_PATH, targetPath, TARGET_NAME_PATTERN, "%s")); + jobEngine.submit(JOBTEMPLATE, title, + ListUtils.asMap(MEDIA_CUBE_MEDIA, medias.get(0), TARGET_PATH, targetPath, TARGET_NAME_PATTERN, "%s", SUCCESSRECIPIENT, null)); } } diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java index eab9db4d..e24df838 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/OutputPathAndNameSelectorStep.java @@ -1,34 +1,74 @@ package user.jobengine.server.steps; +import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import user.jobengine.db.Media; import user.jobengine.server.IJobEngine; import user.jobengine.server.IJobRuntime; -/** - * Elinditja minden mediara az archivalo folyamatot. - * - * @author robi - */ public class OutputPathAndNameSelectorStep extends JobStep { - private static final String ARCHIVE = "Archiválás"; - private static final String GLOBAL_SOURCE_PATH = "globalSourcePath"; + private enum MetadataType { + TRAFFIC, OCTOPUS, GENERIC + } + + private static final String TARGETNAMEPATTERN = "-ARCH-%s"; + private static final Logger logger = LogManager.getLogger(); - private static final String JOBTEMPLATE = "archive-material.xml"; - private static final String ARCHIVE_ITEM = "archiveItem"; + private static final String REGEXP_TRAFFIC = "^[MRP]{1}[0-9]{6}[A-Z]{1}$"; + private static final String REGEXP_OCTOPUSPLACEHOLDERID = "^[0-9]+_[0-9]+$"; + private static final String REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID = "^[0-9]+_[0-9]+-[0-9]{3}$"; + + private void check(String trafficOutputPath, String octopusOutputPath, String genericOutputPath, String houseId) { + if (StringUtils.isBlank(trafficOutputPath)) { + logger.error(getMarker(), "A folyamat 'trafficOutputPath' bemeneti paramétere üres."); + throw new NullPointerException("System is not configured properly, 'trafficOutputPath' input parameter missing."); + } + if (StringUtils.isBlank(octopusOutputPath)) { + logger.error(getMarker(), "A folyamat 'octopusOutputPath' bemeneti paramétere üres."); + throw new NullPointerException("System is not configured properly, 'octopusOutputPath' input parameter missing."); + } + if (StringUtils.isBlank(genericOutputPath)) { + logger.error(getMarker(), "A folyamat 'genericOutputPath' bemeneti paramétere üres."); + throw new NullPointerException("System is not configured properly, 'genericOutputPath' input parameter missing."); + } + if (StringUtils.isBlank(houseId)) { + logger.error(getMarker(), "A folyamat 'houseId' bemeneti paramétere üres."); + throw new NullPointerException("System is not configured properly, 'houseId' input parameter missing."); + } + } @StepEntry - public Object[] execute(Media mediaCubeMedia, String houseId, IJobEngine jobEngine, IJobRuntime jobRuntime) { - String targetPath = ""; - String targetNamePattern = ""; + public Object[] execute(String trafficOutputPath, String octopusOutputPath, String genericOutputPath, String houseId, IJobEngine jobEngine, + IJobRuntime jobRuntime) { + check(trafficOutputPath, octopusOutputPath, genericOutputPath, houseId); - try { - } catch (Exception e) { - logger.catching(e); + String id = houseId.toUpperCase(); + MetadataType mdType = GuessMetadataType(id); + String targetPath = null; + switch (mdType) { + case GENERIC: + targetPath = genericOutputPath; + break; + case OCTOPUS: + targetPath = octopusOutputPath; + break; + case TRAFFIC: + targetPath = genericOutputPath; + break; } + String targetNamePattern = houseId + TARGETNAMEPATTERN; return new Object[] { targetPath, targetNamePattern }; } + private MetadataType GuessMetadataType(String id) { + if (id.matches(REGEXP_TRAFFIC)) + return MetadataType.TRAFFIC; + if (id.matches(REGEXP_OCTOPUSPLACEHOLDERID)) + return MetadataType.OCTOPUS; + if (id.matches(REGEXP_OCTOPUSPLACEHOLDERVERSIONEDID)) + return MetadataType.OCTOPUS; + return MetadataType.GENERIC; + } + } diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMRestoreStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMRestoreStep.java index 60774550..a82c3cd5 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMRestoreStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/TSMRestoreStep.java @@ -5,7 +5,9 @@ import java.util.List; import org.apache.commons.lang.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.Marker; +import user.commons.MediaCubeMarker; import user.commons.RemoteFile; import user.commons.StoreUri; import user.commons.remotestore.IProgressEventListener; @@ -28,7 +30,8 @@ public class TSMRestoreStep extends JobStep { private String sourceFileName; @StepEntry - public Object[] execute(Media mediaCubeMedia, String targetPath, String targetNamePattern, IJobEngine jobEngine, IJobRuntime jobRuntime) throws Exception { + public Object[] execute(Media mediaCubeMedia, String targetPath, String targetNamePattern, String successRecipient, IJobEngine jobEngine, + IJobRuntime jobRuntime) throws Exception { setAndCheck(mediaCubeMedia, targetPath, targetNamePattern, jobEngine); try { //TODO check file existance? @@ -52,17 +55,19 @@ public class TSMRestoreStep extends JobStep { logger.catching(e); throw e; } + + Marker marker = StringUtils.isBlank(successRecipient) ? getMarker() : new MediaCubeMarker(successRecipient); + logger.info(marker, ""); return null; } - private String getSourceFileName(Media mediaCubeMedia, Store targetStore) { + private String getSourceFileName(Media mediaCubeMedia, Store store) { List mediaFiles = mediaCubeMedia.getMediaFiles(); if (mediaFiles == null) return null; for (MediaFile mediaFile : mediaFiles) { - if (mediaFile.getStore().getId() == targetStore.getId()) { + if (mediaFile.getStore().getId() == store.getId()) return mediaFile.getRelativePath(); - } } return null; } diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/UserNotificationStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/UserNotificationStep.java new file mode 100644 index 00000000..0886c95a --- /dev/null +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/UserNotificationStep.java @@ -0,0 +1,19 @@ +package user.jobengine.server.steps; + +import org.apache.commons.lang.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import user.commons.MediaCubeMarker; + +public class UserNotificationStep extends JobStep { + private static final Logger logger = LogManager.getLogger(); + + @StepEntry + public Object[] execute(String to, String notification) { + if (StringUtils.isNotBlank(to) && StringUtils.isNotBlank(notification)) + logger.info(new MediaCubeMarker(to), notification); + return null; + } + +} diff --git a/server/user.jobengine.osgi.server/pages/jobselector.zul b/server/user.jobengine.osgi.server/pages/jobselector.zul index f2202b80..9e794f6e 100644 --- a/server/user.jobengine.osgi.server/pages/jobselector.zul +++ b/server/user.jobengine.osgi.server/pages/jobselector.zul @@ -11,8 +11,8 @@ -     -       Â