git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube...
authorVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 3 Oct 2017 15:07:55 +0000 (15:07 +0000)
committerVásáry Dániel <daniel.vasary@userrendszerhaz.hu>
Tue, 3 Oct 2017 15:07:55 +0000 (15:07 +0000)
client/Maestro/Metadata/ArchiveMetadata.cs
client/Maestro/Resources/configuration-unc.json
server/-configuration/log4j2.xml
server/user.jobengine.executors/src/user/jobengine/server/steps/FakeStep.java
server/user.jobengine.osgi.commons/src/user/commons/nexio/NexioClipEventDispatcher.java

index 676b4303bec3d821300cb623552f7034ebc5a24e..ee33487b8d0c4aab256df08bdf1afcbddb2b65db 100644 (file)
@@ -1,8 +1,4 @@
-using System;\r
-using System.Collections.Generic;\r
-using System.Linq;\r
-using System.Text;\r
-using System.Threading.Tasks;\r
+using Newtonsoft.Json;\r
 \r
 namespace Maestro.Metadata {\r
     public class ArchiveMetadataModel {\r
@@ -16,8 +12,9 @@ namespace Maestro.Metadata {
         public string MediaDescription { get; set; }\r
 \r
         public override string ToString() {\r
-            return String.Format("{{\n \"Anyag azonosító\": \"{0}\",\n, \"Anyag cím\": \"{1}\",\n \"Anyag leírása\": \"{2}\",\n \"Média azonosító\": \"{3}\",\n \"Média cím\": \"{4}\",\n \"Média leírás\": \"{5}\"  \n}}",\r
-                StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription);\r
+            return JsonConvert.SerializeObject(this);\r
+            //return String.Format("{{\n \"Anyag azonosító\": \"{0}\",\n, \"Anyag cím\": \"{1}\",\n \"Anyag leírása\": \"{2}\",\n \"Média azonosító\": \"{3}\",\n \"Média cím\": \"{4}\",\n \"Média leírás\": \"{5}\"  \n}}",\r
+            //    StuffID, StuffTitle, StuffDescription, MediaID, MediaTitle, MediaDescription);\r
         }\r
     }\r
 }\r
index b1fc372f4359f52d94eaa42a7c241a831cbc6018..48fa46938ff71b48c3f224a594e29ffa6b5de822 100644 (file)
       }\r
     },\r
     {\r
-      "label": "Ready",\r
+      "label": "Adáskész",\r
       "processor": "FTPTargetProcessor",\r
       "outputFormat": "{0}-{1}",\r
            "saveSegments": true,\r
            "killDateDays": 1,\r
-           "tag": "tag",\r
+           "tag": "Adáskész",\r
            "createSubFolder": true,\r
            "useMetadata": true,\r
       "remote": {\r
index a848af97f915c458f597641ef006a2352612e23e..d83853a8a51a015fe6571e179fdce27cca931ed3 100644 (file)
@@ -61,6 +61,6 @@
                <logger name="org.jboss.resteasy.specimpl" level="debug" />\r
                <logger name="org.jboss.resteasy.plugins.server" level="debug" />\r
                <logger name="org.jboss.resteasy.plugins.providers" level="debug" />\r
-<!--           <logger name="user.commons.nexio.api" level="debug" /> -->\r
+               <logger name="user.commons.nexio" level="debug" />\r
        </Loggers>\r
 </Configuration>
\ No newline at end of file
index 39ab264a179a998481b0c7495c9375a8594156d1..94a7408efc3c611c6b8b1e3aaf71e2a5be4becfe 100644 (file)
@@ -2,7 +2,6 @@ package user.jobengine.server.steps;
 \r
 import org.apache.logging.log4j.LogManager;\r
 import org.apache.logging.log4j.Logger;\r
-import org.apache.logging.log4j.MarkerManager;\r
 \r
 import com.ibm.nosql.json.JSONUtil;\r
 import com.ibm.nosql.json.api.BasicDBObject;\r
@@ -17,14 +16,7 @@ public class FakeStep extends JobStep {
        @StepEntry\r
        public Object[] execute(long itemID, IJobEngine jobEngine, IJobRuntime jobRuntime) {\r
                try {\r
-                       //                      IItemManager manager = jobEngine.getItemManager();\r
-                       //                      StoreUri sourceUri = manager.createStoreUri(RemoteStoreProtocol.SMB, "\\\\10.10.1.100\\BRAAVOS\\ARCHIVE");\r
-                       //                      sourceUri.setUserName("mediacube");\r
-                       //                      sourceUri.setPassword("Broadca5T");\r
-                       //                      List<RemoteFile> remoteFiles = sourceUri.getRemoteFiles();\r
-                       //                      for (RemoteFile remoteFile : remoteFiles)\r
-                       //                              logger.info(remoteFile.getName());\r
-\r
+                       logger.warn(getMarker(), "Starting Fake step");\r
                        String json = "{ houseID: '111222' }";\r
                        BasicDBObject o = (BasicDBObject) JSONUtil.jsonToDbObject(json);\r
                        for (int i = 0; i < count; i++) {\r
@@ -34,7 +26,6 @@ public class FakeStep extends JobStep {
                                jobRuntime.incrementProgress((i + 1) * count);\r
                                //                              logger.info("Progress {}", jobRuntime.getProgress());\r
                        }\r
-                       logger.warn(MarkerManager.getMarker("teszt2"), "Starting Fake step, parameter: {}", itemID);\r
                } catch (Exception e) {\r
                        logger.error(e.getMessage());\r
                }\r
index 54378da1463f672a4b8bc2e8bb70d01b3ce5c4d8..92581519ac0594f706ff425231b2de1709ba4d12 100644 (file)
@@ -120,7 +120,7 @@ public class NexioClipEventDispatcher implements ClipEventListener {
                                }\r
                        });\r
 \r
-                       importThread.start();\r
+                       //importThread.start();\r
 \r
                } catch (Exception exc) {\r
                        logger.error("", exc);\r
@@ -136,15 +136,15 @@ public class NexioClipEventDispatcher implements ClipEventListener {
                try {\r
                        //DELETE-nel csak az id van kitoltve a CLIP-en, ezert exception jon!!!\r
                        if (evt.getEventType() == ClipEventType.CLIP_ADDED) {\r
-//                             if (isValidClip(evt.getClip())) {\r
-                                       BasicDBObject jsClip = convertClipToJSON(evt.getClip());\r
-                                       //cache???\r
-                                       Map<String, BasicDBObject> mongoClips = loadClipsFromMongo();\r
-                                       saveClipIntoMongo(jsClip, mongoClips);\r
-//                             }\r
+                               //                              if (isValidClip(evt.getClip())) {\r
+                               BasicDBObject jsClip = convertClipToJSON(evt.getClip());\r
+                               //cache???\r
+                               Map<String, BasicDBObject> mongoClips = loadClipsFromMongo();\r
+                               saveClipIntoMongo(jsClip, mongoClips);\r
+                               //                              }\r
                        } else if (evt.getEventType() == ClipEventType.CLIP_DELETED) {\r
                                BasicDBObject jsClip = new BasicDBObject();\r
-                               jsClip.put(ID, evt.getClip().getId().get());    //Unique internal ID \r
+                               jsClip.put(ID, evt.getClip().getId().get()); //Unique internal ID\r
                                removeDeleted(jsClip);\r
                        }\r
                } catch (Exception exc) {\r
@@ -153,63 +153,63 @@ public class NexioClipEventDispatcher implements ClipEventListener {
        }\r
 \r
        //END OF R\r
-/*\r
-       private void extendJSONClip(BasicDBObject jsClip, Clip clip) throws Exception {\r
-               jsClip.put(ID, clip.getId().get()); //Unique internal ID\r
-               jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename)\r
-               jsClip.put(DURATION, clip.getDuration());\r
-               jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime());\r
-               jsClip.put(VIDEO_FORMAT, clip.getVideoFormat());\r
-               jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate());\r
-               jsClip.put(FILESIZE, clip.getFileSize());\r
-               jsClip.put(EXTAGENCY, clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY));\r
-               //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate());\r
-               //jsClip.put(EXTAGENCY, rs.getString(i++));\r
-               //jsClip.put(START, rs.getString(i++));\r
-               //System.out.println(String.format("ID = '%s'\tXID = '%s'\tDuration = '%s'\tModified = '%s'\tVideoFormat = '%s'\tVideoBitrate = '%s'", id, xid, duration, modifiedTimestamp.getTime(), videoFormat, videoBitrate));\r
-       }\r
-*/     \r
-       \r
+       /*\r
+               private void extendJSONClip(BasicDBObject jsClip, Clip clip) throws Exception {\r
+                       jsClip.put(ID, clip.getId().get()); //Unique internal ID\r
+                       jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename)\r
+                       jsClip.put(DURATION, clip.getDuration());\r
+                       jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime());\r
+                       jsClip.put(VIDEO_FORMAT, clip.getVideoFormat());\r
+                       jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate());\r
+                       jsClip.put(FILESIZE, clip.getFileSize());\r
+                       jsClip.put(EXTAGENCY, clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY));\r
+                       //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate());\r
+                       //jsClip.put(EXTAGENCY, rs.getString(i++));\r
+                       //jsClip.put(START, rs.getString(i++));\r
+                       //System.out.println(String.format("ID = '%s'\tXID = '%s'\tDuration = '%s'\tModified = '%s'\tVideoFormat = '%s'\tVideoBitrate = '%s'", id, xid, duration, modifiedTimestamp.getTime(), videoFormat, videoBitrate));\r
+               }\r
+       */\r
+\r
        private BasicDBObject convertClipToJSON(Clip clip) throws Exception {\r
                BasicDBObject jsClip = new BasicDBObject();\r
-               try{\r
+               try {\r
                        jsClip.put(ID, clip.getId().get()); //Unique internal ID\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(LONGNAMEID, clip.getXid().get()); //Extended ID (Filename)\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(DURATION, clip.getDuration());\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(MODIFIEDTIMESTAMP, clip.getModifiedTimestamp().getTime());\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(VIDEO_FORMAT, clip.getVideoFormat());\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(VIDEO_BITRATE, clip.getVideoBitrate());\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(FILESIZE, clip.getFileSize());\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
-               try{\r
+               try {\r
                        jsClip.put(EXTAGENCY, new String(clip.getExtendedField(GetExtendedFieldCommand.FN_AGENCY)));\r
-               }catch(Exception e){\r
+               } catch (Exception e) {\r
                        System.out.println(e);\r
                }\r
                //jsClip.put(RECORDDATE, new DateTime(rs.getString(i++)).toDate());\r
@@ -282,14 +282,14 @@ public class NexioClipEventDispatcher implements ClipEventListener {
                }\r
 \r
                /*\r
-\r
+               \r
                                int c = connection.read(buffer, 0, 2);\r
                                //2 bytes hosszan az idokozben hozzaadott id-k szamossaga\r
                                if (c < 2) {\r
                                        throw new ProtocolException("c, 2, 2");\r
                                }\r
                                //MSB, LSB\r
-\r
+               \r
                                return nofIds;\r
                        */\r
                return ret;\r