Skip to content

Commit

Permalink
Merge pull request #6555 from kaltura/Mercury-13.10.0-SUP-13055
Browse files Browse the repository at this point in the history
SUP-13055: define http notification which is sent when entry which is not recorded is replaced
  • Loading branch information
yossipapi authored Dec 19, 2017
2 parents 8e5ea5d + d9109be commit 73ac787
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* @package deployment
*/
require_once (__DIR__ . '/../../bootstrap.php');

$script = realpath(dirname(__FILE__) . "/../../../tests/standAloneClient/exec.php");

$newTemplateUpdate = realpath(dirname(__FILE__) . "/../../updates/scripts/xml/2017_12_19_notRecordedEntryReplaced.xml");

if(!file_exists($newTemplateUpdate) || !file_exists($script))
{
KalturaLog::err("Missing update script file");
return;
}

passthru("php $script $newTemplateUpdate");
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<config>
<serviceUrl>@SERVICE_URL@</serviceUrl>
<partnerId>-2</partnerId>
<clientTag>Stand alone php 1.0.0</clientTag>
<curlTimeout>30</curlTimeout>
<userAgent>Stand alone php 1.0.0</userAgent>
</config>
<session>
<partnerId>-2</partnerId>
<secret>@ADMIN_CONSOLE_PARTNER_ADMIN_SECRET@</secret>
<sessionType>2</sessionType>
</session>
<multirequest>
<request service="eventNotificationTemplate" action="add" plugin="eventNotification" partnerId="0">
<template objectType="KalturaHttpNotificationTemplate">
<name>Not Recorded Entry Content Replaced</name>
<systemName>Not_Recorded_Entry_Content_Replaced</systemName>
<description>Email notification template to be sent when a entry content which is not recorded replaced successfully.</description>
<automaticDispatchEnabled>1</automaticDispatchEnabled>
<eventType>12</eventType> <!-- EventNotificationEventType::OBJECT_REPLACED -->
<eventObjectType>1</eventObjectType> <!-- EventNotificationEventObjectType::ENTRY -->
<eventConditions objectType="array">
<item objectType="KalturaFieldMatchCondition">
<description>source_type_not_recorded_live</description>
<not>1</not>
<field objectType="KalturaEvalStringField">
<code>$scope->getObject()->getSourceType()</code>
</field>
<values objectType="array">
<item objectType="KalturaStringValue">
<value>36</value>
</item>
</values>
</item>
</eventConditions>
<contentParameters objectType="array">
<item objectType="KalturaEventNotificationParameter">
<key>entry_id</key>
<description>Entry ID</description>
<value objectType="KalturaEvalStringField">
<code>$scope->getObject()->getId()</code>
</value>
</item>
<item objectType="KalturaEventNotificationParameter">
<key>entry_name</key>
<description>Entry name</description>
<value objectType="KalturaEvalStringField">
<code>$scope->getObject()->getName()</code>
</value>
</item>
<item objectType="KalturaEventNotificationParameter">
<key>entry_status</key>
<description>Entry status</description>
<value objectType="KalturaEvalStringField">
<code>$scope->getObject()->getStatus()</code>
</value>
</item>
<item objectType="KalturaEventNotificationParameter">
<key>entry_reference_id</key>
<description>Entry reference ID</description>
<value objectType="KalturaEvalStringField">
<code>$scope->getObject()->getReferenceID()</code>
</value>
</item>
</contentParameters>
<method>2</method> <!-- KalturaHttpNotificationMethod::POST -->
</template>
</request>
<request service="eventNotificationTemplate" action="updateStatus" plugin="eventNotification" partnerId="0">
<id>{1:result:id}</id>
<status>1</status><!-- EventNotificationTemplateStatus::DISABLED -->
</request>
</multirequest>
</xml>

18 changes: 18 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Mercury 13.10.0 #

## Add Entry replaced HTTP template which excludes kaltura recorded entries ##

- Issue Type: Support
- Issue ID: SUP-13055

### Configuration ###
First replcae all tokens from the XML files below and remove ".template" from the fle name:
/opt/kaltura/app/deployment/updates/scripts/xml/2017_12_19_notRecordedEntryReplaced.template.xml

### Deployment scripts ###

php /opt/kaltura/app/deployment/updates/scripts/2017_12_19_deploy_not_recorded_entry_replaced_http_notification.php

#### Known Issues & Limitations ####
None.

# Mercury 13.9.0 #

## Explicit Live - allow only admin to view streams until they decide to show everyone ##
Expand Down

0 comments on commit 73ac787

Please sign in to comment.